<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-06-04 13:59 GMT-03:00 mario.buoninfante <span dir="ltr">&lt;<a href="mailto:mario.buoninfante@gmail.com" target="_blank">mario.buoninfante@gmail.com</a>&gt;</span>:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="ltr">
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.</p></blockquote><div>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.</div><div><br></div><div>







<p class="gmail-p1">Phasor<span class="gmail-s1"> p =&gt; </span>SinOsc<span class="gmail-s1"> osc =&gt; </span><span class="gmail-s2">dac</span><span class="gmail-s1">;</span></p>
<p class="gmail-p2"><span class="gmail-s3">440</span><span class="gmail-s1"> </span>=&gt;<span class="gmail-s1"> </span>p.freq;</p>
<p class="gmail-p2"><span class="gmail-s3">1</span><span class="gmail-s1"> </span>=&gt;<span class="gmail-s1"> </span>osc.sync;</p>
<p class="gmail-p3"><span class="gmail-s3">4</span><span class="gmail-s1">::</span>second<span class="gmail-s1"> =&gt; </span>now<span class="gmail-s1">;</span></p></div><div><br></div><div>In this case, you get a sine wave and you don&#39;t need to multiply the phasor by 2pi, because the input is normalized, from 0-1<br></div><div><br></div><div><br></div><div>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. </div><div><br></div><div>I&#39;m not challenging the math or equations, just adding an implementation detail in Chuck code. I know I wasn&#39;t clear about it, sorry. Hope it&#39;s clear now. </div><div><br></div><div>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&#39;d get with phase modulation. But there&#39;s another detail missing if you&#39;re to really convert it.<br></div><div><br></div><div>One thing about this conversion is that the waveform/function of the modulation signal needs to also be adjusted. <span style="font-size:12.8px">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. </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">With other waveforms it gets more complicated. By the way, t</span>he rule of thumb (multiply the index by the frequency) also changes, that is important to note as well.</div><div><br></div><div>My main point is just that it&#39;s just best to implement via phase modulation, if that&#39;s the behaviour you want.</div><div><br></div><div>cheers</div></div></div></div>