2008/11/9 dan trueman <dtrueman@princeton.edu>
ok, i think i've figured this out. it's because of function overloading. when you call rate(1), it RETURNS the rate for voice 1. when you call rate(1.), it SETS the rate for voice 0 to 1. this is specified in the online doc (but i'd forgotten about it):

Ok, that makes sense but this must've changed in the last version of ChucK because previously my code did work as I intended it. I think it's a good change, BTW, it solves that question quite nicely, I like it.

You know I'm a big fan of your work on LiSa but I'd still like to say I'd appreciate it if changes like this could go in the VERSIONS text that keeps track of changes. I feel bad to critique while you spend so much hard work on LiSa but this was a bit confusing.

Right, on to the future. In the same session I wondered whether it would be possible to detect whether a specific voice was playing. I don't think we can right now. Maybe the command to make a voice play should also be a float and if it's non-zero start playback while also using the value to set .voiceGain()? that way we could use .play(int voice) to get a 0 or 1 to indicate whether the voice is currently playing.

Oh... and the bi directional looping is another one that takes a int for it's parameter. I'm not sure what to do there.

Yours,
Kas.