;Writen by Iain McCurdy, 2006
; 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:
; Add Browser for audio file and use of FilePlay2 udo, now accept mono or stereo wav files
;my flags on Ubuntu: -dm0 -odac -+rtaudio=alsa -b1024 -B2048 -+rtmidi=alsa -Ma
--env:SSDIR+=../../SourceMaterials
sr = 44100 ;SAMPLE RATE
ksmps = 16 ;NUMBER OF AUDIO SAMPLES IN EACH CONTROL CYCLE
nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO)
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
Sfile invalue "_Browse"
iporttime = .01
kporttime linseg 0, .001, iporttime, 1, iporttime
kbend pchbend 0, 2 ;PITCH BEND VARIABLE (IN oct FORMAT)
kbend portk kbend, kporttime
asigL, asigR FilePlay2 Sfile, kbend, 0, 1
outs asigL, asigR
endin
f 0 86400 ;ALLOWS REALTIME MIDI PLAYING FOR 1 DAY
740
414
520
240
true
170
170
170
2
2
512
233
{aa607456-d368-4d59-8497-d16d608404c3}
true
0
0
center
Liberation Sans
18
3
0
0
0
244
248
200
border
5
2
8
17
500
160
{d4bdb5ce-87d8-4c8c-9c64-40ec2eed6f5a}
true
0
0
left
Liberation Sans
14
3
0
0
0
255
255
255
noborder
1
1
_Browse
8
195
170
30
{b9431a61-61f7-432b-bf6f-c47ddc7f9050}
true
0
0
value
1.00000000
AndItsAll.wav
Browse Audio File
/
false
false
_Browse
179
196
325
28
{68b5f90b-b78e-4581-b434-232db5f4c40f}
true
0
0
left
Liberation Sans
10
3
0
0
0
229
229
229
nobackground
8
174
150
30
{936f6eb0-5225-4bd7-a5fe-a49df1c9c5ac}
true
0
0
left
Liberation Sans
10
3
0
0
0
255
255
255
noborder
1
1