[chuck-users] Hello and a cool snippet (crash)
operagasten at gmail.com
Sun Jul 22 19:02:24 EDT 2007
I've been playing a little with ChucK for the past few days and I'm
really enjoying it. After finally figuring out how to modulate a
sinosc's frequency (that one really needs documentation!), I though I
were ready for som Hid action. It were actually much easier to set it up
than I thought - but still a bit harder than I would like (probably due
to the lack of documentation).
Well, I successfully miss-used the program and got a couple of different
crashes (woo!). I think the following is cool.
SinOsc s => Gain g => dac;
SinOsc lfo => blackhole;
1.0 => lfo.freq;
300 => lfo.gain;
0.4 => g.gain;
// which mouse
0 => int device;
// hid objects
if( !hi.openMouse( device ) ) me.exit();
<<< "mouse '",hi.name(), "' ready...", "" >>>;
hi => now;
lfo.last() * (msg.deltaX-msg.deltaY) => s.freq; //rubbie!
Try changing the msg.deltaX-msg.deltaY to msg.deltaX*msg.deltaY or
msg.deltaX/msg.deltaY for the crashes. Bug? This might be
By the way, isn't msg.deltaX and Y pretty inconsistent from the rest of
the API? shouldn't it be msg.deltaX()?
Well, Thanks for a great tool!
More information about the chuck-users