I would like to know how can I round a float number.
Becase I use fiddle~ and I would like to round the outpout frequency so it don't change all the time ....
thanks
Round a float number
I would like to know how can I round a float number.
Becase I use fiddle~ and I would like to round the outpout frequency so it don't change all the time ....
thanks
[int] will help you here. You might like to think about [average] if you just want to stop the jitter but still allow the signal to track frequency smoothly without jumps. For low frequencies a jump between two integer values isn't a problem, but for higher frequencies, the difference between 880 and 881Hz for example, that's a big jump perceptually.
Use the Source.
OK obi. i'll do the trick.
May the Source be with you
I think the opposite is right: the perceptual difference between 880 and 881 Hz is smaller than the difference between lets say 100 and 101 Hz.
if you want to round, rather than truncate, make sure to precede [int] with a [+ .4999]
any technology distinguishable from magic
is insufficiently advanced.
Thanks so much for this! I just used this post to solve a problem that I was stuck on! Now I can continue my project, hooray!
Thanks, this was helpful.
In my case I had to add 0.5 though...
Oops! Looks like something went wrong!