Debian Codegraph @

src/Examples/FLOSS Manual Examples/04 Sound Synthesis/04A03_AddSynth_GEN.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -o dac
4 </CsOptions>
5 <CsInstruments>
6 sr = 44100
7 ksmps = 32
8 nchnls = 2
9 0dbfs = 1
10
11 giSine ftgen 0, 0, 2^10, 10, 1
12 giHarm ftgen 1, 0, 2^12, 10, 1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8
13 giNois ftgen 2, 0, 2^12, 9, 100,1,0, 102,1/2,0, 110,1/3,0, \
14 123,1/4,0, 126,1/5,0, 131,1/6,0, 139,1/7,0, 141,1/8,0
15
16 instr 1
17 iBasFreq = cpspch(p4)
18 iTabFreq = p7 ;base frequency of the table
19 iBasFreq = iBasFreq / iTabFreq
20 iBaseAmp = ampdb(p5)
21 iFtNum = p6
22 aOsc poscil iBaseAmp, iBasFreq, iFtNum
23 aEnv linen aOsc, p3/4, p3, p3/4
24 outs aEnv, aEnv
25 endin
26
27 </CsInstruments>
28 <CsScore>
29 ; pch amp table table base (Hz)
30 i 1 0 5 8.00 -10 1 1
31 i . 3 5 9.00 -14 . .
32 i . 5 8 9.02 -12 . .
33 i . 6 9 7.01 -12 . .
34 i . 7 10 6.00 -10 . .
35 s
36 i 1 0 5 8.00 -10 2 100
37 i . 3 5 9.00 -14 . .
38 i . 5 8 9.02 -12 . .
39 i . 6 9 7.01 -12 . .
40 i . 7 10 6.00 -10 . .
41 </CsScore>
42 </CsoundSynthesizer>
43 ;example by Andrés Cabrera and Joachim Heintz