Debian Codegraph @

examples/ATSaddnz-2.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -odac -d -m1
4 </CsOptions>
5 <CsInstruments>
6 ;example by joachim heintz (& Menno Knevel)
7 sr = 44100
8 ksmps = 32
9 nchnls = 2
10 0dbfs = 1
11
12 ;ATSA wants a mono file!
13 ires system_i 1,{{ atsa -h.1 -c1 fox.wav fox.ats }} ; only 1 cycle and small hop size
14
15 instr AllTheNoise
16 Sfile = "fox.ats"
17 prints "Resynthesizing with all the noise.\n"
18 iDur ATSinfo Sfile, 7
19 p3 = iDur
20 ktime line 0, iDur, iDur
21 asig ATSaddnz ktime, Sfile, 25
22 outs asig, asig
23
24 ;start next instr
25 event_i "i", "NoiseInBandsOfFive", iDur+1, 1, 0
26 endin
27
28 instr NoiseInBandsOfFive
29 Sfile = "fox.ats"
30 prints "Resynthesizing with noise bands %d - %d.\n", p4, p4+5
31 iDur ATSinfo Sfile, 7
32 p3 = iDur
33 ktime line 0, iDur, iDur
34 asig ATSaddnz ktime, Sfile, 5, p4
35 outs asig, asig
36
37 ;start next instr
38 if p4 < 20 then
39 event_i "i", "NoiseInBandsOfFive", iDur+1, 1, p4+5
40 endif
41 endin
42 </CsInstruments>
43 <CsScore>
44 i "AllTheNoise" 0 1
45 e 25
46 </CsScore>
47 </CsoundSynthesizer>