Debian Codegraph @

src/Examples/FLOSS Manual Examples/03 Csound Language/03B08_Local_audio_add.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -o dac
4 </CsOptions>
5 <CsInstruments>
6 sr = 44100
7 ksmps = 4410; very high because of printing
8 ;(change to 441 to see the difference)
9 nchnls = 2
10 0dbfs = 1
11
12 instr 1
13 ;initialize a general audio variable
14 aSum init 0
15 ;produce a sine signal (change frequency to 401 to see the difference)
16 aAdd oscils .1, 400, 0
17 ;add it to the general audio (= the previous vector)
18 aSum = aSum + aAdd
19 kmax max_k aSum, 1, 1; calculate maximum
20 printk 0, kmax; print it out
21 outs aSum, aSum
22 endin
23
24 </CsInstruments>
25 <CsScore>
26 i 1 0 1
27 </CsScore>
28 </CsoundSynthesizer>
29 ;example by joachim heintz