Debian Codegraph @

examples/ctrl14.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac -M0 ;;;RT audio I/O with MIDI in
5 ;-iadc ;;;uncomment -iadc if RT audio input is needed too
6 </CsOptions>
7 <CsInstruments>
8
9 sr = 44100
10 ksmps = 32
11 nchnls = 2
12 0dbfs = 1
13
14 instr 1 ; expects MIDI controller input on channel 1
15 ; run and move your midi controller to see result
16
17 imax = 1
18 imin = 0
19 ichan = 1
20 ictlno = 7
21
22 initc14 1, ictlno, ictlno+1, 1 ; start at max. volume
23 kamp ctrl14 ichan, ictlno, ictlno+1, imin, imax ; controller 7
24 printk2 kamp
25 asig oscil kamp, 220, 1
26 outs asig, asig
27
28 endin
29
30 </CsInstruments>
31 <CsScore>
32 f 1 0 4096 10 1
33
34 i1 0 20
35
36 e
37 </CsScore>
38 </CsoundSynthesizer>
39