cycle~, cos~ PM vs FM

    Nov 21 2009 | 9:26 pm
    it seems that when I do phase modulation rather than frequency modulation with cycle~, spectroscope~ shows some distortion. I can't hear it but this distortion definitely isn't in the display when using frequency modulation. Strangely it's even worse with cos~. can anyone explain what I'm seeing? might it be because internally cycle uses a 64-bit phase increment?

    • Nov 22 2009 | 12:00 am
      With the PM side of your patch, the [*~ 15) (mod index) is causing the min-max range of phasor to be -15 to 16 instead of 0 to 1. I'm having trouble trying to explain my thoughts on this as it's pretty late, and I'm admittedly getting confused thinking about it....
      I'm not 100% sure what the PM bit of your patch is actually doing to cycle, but it doesn't seem to be modulating the phase in the right way to make it directly comparable to FM. (I'm a little out of my depth here, still a synthesis beginner). But this patch works and produces the same results for both FM and PM.
      Could it be that the artifacts in the PM section of your patch are sidebands of some kind rather than distortion?
    • Nov 22 2009 | 12:18 am
      the phase inlet of cycle~ wraps its phase - so 1.2 = 0.2 etc
      your patch is actually just two examples of FM, the one on the right uses an external phasor.
    • Nov 22 2009 | 1:21 am
      oli larkin wrote on Sat, 21 November 2009 14:26it might it be because internally cycle uses a 64-bit phase increment?
      It could potentially be a variety of precision issues.
      cos~ is pretty awful - I'm not sure what it does internally, but it doesn't give very accurate results - I assume it is doing a cos estimate (not a full 32 bit float accurate estimate that is). cosx~ is more accurate (probably a straight call to the math.h function) but you'll need to convert to radians and of course it costs more. 64 bit phase incrementing is another possible source or error, although in my experience it's more important to increment in 64 bit than it is to use the full 64 bit value in the interpolation process (which you're still doing here, because the phasor~ will increment in 64 bit precision.
      I'm able to do a little better using cosx~ and jkc's hi res objects (you can downlad them from the share pages (but it's not perfect if you zoom in).
      Hope this helps,