# [chuck-users] phase modulation and hard sync?

Alexandre Torres Porres porres at gmail.com
Sun Jun 4 17:44:28 EDT 2017

```2017-06-04 13:59 GMT-03:00 mario.buoninfante <mario.buoninfante at gmail.com>:
>
> 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.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20170604/0db4a3cf/attachment.html>
```