How to make phasor~ output integer
-
How to make phasor~ output integer
-
A phasor normally outputs a "smooth" ramp (stepping at the sample rate) at floating point values from 0 to 1.( 0, 0.1, 0.2, etc.). Do you want it to act like a square wave (0, 1, 0, 1, etc.) or count the integers from 0 to a number? (0, 1, 2, 3, 4, 0, 1, 2, 3, etc.)
-
You can easily quantize it to an integer number of steps:
[phasor~]
|\
| \
| [*~ n]
| |
| [wrap~]
| |
| [/~ n]
| /
[-~ ] -
You can use [expr~ int($v1*n)] where n is the maximum integer number you want to receive plus one. If n = 10 then you'll get 0 1 2 3 4 5 6 7 8 9.