;Written by Iain McCurdy, 2006 ;Modified for QuteCsound by René, September 2010, updated Feb 2011 ;Tested on Ubuntu 10.04 with csound-float 5.13.0 and QuteCsound svn rev 817 ;Notes on modifications from original csd: ; Add table(s) for exp slider ; Add Browser for audio file and use of FilePlay2 udo, now accept mono or stereo wav files ;my flags on Ubuntu: -iadc -odac -b1024 -B2048 -+rtaudio=alsa -+rtmidi=null -m0 --env:SSDIR+=../../SourceMaterials sr = 44100 ;SAMPLE RATE ksmps = 32 ;NUMBER OF AUDIO SAMPLES IN EACH CONTROL CYCLE nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO) ;TABLE FOR EXP SLIDER giExp1 ftgen 0, 0, 129, -25, 0, 0.001, 128, 1.0 opcode FilePlay2, aa, Skoo ; Credit to Joachim Heintz ;gives stereo output regardless your soundfile is mono or stereo Sfil, kspeed, iskip, iloop xin ichn filenchnls Sfil if ichn == 1 then aL diskin2 Sfil, kspeed, iskip, iloop aR = aL else aL, aR diskin2 Sfil, kspeed, iskip, iloop endif xout aL, aR endop instr 1 ;GUI ktrig metro 10 if (ktrig == 1) then gkpregain invalue "Pregain" ;init 10.0 kpostgain invalue "Postgain" ;init .4 gkpostgain tablei kpostgain, giExp1, 1 outvalue "Postgain_Value", gkpostgain ;init 0.4 gkshape1 invalue "Shape1" ;init 0 gkshape2 invalue "Shape2" ;init 0 endif endin instr 2 Sfile invalue "_Browse1" asigL, asigR FilePlay2 Sfile, 1, 0, 1 ;AUDIO SIGNAL READ FROM DISC adistortL distort1 asigL, gkpregain, gkpostgain, gkshape1, gkshape2 ;CREATE 'distort1' SIGNAL adistortR distort1 asigR, gkpregain, gkpostgain, gkshape1, gkshape2 ;CREATE 'distort1' SIGNAL outs adistortL, adistortR ;SEND AUDIO TO OUTPUTS endin ;INSTR | START | DURATION i 1 0 3600 ;GUI 72 179 890 356 true 241 226 185 2 2 515 300 {aa607456-d368-4d59-8497-d16d608404c3} true 0 0 center Liberation Sans 18 3 0 0 0 158 220 158 border 5 2 Pregain 10 69 500 27 {de47f47d-bcea-4c1c-ab4b-a323452b1f7e} true 0 0 0.00000000 100.00000000 49.80000000 lin continuous -1.00000000 false 10 86 100 30 {0200a063-5db8-4668-bc2d-2d989a083f6e} true 0 0 left Arial 10 3 0 0 0 255 255 255 noborder 1 1 Pregain 450 86 60 30 {ab191e3a-430d-4f1d-88aa-9840342cd2d3} true 0 0 right Arial 9 3 0 0 0 255 255 255 noborder 1 1 518 2 363 300 {74928ed2-b701-4668-9a11-74763d317e9b} true 0 0 center Liberation Sans 18 3 0 0 0 158 220 158 border 5 2 522 20 357 277 {d4bdb5ce-87d8-4c8c-9c64-40ec2eed6f5a} true 0 0 left Liberation Sans 14 3 0 0 0 255 255 255 noborder 1 1 10 126 100 30 {6d8d92f5-813d-4e91-867e-f3384b0baf9d} true 0 0 left Arial 10 3 0 0 0 255 255 255 noborder 1 1 Postgain 10 109 500 27 {8fbaf396-5ad3-4de9-b5fe-cf9991b23868} true 0 0 0.00000000 1.00000000 0.65000000 lin continuous -1.00000000 false Postgain_Value 450 126 60 30 {0a5ba1c3-3448-4200-9a48-c116a64fc284} true 0 0 right Arial 9 3 0 0 0 255 255 255 noborder 1 1 8 8 100 29 {24979132-c53f-4414-ac6b-6b4f503ecfe8} true 0 0 event 1.00000000 On / Off / i 2 0 -1 true false Shape2 450 208 60 30 {d17cef64-754f-4c35-8b5d-8aacd44a67ac} true 0 0 right Arial 9 3 0 0 0 255 255 255 noborder 1 1 10 208 120 30 {9deb9ba2-a5d6-4275-95ec-5d611d2d8a3c} true 0 0 left Arial 10 3 0 0 0 255 255 255 noborder 1 1 Shape2 10 191 500 27 {1cc8abab-d4c4-4e67-8bb5-ecff7667fe2e} true 0 0 0.00000000 1.00000000 0.65600000 lin continuous -1.00000000 false Shape1 10 150 500 27 {70eb07ae-f0d6-4a8b-ab44-ee30cba19126} true 0 0 0.00000000 1.00000000 0.43000000 lin continuous -1.00000000 false 10 167 120 30 {128e3075-bd47-45ae-a3fe-005e5dc3a2df} true 0 0 left Arial 10 3 0 0 0 255 255 255 noborder 1 1 Shape1 451 167 59 30 {a4ac66b2-e107-421a-8b74-62ccff69421c} true 0 0 right Arial 9 3 0 0 0 255 255 255 noborder 1 1 _Browse1 10 242 170 30 {b0100cc5-8ee3-47da-8ddf-65d7b477262b} true 0 0 value 1.00000000 /media/jh/61b896a3-f371-4f01-8429-8ab6a56dd7a2/home/jh/Joachim/Stuecke/40scp/samples/edge.aif Browse Audio File / false false _Browse1 181 243 330 28 {7bb32984-d707-48f1-bed5-b67e32d7373f} true 0 0 left Arial 10 3 0 0 0 35 35 35 nobackground 181 271 330 30 {a63909ac-6fa4-41c8-a84b-ba08e76132ab} true 0 0 left Liberation Sans 12 3 0 0 0 255 255 255 noborder 1 1