Debian Codegraph @

examples/printf.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 printf.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 printf_i "Audiofile '%s' does not exist!\n", 1, Sfile
22 else
23 asig diskin2 Sfile, 1
24 outs asig, asig
25 endif
26
27 endin
28
29 </CsInstruments>
30 <CsScore>
31
32 i 1 0 3 "frox.wav";file does not exist!!!
33 i 1 + 3 "fox.wav";but this one certainly does...
34
35 e
36 </CsScore>
37 </CsoundSynthesizer>