Debian Codegraph @

examples/soundin.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 soundin.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; by Menno Knevel 2022
12
13 sr = 44100
14 ksmps = 32
15 nchnls = 2
16 0dbfs = 1
17
18 instr 1 ; choose between mono or stereo file
19
20 ichn filenchnls p4 ;check number of channels
21 prints "\nnumber of channels = %d\n\n", ichn
22
23 if ichn == 1 then
24 asig soundin p4 ;mono signal
25 outs asig, asig
26 else ;stereo signal
27 aL, aR soundin p4
28 outs aL, aR
29 endif
30
31 endin
32 </CsInstruments>
33 <CsScore>
34
35 i 1 0 2 "drumsMlp.wav" ;mono signal
36 i 1 3 2 "drumsSlp.wav" ;stereo signal
37
38 e
39 </CsScore>
40 </CsoundSynthesizer>