Phasor~high into nyquist

ward de jager's icon

float into sig~ into mtof~ into phasor~

Value high into nyquist ( .> 200 mtof ) will stop phasor~ from working .

Christopher Dobrian's icon

If you think about it, that's reasonable behavior. At frequencies below the Nyquist frequency a phasor~ completes less than one half cycle from one sample to the next, but at the Nyquist frequency it will try its best but the best it can do is to oscillate back and forth between one value and the value that's 0.5 from that (yielding a "tone" that has frequencies only at 0Hz and at the Nyquist frequency). Say, for example, your sampling rate is 48kHz. Nyquist frequency is thus 24000. At pseudo-MIDI pitch values above about 138.232644 your mtof~ object will produce a frequency greater than the Nyquist frequency. I think the frequency inlet of the phasor~ object is limited (clipped) between ± the Nyquist frequency.

By the way, an ideal phasor, as implemented by phasor~, contains theoretically infinite overtones, so if you're listening to it directly you will hear aliasing unless your fundamental frequency is very low. If you want a sawtooth wave type of tone to listen to, I suggest saw~, which inhibits upper partials so as to avoid aliasing.

ward de jager's icon

The reason why I mentioned it is because I had a hard time debugging a kick drum patch .

The initial value of line~ was temporarily set to a way to high value .
As a result , my patch didn't produce any sound (phasor~was going into cos ~)
The phasor~ totally malfunctioned because of that .

I am aware of the uses of phasor~ and use it to drive other stuff , never as a direct sound source ( who does .? ).

The aliasing is completely expected , but should it therefore become mute when midi values are > 130 ?

Good practice to put a 'clip~ 0. 130.' before 'mtof~'

Roman Thilenius's icon

in fact a phasor at nyquist is not truly silent, because it will have a DC offset depending on the state it came into the nyqist frequency value.

you still consider it a malfunction? why?

ward de jager's icon

I guess not then