Debian Codegraph @

examples/partikkelgetset.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out
5 -odac ;;;RT audio
6 ; For Non-realtime ouput leave only the line below:
7 -o partikkel-getset.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 nchnls = 2
12 0dbfs = 1
13
14 giSine ftgen 0, 0, 65536, 10, 1
15 giCosine ftgen 0, 0, 8192, 9, 1, 1, 90
16 giSigmoRise ftgen 0, 0, 8193, 19, 0.5, 1, 270, 1
17 giSigmoFall ftgen 0, 0, 8193, 19, 0.5, 1, 90, 1
18
19 instr 1
20
21 ; freqstart masking table, simple ascending semitones pattern
22 iwavfreqstarttab ftgentmp 0, 0, 32, -2, 0, 11,
23 semitone(0), semitone(1), semitone(2), semitone(3),
24 semitone(4), semitone(5), semitone(6), semitone(7),
25 semitone(8), semitone(9), semitone(10), semitone(11)
26
27 iwavfreqendtab ftgentmp 0, 0, 32, -2, 0, 11,
28 semitone(0), semitone(1), semitone(2), semitone(3),
29 semitone(4), semitone(5), semitone(6), semitone(7),
30 semitone(8), semitone(9), semitone(10), semitone(11)
31
32 ; channel masking table, simple panning back and forth
33 ichannelmasks ftgentmp 0, 0, 32, -2, 0, 7, 0.0, 0.25, 0.5, 0.75, 1.0, 0.75, 0.5, 0.25
34
35 ; init unused arate signals
36 awavfm = 0
37 asamplepos1 = 0
38 async = 0
39
40 ; system
41 id = 1
42
43 a1,a2 partikkel 6, 0, -1, async, 0, -1, giSigmoRise, giSigmoFall,
44 0.9, 0.5, 100, ampdbfs(-9), -1, 1, 0,iwavfreqstarttab, iwavfreqendtab, awavfm,
45 -1, -1, giCosine, 1, 1, 1, ichannelmasks, 0,
46 giSine, giSine, giSine, giSine,
47 -1, asamplepos1, asamplepos1, asamplepos1, asamplepos1,
48 440, 440, 440, 440, 100, id
49
50 outch 1, a1, 2, a2
51
52 ; using partikkelget and partikkelset to make the channelmask and freqmask indices
53 ; interact to create a more complex pattern
54 kfqmask partikkelget 1, id
55 kchmask partikkelget 4, id
56 kcount1 init 0
57 kcount2 init 0
58 if kchmask > (kfqmask+kchmask)%11 then
59 partikkelset 1, kcount1, id
60 partikkelset 2, kcount1, id
61 kcount1 = (kcount1+1)%7
62 elseif kfqmask > (kfqmask*kchmask)%7 then
63 partikkelset 4, kcount2, id
64 kcount2 = (kcount2+kcount1)%6
65 endif
66
67 endin
68
69 </CsInstruments>
70 <CsScore>
71 i1 0 30
72 </CsScore>
73 </CsoundSynthesizer>