kr button inum kr checkbox inum
Sense on-screen controls. Requires Winsound or TCL/TK.
inum – the number of the button or checkbox. If it does not exist, it is made on-screen at initialization.
If the button has been pushed since the last k-period, then return 1, otherwise return 0. If the checkbox is set (pushed) then return 1, if not, return 0.
Increase pitch while a checkbox is set, and extend duration for each push of a button.
instr 1 kcps = cpsoct(p5) k1 check 1 if (k1 == 1) kcps = kcps * 1.1 a1 oscil p4, kcps, 1 out a1 k2 button 1 if (k2 == 1) p3 = p3 + 0.1 endin
University of Bath, Codemist. Ltd.
New in Csound version 4.08