Debian Codegraph @

examples/sequ1.csd

raw
1 <CsoundSynthesizer>
2
3 <CsInstruments>
4
5 ksmps = 32
6 0dbfs = 1.0
7 nchnls = 2
8
9 instr 1
10 ;; rhythm array - these steps values multiplied by tempo (ticks) in BPM
11 irhythm[] fillarray 1, 1.5, 0.5, 0.5, 0.5, 0.5, 1.5, 1
12
13 ;; instrument array - instrument number to render for each step
14 inst0[] fillarray 11, 12, 13, 14, 15, 16, 17, 18
15 inst1[] fillarray 19, 20, 21, 22, 23, 24, 25, 26
16
17 ;; note array - here in cpsmidinn - esentially the 'p4' output from opcode
18 ;; can be any sequence of values
19 inotes[] fillarray 60, 61, 62, 63, 64, 65, 66, 67
20
21 ;; variable tempo
22 kspeed line 60, p3, 180
23
24 ;; rhythm, inst, notes, bpm, length, mode, verbose
25 kSeq0 sequ irhythm, inst0, inotes, kspeed, 8
26 kSeq1 sequ irhythm, inst1, inotes, kspeed * 1.2, 8
27 endin
28
29 instr 11, 12, 13, 14, 15, 16, 17, 18
30 kl linseg 0, p3*0.01, 1, p3*.99, 0
31 a1 oscil 0.9, cpsmidinn(p4)
32 outs1 a1*kl
33 endin
34
35 instr 19, 20, 21, 22, 23, 24, 25, 26
36 kl linseg 0, p3*0.01, 1,p3*.99, 0
37 a1 oscil 0.9, cpsmidinn(p4)
38 outs2 a1*kl
39 endin
40 </CsInstruments>
41
42 <CsScore>
43 i1 0 60
44 e
45 </CsScore>
46 </CsoundSynthesizer>