Re: [chuck-users] phase modulation and hard sync?
Hi Alexandre,
No worries, I know it's not a challange ;) . Btw for sure, what I tried to say wasn't clear. The implementation I sent you is a Phase Modulation, not a Frequency Modulation. You can have a PM also if you don't use SinOsc with sync(2), you're still changing the phase and not the frequency using my ChucK program.
The last thing, the example you sent before, with a Phasor controlling the phase, also in that case ModInd doesn't need any 2pi, cause when you said the phase in SinOsc is normalized (from 0 to 1), it means there is a 2pi in there.
But it's ok, if I get it right, you simply wanna have PM with that specific configuration, Phasor and SinOsc with sync(2).
Cheers,
Mario
Sent from my Wiko ROBBYOn Jun 4, 2017 22:44, Alexandre Torres Porres
2017-06-04 13:59 GMT-03:00 mario.buoninfante
: Now 2pi is needed only if you deal with a ramp, with a phasor. Cause Phasor*2pi gives you a sine. If you already have a sine there is no need to use 2pi.
Hi, let me try to be clearer. Phasor * 2pi going through a sine function gives you a sine wave. SinOsc can also be drive by a Phasor. Such as this.
Phasor p => SinOsc osc => dac;
440 => p.freq;
1 => osc.sync;
4::second => now;
In this case, you get a sine wave and you don't need to multiply the phasor by 2pi, because the input is normalized, from 0-1
What I was trying to say is that if you have a modulating index in phase modulation, and you want to replicate it in frequency modulation, you alsop need to multiply it by 2pi.
I'm not challenging the math or equations, just adding an implementation detail in Chuck code. I know I wasn't clear about it, sorry. Hope it's clear now.
But my main point was something else. It is true that if you multiply the index value by the modulation frequency value, such as in your code, you sort of get a similar behaviour than you'd get with phase modulation. But there's another detail missing if you're to really convert it.
One thing about this conversion is that the waveform/function of the modulation signal needs to also be adjusted. In terms of sine waves, if you have the phase signal being modulated by a sine wave, you need to modulate the frequency with a cosine wave.
With other waveforms it gets more complicated. By the way, the rule of thumb (multiply the index by the frequency) also changes, that is important to note as well.
My main point is just that it's just best to implement via phase modulation, if that's the behaviour you want.
cheers
participants (1)
-
mario.buoninfante