This blog has moved

This blog is now at http://www.celesteh.com/blog

Saturday 4 December 2004

Most annoying bug ever

SuperCollider does not reliably convert floats to integers even when you ask nicely. sure, it rounds for you. but does the type change? nooooo. can you use it as an array index? noooo. does this cause my code to fail in impossible to fix ways? yes. does it cause unreasonable levels of frustration? you bet. Has this been fixed in between the version where i noticed the bug (from september) and yesterday's version? nooooo.

grrrrrrrrr

update work around: when you do float.floor or float.ceil, put an asInt at the end: float.floor.asInt float.ceil.asInt .

1 comment:

Jesse Pearlman Karlsberg said...

ahh, nice simple workaround. i just discovered .round(aNumber) which rounds to the nearest multiple of the specified number, rather than rounding up or down by default.

i like supercollider. i don't know why i stayed away from it for so long.

Commission Music

Commission Music
Bespoke Noise!!