[chuck-users] LiSa .rate() issue (bug)

Kassen signal.automatique at gmail.com
Sun Nov 9 10:30:50 EST 2008

2008/11/9 dan trueman <dtrueman at 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20081109/0df67899/attachment.html>

More information about the chuck-users mailing list