Debian Codegraph @

examples/monitor.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 monitor.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 giSine ftgen 0, 0, 2^10, 10, 1
17
18 instr 1
19
20 asig poscil3 .5, 880, giSine
21 ;write a raw file: 32 bits with header
22 fout "fout_880.wav", 15, asig
23 outs asig, asig
24
25 endin
26
27 instr 2
28
29 klfo lfo 1, 2, 0
30 asig poscil3 .5*klfo, 220, giSine
31 ;write an aiff file: 32 bits with header
32 fout "fout_aif.aiff", 25, asig
33 ; fout "fout_all3.wav", 14, asig
34 outs asig, asig
35
36 endin
37
38 instr 99 ;read the stereo csound output buffer
39
40 allL, allR monitor
41 ;write the output of csound to an audio file
42 ;to a wav file: 16 bits with header
43 fout "fout_all.wav", 14, allL, allR
44
45 endin
46 </CsInstruments>
47 <CsScore>
48
49 i 1 0 2
50 i 2 0 3
51 i 99 0 3
52 e
53 </CsScore>
54 </CsoundSynthesizer>