back to list

Approx GCD's are Phase Modulated JI Intervals

🔗rick <rick_ballan@...>

5/2/2010 4:59:39 AM

Hi everyone,

I've found an interesting solution to this approx GCD problem and it's very simple. The complex waves with approx GCD's (like 81/64, 32/27 or ET's etc...) can actually be rewritten as just intervals with exact GCD's, (5/4, 6/5 etc...) and with a phase shift in each component. In other words, they can be rewritten as periodic waves with a modulated phase. From my last post we got,
aK/(a + b) = p + (r/(a + b),
bK/(a + b) = q - (r/(a + b),
where r = aq - pb, and adding gave K = (p + b). Now, if we multiply the (a + b)/(p + q) back out this gives
a = p[(a + b)/(p + q)] + r/(p + q),
b = q[(a + b)/(p + q)] - r/(p + q).

The original wave can now be written

f(t) = sin(2pi at) + sin(2pi bt) =
sin[2pi(p[(a + b)/(p + q)])t + rt/(p + q)] +
sin[2pi(p[(a + b)/(p + q)])t - rt/(p + q)].

If we let r = 0 momentarily, then f(t) reduces to a periodic function with the exact frequency (a + b)/(p + b). This is easily proved since this is by definition the exact GCD between p[(a + b)/(p + q)] and q[(a + b)/(p + q)] i.e. since p and q are whole they are the "p'th" and "q'th" harmonics to this fundamental. Thus, the original function can be regarded as a periodic function but with a modulated phase in both components, + rt/(p + q) for the first and - rt/(p + q) for the second. I've posted a pdf with a couple of graphic examples from Mathematica.

-Rick

🔗Chris Vaisvil <chrisvaisvil@...>

5/2/2010 7:07:48 AM

Hi Rick,

I suspect I am not understanding something because it sounds like you are
saying a phase shift will retune a JI interval.
I'm a layman when it comes to things tuning - could you explain a little?

Chris

On Sun, May 2, 2010 at 7:59 AM, rick <rick_ballan@...> wrote:
>
>
>
> Hi everyone,
>
> I've found an interesting solution to this approx GCD problem and it's
very simple. The complex waves with approx GCD's (like 81/64, 32/27 or ET's
etc...) can actually be rewritten as just intervals with exact GCD's, (5/4,
6/5 etc...) and with a phase shift in each component. In other words, they
can be rewritten as periodic waves with a modulated phase. From my last post
we got,
>

🔗Marcel de Velde <m.develde@...>

5/2/2010 7:14:47 AM

Hi Chris,

Hi Rick,
>
> I suspect I am not understanding something because it sounds like you are
> saying a phase shift will retune a JI interval.
> I'm a layman when it comes to things tuning - could you explain a little?
>
>
> Chris
>

Yes you're right, it will.
A phase shifter, that will shift (modulate) the phase ever more and has
infinite memory(or memory long enough for the wave atleast) will retune a JI
interval to any frequency below the JI interval.
A hypothetical phase shifter that can see in the future will also retune a
JI interval to any frequency above the JI interval.

Marcel

🔗Chris Vaisvil <chrisvaisvil@...>

5/2/2010 7:39:41 AM

Ok, then I think Rick and yourself must not be referring to a phase
shift in a signal processing sense but in some other math sense.
In a signal processing sense a phase shift would not change the pitch.

Thanks,

Chris

On Sun, May 2, 2010 at 10:14 AM, Marcel de Velde <m.develde@...> wrote:

>> I suspect I am not understanding something because it sounds like you are saying a phase shift will retune a JI interval.
>> I'm a layman when it comes to things tuning - could you explain a little?
>>
>>
>> Chris
>
> Yes you're right, it will.
> A phase shifter, that will shift (modulate) the phase ever more and has infinite memory(or memory long enough for the wave atleast) will retune a JI interval to any frequency below the JI interval.
> A hypothetical phase shifter that can see in the future will also retune a JI interval to any frequency above the JI interval.
>
> Marcel

🔗Marcel de Velde <m.develde@...>

5/2/2010 8:44:09 AM

Hi Chris,

Ok, then I think Rick and yourself must not be referring to a phase
> shift in a signal processing sense but in some other math sense.
> In a signal processing sense a phase shift would not change the pitch.
>
> Thanks,
>
> Chris
>

Both Rick and I mentioned MODULATED phase shift.
A phase shift is where there are 2 identical waves but shifted in phase.
A normal "phase shifter" effect usually includes a modulation of this phase
shift.
Where the phase shift amount is modulated.
When one changes the phase shift then one is changing the pitch of one (or
both) of the waves to reach other phase shift amounts.
So yes, normal phase shifters do change the pitch, however they do so a
little and when it reaches a certain pitch change it then usually changes
back.
The modulated phase shift Rick means is one that doesn't change the pitch in
a sine/triangle wave like motion up and down like a normal modulated phase
shifter, but instead modulates the phase in a constant linear way, which
results in a change of pitch that is a constant fixed new pitch.

Marcel

🔗Chris Vaisvil <chrisvaisvil@...>

5/2/2010 9:03:09 AM

Ok, I learned something new

"# For small amplitude signals, PM is similar to amplitude modulation
(AM) and exhibits its unfortunate doubling of baseband bandwidth and
poor efficiency.
# For a single large sinusoidal signal, PM is similar to FM"

http://en.wikipedia.org/wiki/Phase_modulation

I was thinking of a much slower modulation.

Thanks Marcel,

Chris

On Sun, May 2, 2010 at 11:44 AM, Marcel de Velde <m.develde@...> wrote:
>
> Both Rick and I mentioned MODULATED phase shift.
> A phase shift is where there are 2 identical waves but shifted in phase.
> A normal "phase shifter" effect usually includes a modulation of this phase shift.
> Where the phase shift amount is modulated.
> When one changes the phase shift then one is changing the pitch of one (or both) of the waves to reach other phase shift amounts.
> So yes, normal phase shifters do change the pitch, however they do so a little and when it reaches a certain pitch change it then usually changes back.
> The modulated phase shift Rick means is one that doesn't change the pitch in a sine/triangle wave like motion up and down like a normal modulated phase shifter, but instead modulates the phase in a constant linear way, which results in a change of pitch that is a constant fixed new pitch.
>
> Marcel
>

🔗Mike Battaglia <battaglia01@...>

5/2/2010 2:31:42 PM

> Hi Rick,
>
> I suspect I am not understanding something because it sounds like you are saying a phase shift will retune a JI interval.
> I'm a layman when it comes to things tuning - could you explain a little?
>
>
> Chris

Indeed it will. So will tremolo (amplitude modulation). The reason
you're a bit confused is that although we like to talk in terms of
things purely in the frequency domain around here, that isn't exactly
how we perceive sound. A mixed time-frequency plot is more how we
perceive sound.

In fact, "beating" itself will also change how we perceive a note. If
you add 440 Hz and 450 Hz together, you end up getting 445 Hz with a
10 Hz envelope to it. So if you have 440 Hz and you add 450 Hz to it,
you have just changed the pitch of what you're hearing.

The same concept applies when you're playing tempered intervals. The
coinciding partials don't just beat against each other, they retune
each other as well. Of course, it's a little bit more complicated when
tempering gets involved, because each successive harmonic slowly
drifts further away from its "beating" counterpart, and so we have
more of a partial-dependent vibrato going on.

-Mike

🔗Michael <djtrancendance@...>

5/2/2010 8:27:16 PM

MikeB>"If you add 440 Hz and 450 Hz together, you end up getting 445 Hz with a
10 Hz envelope to it."
Makes sense...i guess my question is when do you hear two tones and distinct and not, say, a "new" tone vibrating within an envelope. According to your example, a 1/4 tone or so playing next to an original frequency creates a new beating "blurred tone" rather than the sense of two individual tones.

>"The same concept applies when you're playing tempered intervals. The coinciding partials don't just beat against each other, they retune
each other as well."
Interesting...so what formula calculates what "resulting tone" you hear given a tempered interval?

🔗Mike Battaglia <battaglia01@...>

5/2/2010 9:20:36 PM

On Sun, May 2, 2010 at 11:27 PM, Michael <djtrancendance@...> wrote:
>
> MikeB>"If you add 440 Hz and 450 Hz together, you end up getting 445 Hz with a
> 10 Hz envelope to it."
>   Makes sense...i guess my question is when do you hear two tones and distinct and not, say, a "new" tone vibrating within an envelope.  According to your example, a 1/4 tone or so playing next to an original frequency creates a new beating "blurred tone" rather than the sense of two individual tones.

If we're dealing with sine waves. If we're dealing with complex
waveforms, keep in mind that each successive partial will diverge a
different absolute amount of Hz from its nearest coinciding partial.

You hear two tones as distinct once the distance between the two tones
becomes sufficient enough for them to get out of the same auditory
filter ("critical band" in common parlance). Although you should be
aware that it isn't like an instantaneous "flip" but rather a smooth
progression from a single tone with beating to multiple tones without
it, with a middle ground in which it is both at the same time and you
can "flip your perception either way."

> >"The same concept applies when you're playing tempered intervals. The coinciding partials don't just beat against each other, they retune
> each other as well."
> Interesting...so what formula calculates what "resulting tone" you hear given a tempered interval?

It depends and that's an interesting question. If the two tones are
equal, the resulting tone is the arithmetic mean of the two. However,
as is more often the case, if the two tones are not equal in volume
(say in the case of a detuned 3/2 where the 3/1 of the root nearly
coincides with the 2/1 of the fifth), I'm not sure exactly how it
would work out. I do know that if one of the partials is low enough in
volume it will be completely covered up by the other, louder partial
(or "masking" - just trying to connect familiar concepts together for
you :) )

Either way, I don't think it's radically going to change the theory of
regular temperament, but it is something interesting that should be
known (that beating tones actually become inharmonic timbres with
partial-dependent tremolo), and can help you to understand the
psychoacoustic happenings behind the scenes a little bit better.

-Mike

🔗Graham Breed <gbreed@...>

5/2/2010 10:08:17 PM

On 3 May 2010 08:20, Mike Battaglia <battaglia01@...> wrote:

> It depends and that's an interesting question. If the two tones are
> equal, the resulting tone is the arithmetic mean of the two. However,
> as is more often the case, if the two tones are not equal in volume
> (say in the case of a detuned 3/2 where the 3/1 of the root nearly
> coincides with the 2/1 of the fifth), I'm not sure exactly how it
> would work out. I do know that if one of the partials is low enough in
> volume it will be completely covered up by the other, louder partial
> (or "masking" - just trying to connect familiar concepts together for
> you :) )

You can consider the pitch as varying between the two extremes. The
mathematics is all in Helmholtz. He wouldn't have known about
masking, but that assumes the ear can differentiate the two pitches in
the first place.

Graham

🔗Michael <djtrancendance@...>

5/2/2010 10:59:33 PM

MikeB>"You hear two tones as distinct once the distance between the two tones becomes sufficient enough for them to get out of the same auditory
filter ("critical band" in common parlance)."

Right...but what I don't get is that in-between part where you are inside the critical band (though not by much) and supposedly hear both the two tones separately and the "combined" tone.
Say both of these tones are the same volume (IE the dyad that produces the resulting "beating" third tone) and no "masking" takes place...would the brain supposedly hear all three separate tones (2 + the "beating tone") or would something else occur and, if so, how would it be calculated "on the average"?

The issue is, for example, what happens if you have a guitar playing a note on a root and another on a ratio of 1.818 from the root (IE straight between two rather close periodicity points at 9/5 and 11/6). Would you hear a 9/5 ratio, an 11/6 ratio, something in-between, or all three of them?

🔗Michael <djtrancendance@...>

5/2/2010 11:01:44 PM

Graham>"You can consider the pitch as varying between the two extremes."
As in...frequency modulation between the top and bottom frequency generated by the envelope?

🔗Graham Breed <gbreed@...>

5/2/2010 11:16:15 PM

On 3 May 2010 10:01, Michael <djtrancendance@...> wrote:
>
>
> Graham>"You can consider the pitch as varying between the two extremes."
>     As in...frequency modulation between the top and bottom frequency generated by the envelope?

Yes. And it's in synch with the amplitude modulation, so the most
extreme frequencies are where you have the lowest amplitudes.

Graham

🔗rick <rick_ballan@...>

5/2/2010 11:56:24 PM

--- In tuning@yahoogroups.com, Chris Vaisvil <chrisvaisvil@...> wrote:
>
> Hi Rick,
>
> I suspect I am not understanding something because it sounds like you are
> saying a phase shift will retune a JI interval.
> I'm a layman when it comes to things tuning - could you explain a little?
>
Hi Chris,

Apart from the basic trigonometric identities like sin A + sin B = 2sin(A + B)cos(A - B), which can be seen as a sin(A + B) with an amplitude modulation 2cos(A - B), I always believed that sine waves were pretty much irreducible. I also knew that we could modify waves by adding a phase or frequency modulation. But what I didn't know - and it took me completely by surprise - was that under certain conditions, sin A + sin B can now also be *rewritten* as a phase modulated 'JI' interval, say sin(P + R) + sin(Q - R). Therefore it's more than just 'retuning' a JI intervals with a phase mod. Because they are equivalent, its saying that intervals like 81/64, 32/27etc *are already* JI intervals with a PM. This seems more like some type of trig identity.

-Rick
>

>
> On Sun, May 2, 2010 at 7:59 AM, rick <rick_ballan@...> wrote:
> >
> >
> >
> > Hi everyone,
> >
> > I've found an interesting solution to this approx GCD problem and it's
> very simple. The complex waves with approx GCD's (like 81/64, 32/27 or ET's
> etc...) can actually be rewritten as just intervals with exact GCD's, (5/4,
> 6/5 etc...) and with a phase shift in each component. In other words, they
> can be rewritten as periodic waves with a modulated phase. From my last post
> we got,
> >
>

🔗Mike Battaglia <battaglia01@...>

5/3/2010 12:11:27 AM

On Mon, May 3, 2010 at 1:08 AM, Graham Breed <gbreed@...> wrote:
>
> You can consider the pitch as varying between the two extremes. The
> mathematics is all in Helmholtz. He wouldn't have known about
> masking, but that assumes the ear can differentiate the two pitches in
> the first place.
>
> Graham

Ah yes, Helmholtz. I knew someone was going to say this. I don't
remember offhand, but I believe Helmholtz method of determining it
basically involved getting the Hilbert-transform derived
"instantaneous frequency" of the combined signal. If you do the math
out, the instantaneous frequency turns out to have a slight "wobble"
that I believe is centered around the arithmetic mean of the two
sinusoidal component frequencies.

However, I don't think the Hilbert instantaneous frequency really
accurately represents the pitch we hear, for the following reasons:

1) The mathematical "instantaneous frequency" of a complex waveform
(as the derivative of its "instantaneous phase") doesn't realistically
represent how the ear perceives pitch, especially for multicomponent
signals. Try deriving it for a sawtooth wave, or even for two sine
waves in a 2:1 ratio - you don't get what you expect. What it's
actually doing is treating the entire waveform as a single sinusoidal
component, and then telling you how you'd have to instantaneously
modulate the frequency of that sinusoid to work back out the original
waveform.
2) The Hilbert transform isn't a causal function, so the ear can't
really be performing a real-time 90-degree phaseshift on the incoming
signal. It would have to go forward in time to figure out what's
coming next. Some of these limitations could be solved by using a
windowed Hilbert transform, but to assume that the auditory system is
actually doing that is complete speculation.
3) I have, empirically speaking, never personally heard this "wobble"
in pitch, although I can certainly convince myself of it if I try.

I have considered the idea of modeling human hearing by first sending
the signal into a filterbank representing the cochlea (or some
equivalent form of wavelet transform) and then working out the
instantaneous HT of each filtered signal, but I'm still not convinced
that the ear is doing that, and haven't read any literature suggesting
that it does.

-Mike

🔗Graham Breed <gbreed@...>

5/3/2010 1:49:02 AM

On 3 May 2010 11:11, Mike Battaglia <battaglia01@...> wrote:

> Ah yes, Helmholtz. I knew someone was going to say this. I don't
> remember offhand, but I believe Helmholtz method of determining it
> basically involved getting the Hilbert-transform derived
> "instantaneous frequency" of the combined signal. If you do the math
> out, the instantaneous frequency turns out to have a slight "wobble"
> that I believe is centered around the arithmetic mean of the two
> sinusoidal component frequencies.

I don't know what a Hilbert transform is. Fortunately, I don't think
Helmholtz did either. Wikipedia says even Hilbert didn't come up with
it until 1905.

What you do is start with the simple formula that shows beating. You
add two sine waves of slightly different frequencies together and the
result is identical to a sine wave of average frequency modulated by a
frequency some factor of two related to the difference in the
frequencies. This is clearly a good model of human hearing because we
do hear beats.

That formula does depend on the amplitudes being equal. When they
aren't you have to decide how to define the frequency of the modulated
signal. You can get a result identical to a combination of frequency
and amplitude modulation. I did it with phasors. After all this time
I don't remember exactly what a phasor is, but it does make the
calculation simple to understand. However Helmholtz did it he got the
same result as me.

> However, I don't think the Hilbert instantaneous frequency really
> accurately represents the pitch we hear, for the following reasons:
>
> 1) The mathematical "instantaneous frequency" of a complex waveform
<snip>

We're not talking about complex waveforms, only sine waves.

> 2) The Hilbert transform isn't a causal function, so the ear can't
> really be performing a real-time 90-degree phaseshift on the incoming
> signal. It would have to go forward in time to figure out what's
> coming next. Some of these limitations could be solved by using a
> windowed Hilbert transform, but to assume that the auditory system is
> actually doing that is complete speculation.

Say what?

> 3) I have, empirically speaking, never personally heard this "wobble"
> in pitch, although I can certainly convince myself of it if I try.

So what pitch do you hear when two sine waves beat? I think we know
you get a certain fuzziness when intervals are slightly out of tune.
Maybe that's part vibrato as well as tremolo. We're talking about
small differences in frequency.

Graham

🔗rick <rick_ballan@...>

5/3/2010 1:56:43 AM

--- In tuning@yahoogroups.com, Mike Battaglia <battaglia01@...> wrote:
>
> > Hi Rick,
> >
> > I suspect I am not understanding something because it sounds like you are saying a phase shift will retune a JI interval.
> > I'm a layman when it comes to things tuning - could you explain a little?
> >
> >
> > Chris
>
> Indeed it will. So will tremolo (amplitude modulation). The reason
> you're a bit confused is that although we like to talk in terms of
> things purely in the frequency domain around here, that isn't exactly
> how we perceive sound. A mixed time-frequency plot is more how we
> perceive sound.
>
> In fact, "beating" itself will also change how we perceive a note. If
> you add 440 Hz and 450 Hz together, you end up getting 445 Hz with a
> 10 Hz envelope to it. So if you have 440 Hz and you add 450 Hz to it,
> you have just changed the pitch of what you're hearing.
>
> The same concept applies when you're playing tempered intervals. The
> coinciding partials don't just beat against each other, they retune
> each other as well. Of course, it's a little bit more complicated when
> tempering gets involved, because each successive harmonic slowly
> drifts further away from its "beating" counterpart, and so we have
> more of a partial-dependent vibrato going on.
>
> -Mike

Just to add to what Mike's saying here,

the PM formula is

f(t) = sin(2piat) + sin(2pibt) =
sin[2pi(p[(a + b)/(p + q)])t + rt/(p + q)] + sin[2pi(p[(a + b)/(p + q)])t - rt/(p + q)],
where r = aq - pb.

For Mike's particular example, if we take a = 450, b = 440, p = 45 and q = 44, we get
sin(2pi440t) + sin(2pi450t) =
sin[2pi(44*[890/89]t - 0t/89] + sin[2pi(45*[890/89]t + 0t/89],

that is, r = 0 and there's no phase mod. This is because a/b = p/q giving aq = pb. If, however, we took a = 451 for example then the remainder becomes r = 44 giving

sin(2pi440t) + sin(2pi451t) =
sin[2pi(44*[891/89]t - 44t/89] + sin[2pi(45*[891/89]t + 44t/89].

Taking this is in AM form we get the interesting result 2sin(pi891t)cos(pi([891/89]t + 2*44t/89). But since 891 is just the sum, then this cos value must be equal to the AM as cos(pi(451 - 440)t). IOW, it appears that the AM's themselves are now reducible to these PM's as well and ipso facto "beating".

-Rick

>

🔗martinsj013 <martinsj@...>

5/3/2010 5:29:05 AM

--- In tuning@yahoogroups.com, Marcel de Velde <m.develde@...> wrote:
> Both Rick and I mentioned MODULATED phase shift. ...
>... but instead modulates the phase in a constant linear way, which
> results in a change of pitch that is a constant fixed new pitch.

I am confused here too.
In my understanding, a phase shift is where a constant is added to the sine's argument - e.g. wt+c instead of wt - so the pitch doesn't change. And phase modulation is where an "interesting" signal with comparatively small size is added to be "carried" by the sine wave - e.g. wt+f(t) instead of wt. Rick's formula adds only another term of the same form - wt+vt instead of wt - which just changes one steady frequency to another one. I suppose my question is, does it help to think of it as a phase modulation?

Steve M.

🔗genewardsmith <genewardsmith@...>

5/3/2010 11:47:31 AM

--- In tuning@yahoogroups.com, Graham Breed <gbreed@...> wrote:
>
> I did it with phasors.

Set on stun I hope!

🔗Mike Battaglia <battaglia01@...>

5/3/2010 1:33:32 PM

On Mon, May 3, 2010 at 4:49 AM, Graham Breed <gbreed@...> wrote:
> That formula does depend on the amplitudes being equal. When they
> aren't you have to decide how to define the frequency of the modulated
> signal. You can get a result identical to a combination of frequency
> and amplitude modulation. I did it with phasors. After all this time
> I don't remember exactly what a phasor is, but it does make the
> calculation simple to understand. However Helmholtz did it he got the
> same result as me.

Graham,

I'm moving this discussion to tuning-math, just to help keep the list
uncluttered.

-Mike

🔗martinsj013 <martinsj@...>

5/3/2010 2:06:15 PM

--- In tuning@yahoogroups.com, "rick" <rick_ballan@...> wrote:
> Taking this is in AM form we get the interesting result 2sin(pi891t)cos(pi([891/89]t + 2*44t/89). But since 891 is just the sum, then this cos value must be equal to the AM as cos(pi(451 - 440)t). IOW, it appears that the AM's themselves are now reducible to these PM's as well and ipso facto "beating".

But this is obvious: 891/89 + 2*44/89 = 979/89 = 11 = 451 - 440.
Does it help to think of it as a PM?

Steve M.

🔗rick <rick_ballan@...>

5/3/2010 10:49:18 PM

--- In tuning@yahoogroups.com, "martinsj013" <martinsj@...> wrote:
>
> --- In tuning@yahoogroups.com, "rick" <rick_ballan@> wrote:
> > Taking this is in AM form we get the interesting result 2sin(pi891t)cos(pi([891/89]t + 2*44t/89). But since 891 is just the sum, then this cos value must be equal to the AM as cos(pi(451 - 440)t). IOW, it appears that the AM's themselves are now reducible to these PM's as well and ipso facto "beating".
>
> But this is obvious: 891/89 + 2*44/89 = 979/89 = 11 = 451 - 440.
> Does it help to think of it as a PM?
>
> Steve M.
>
Actually Steve, my choice of detuning 440:450 to 451 was not so good because these are divisible by 11 and are therefore not coprime (which is a condition for what I'm saying). This is why it's obvious. b:a = 439:450 perhaps would have been better. It gives q:p = 40:41 which you can try out for yourself. However, my point was meant to demonstrate something I've always believed, that the concept of exact or approx GCD's is more fundamental than beating because intervals are dominated by the operation of division, not subtraction.

I think I've figured out the final piece of the puzzle and your approach you sent me helped a great deal. Mike wants to continue this on the tuning-math list so I'll post it there.

Rick