Debian Codegraph @

examples/filevalid.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;realtime audio out
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ;-o filevalid.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 nchnls = 2
14 0dbfs = 1
15
16 instr 1
17 Sfile strget p4
18 ivld filevalid Sfile
19
20 if ivld>0 then
21 asig diskin2 Sfile, 1
22 outs asig, asig
23 else
24 printf_i "Audiofile '%s' does not exist!\n", 1, Sfile
25 endif
26 endin
27
28 </CsInstruments>
29 <CsScore>
30
31 i 1 0 3 "frox.wav";file does not exist!!!
32 i 1 + 3 "fox.wav" ;but this one certainly does...
33
34 e
35 </CsScore>
36 </CsoundSynthesizer>