phasor issue

    Dec 20 2013 | 1:38 am
    hi thee,
    why would I get a [nan] in my float from the output of a phasor? It starts off working ok, but after changing some parameters in the patch it starts to output the nan.
    I'm using phasor to control playback of the loop in grainstretch~. phasor controls set position message so i can create loops from waveform~, it also sends line message back to waveform~ to display position.
    I keep getting a nan from the output of the phasor after stopping sample, then going back to play again...
    here's the phas subpatch part of the main patch also attaching a tif of the problem
    any help appreciated

    • Dec 22 2013 | 11:23 am
      Hi Drew,
      I don't think I ever had any problems with phasor~ sending out NaNs. I'm not able to reproduce your problem with the patch you joined either. Your description of the problem is not precise enough: which part of the patch is producing the NaN? Is the number~ already sending out NaNs? When does it happen? For which values of the parameters?
      The only thing that I see in your patch that could produce a NaN is the division above the phasor~: if you divide by 0 (size=0), then normally you should get an +/- Inf at the output of the divisor. But in this case, I would not be astonished that you get NaNs there sometimes.
      Also, if I were you I would not use the second outlet of number~ to convert signal to control, as you cannot really control when it happens (you can only control the interval). If you really need to control your granular synthesizer with non-signal values as grainstretch~ needs, you should consider using objects like snapshot~: basically it does what the second output of number~ does, but now you can control when.
    • Dec 22 2013 | 10:37 pm
      thanks alexis
      your right, the patch itself doesn't produce the problem, it's only when used with the sampler patch. Not sure why yet.
      The complete patch is too big to attach here, but I could dropbox, or even email to you n case you were interested in looking
    • Dec 23 2013 | 12:33 am
      i think the problem, is when sample loads speed is set to 0 and that means phasor~ sends NaN. The thing is when you adjust speed from 0 it won't start phasor again, just stays stuck on NaN.
      I there any way to reset phasor or to trigger to start again or stop NaN symbol?
      and I have managed to attach,