/* Getting Started .. Realtime Interaction: Widgets-Checkbox Open the Widgets-Panel. It contains an arrangement of checkboxes and a controller-window. The controller window is a two dimensional fader, so it sends values on two different channels. Checkboxes work similar to buttons, but keep their last state. They work very well, to turn on/off parts of an instrument. The checkbox condition can be verified while the instrument runs. This is made with the "if .. then .. endif" construct. The "if" part checks the condition. If it is , then the "then" part will be executed, if it is , it jumps directly to the endif. To find out more about the possibilities and usage of widgets, have a look into the widgets reference. (Examples->Widgets) */ sr = 44100 ksmps = 128 nchnls = 1 0dbfs = 1 instr 1 ; read checkboxes kRead invalue "read" kSound invalue "sound" kDance invalue "dance" if kRead == 1 then ; Read Point values kpoint_x invalue "point_x" kpoint_y invalue "point_y" printks "(x: %f, y: %f)%n", 0.2, kpoint_x, kpoint_y endif if kSound == 1 then ; Sound Point kpoint_x invalue "point_x" kpoint_y invalue "point_y" apoint_x interp kpoint_x ; casts both k-signals ... apoint_y interp kpoint_y ; ... to audiorate aOut oscili apoint_y, apoint_x*1000, 1 out aOut endif if kDance == 1 then ; Dance Point knew_x randomh 0, 1, 15 knew_y randomh 0, 1, 15 outvalue "point_x", knew_x outvalue "point_y", knew_y endif endin f 1 0 1024 10 1 i 1 0 3600 e ; written by Alex Hofmann (Dec. 2009) - Incontri HMT-Hannover 1013 279 563 397 true 132 162 8 point_y 30 195 318 253 {7b88d65c-1539-4552-8c37-0c566fb3c631} true 0 -3 point_x 0.00000000 1.00000000 0.00000000 1.00000000 0.61348438 0.47489458 point 7 0.00000000 jump 0 234 0 false 0 0 0 31 32 134 30 {5d76e7c2-5c54-4aa6-b637-344e10818acd} true 0 -3 left Helvetica 14 3 0 0 0 255 255 255 noborder 1 1 31 123 135 73 {a61ce639-4796-4143-9d31-67e36f6ce9d5} true 0 -3 left Lucida Grande 10 3 0 0 0 255 255 255 noborder 1 1 361 123 120 70 {85a10aea-c364-4c4e-a872-505d4d0c0776} true 0 -3 left Lucida Grande 10 3 0 0 0 255 255 255 noborder 1 1 182 124 161 64 {224f540f-525e-43d3-98b1-f5367dd76d89} true 0 -3 left Lucida Grande 10 3 0 0 0 255 255 255 noborder 1 1 361 195 183 252 {a75f9ef6-a277-4f6b-bcf7-4b3d0ddfc6fe} true 0 -3 Courier 8 0 0 0 255 255 255 30 66 514 39 {5e3f1106-b2bd-4a74-98a1-2023743bda81} true 0 -3 left Helvetica 14 3 0 0 0 255 255 255 noborder 1 1 _Play 173 32 100 30 {b8851d94-4074-488b-95f4-9cfb9d01a4aa} true 0 -3 value 1.00000000 Run Csound / i1 0 10 false false read 30 103 20 20 {15e01f48-48f0-4107-8a0d-ca8e9a9c2b5f} true 0 -3 false sound 183 103 20 20 {cfba4b21-f2fd-4235-bd00-2d1078632488} true 0 -3 false dance 360 105 20 20 {281f87bc-d138-4dbf-b70e-fc8ca1ed78ab} true 0 -3 false