Debian Codegraph @

examples/qinf.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -+rtaudio=alsa -o dac:hw:0
4 </CsOptions>
5 <CsInstruments>
6 nchnls = 2
7 ksmps = 400
8
9 #define WII_B #3#
10 #define WII_A #4#
11 #define WII_R_A #304#
12 #define WII_PITCH #20#
13 #define WII_ROLL #21#
14
15 gkcnt init 1
16
17 instr 1
18 i1 wiiconnect 3,1
19
20 wiirange $WII_PITCH., -20, 0
21 kt wiidata $WII_B.
22 ka wiidata $WII_A.
23 kra wiidata $WII_R_A.
24 gka wiidata $WII_PITCH.
25 gkp wiidata $WII_ROLL.
26 ; If the B (trigger) button is pressed then activate a note
27 if (kt==0) goto ee
28 if (qinf(gka)) goto ee
29 if (qinf(gkp)) goto ee
30 event "i", 2, 0, 5
31 gkcnt = gkcnt + 1
32 printk2 kb
33 endin
34
35 instr 2
36 a1 oscil ampdbfs(gka), 440+gkp, 1
37 outs a1, a1
38 endin
39
40 </CsInstruments>
41
42 <CsScore>
43 f1 0 4096 10 1
44 i1 0 300
45
46 </CsScore>
47
48 </CsoundSynthesizer>