Debian Codegraph @

examples/tabsum.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;realtime audio out
5 ; For Non-realtime ouput leave only the line below:
6 ; -o tab.wav -W ;;; for file output any platform
7 </CsOptions>
8 <CsInstruments>
9
10 sr = 44100
11 ksmps = 2205
12 nchnls = 1
13 0dbfs = 1
14
15 instr 1 ;;; Give a value to the increment
16 kmax = 256
17 knorm tabsum 1, 0, kmax
18 gkinc = knorm/10
19 endin
20
21 instr 2
22 kmax = 256
23 kx = rnd(kmax)
24 krnd tabsum 1, 0, kx
25 knorm tabsum 1, 0, kmax
26 kvar = krnd / knorm ;;; now n [0,1] range
27 asig oscil kvar, p4, 2
28 out asig
29 ;;; Make randomness give 1 more often
30 kc tab 0, 1
31 tablew kc+gkinc, 0, 1
32 endin
33 </CsInstruments>
34
35 <CsScore>
36 f1 0 256 21 1
37 f2 0 4096 10 1
38 i1 0 0.1
39 i2 0.1 3 440
40 e
41
42 </CsScore>
43
44 </CsoundSynthesizer>