[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] keyDownaction



Hey all, slightly beginner question here: I'm trying to make a GUI and, using keyDownaction, make it so when I type j, for example, it will play something. I've looked at the tutorials and they don't seem to explain exactly how to add an action. An example:

w = SCWindow.new("",Rect(318, 356, 400, 400)).front
.keyDownaction{|w,f,3|{SinOsc.ar(440,0,0.5)}.play}

 Thanks in advance. Jon