;Written by Iain McCurdy, 2009 ;Modified for QuteCsound by René, February 2011 ;Tested on Ubuntu 10.04 with csound-float 5.13.0 and QuteCsound svn rev 817 ;Notes on modifications from original csd: ;my flags on Ubuntu: -odac -b1024 -B2048 -+rtaudio=alsa -+rtmidi=null -m0 sr = 44100 ;SAMPLE RATE ksmps = 16 ;NUMBER OF AUDIO SAMPLES IN EACH CONTROL CYCLE nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO) instr 1 ;ALWAYS ON - SEE SCORE ktrig metro 10 if (ktrig == 1) then gkinput invalue "Input" gkmin invalue "Minimum" gkmax invalue "Maximum" gkmode invalue "Mode" endif ktrigger changed gkinput ;GENERATE A MOMENTARY '1' PULSE IN OUTPUT 'ktrigger' IF gkinput CHANGES (gkoutput SLIDER WILL BE UPDATED) if gkmode=0 then ;IF MODE 0 (limit) IS SELECTED.. koutput limit gkinput, gkmin, gkmax ;APPLY 'limit' TO gkinput VALUES elseif gkmode=1 then ;IF MODE 1 (mirror) IS SELECTED.. koutput mirror gkinput, gkmin, gkmax ;APPLY 'mirror' TO gkinput VALUES else ;IF MODE 2 (wrap) IS SELECTED.. koutput wrap gkinput, gkmin, gkmax ;APPLY 'wrap' TO gkinput VALUES endif ;END OF CONDITIONAL BRANCHING if ktrigger = 1 then outvalue "Output", koutput ;UPDATE gkoutput SLIDER endif endin i 1 0 3600 ;INSTRUMENT 1 PLAYS FOR 1 HOUR 770 326 1034 302 true 241 226 185 516 2 515 300 {aa607456-d368-4d59-8497-d16d608404c3} true 0 0 center Liberation Sans 18 3 255 255 255 5 27 150 border 5 2 520 21 510 277 {e41f02b8-6ad4-46dc-805c-0b2eeafbd476} true 0 0 left Liberation Sans 14 3 255 255 255 255 255 255 noborder 1 1 2 2 514 300 {049f4dd4-ff71-4d6d-9157-43c84efad8a4} true 0 0 center Liberation Sans 18 3 255 255 255 5 27 150 border 5 2 9 125 200 30 {3ebc1139-1fdb-48dc-9150-49ee8dfdbd4a} true 0 0 left Liberation Sans 10 3 255 255 255 255 255 255 noborder 1 1 Minimum 449 125 60 30 {e54486c5-f9aa-4d0e-9a67-6506dae3c790} true 0 0 right Liberation Sans 9 3 255 255 255 255 255 255 noborder 1 1 9 72 200 30 {78a7e9cd-fb57-421c-8e1f-40b60a90dfc0} true 0 0 left Liberation Sans 10 3 255 255 255 255 255 255 noborder 1 1 Input 9 49 500 27 {4b5d3fba-55d0-43d1-a94a-457bc9144a31} true 0 0 -2.00000000 2.00000000 -0.20800000 lin continuous -1.00000000 false Input 449 72 60 30 {58265963-6245-459e-8071-9ed8bba850a4} true 0 0 right Liberation Sans 9 3 255 255 255 255 255 255 noborder 1 1 9 231 200 30 {1c02d7bd-4198-417f-a816-a560f4133e23} true 0 0 left Liberation Sans 10 3 255 255 255 255 255 255 noborder 1 1 Output 449 231 60 30 {8341c14a-4acb-4d3d-824f-675147975768} true 0 0 right Liberation Sans 9 3 255 255 255 255 255 255 noborder 1 1 9 178 200 30 {fd3ea893-7f4f-4d74-a6c6-2ed00b696056} true 0 0 left Liberation Sans 10 3 255 255 255 255 255 255 noborder 1 1 Maximum 449 178 60 30 {78473677-bb47-45c2-bf88-fa6930dca759} true 0 0 right Liberation Sans 9 3 255 255 255 255 255 255 noborder 1 1 Mode 252 256 100 30 {f695c468-f468-4eca-a7df-bd7d79c39231} true 0 0 limit 0 mirror 1 wrap 2 2 false Minimum 9 102 500 25 {35864613-8f38-4d4d-96f5-a90fb9ac2055} true 0 0 -2.00000000 2.00000000 0.00000000 1.00000000 -1.29600000 0.00000000 fill 1 0.00000000 jump 255 255 0 false 0 0 0 Maximum 9 154 500 25 {21f5b62d-c5f7-4db9-ad0e-3be2406df1fa} true 0 0 -2.00000000 2.00000000 0.00000000 1.00000000 0.99200000 0.00000000 llif 1 0.00000000 jump 255 255 0 false 0 0 0 Output 9 206 500 25 {1a825598-2c67-45de-a655-a35148350306} true 0 0 -2.00000000 2.00000000 0.00000000 1.00000000 -0.20800000 0.00000000 line 1 0.00000000 jump 0 255 0 false 0 0 0