Debian Codegraph @

iOS/Csound iOS Swift Examples/Csound iOS SwiftExamples/hardwareTest.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -o dac
4 -d
5 </CsOptions>
6 <CsInstruments>
7
8 sr = 44100
9 ksmps = 64
10 nchnls = 2
11 0dbfs = 1
12
13 instr 1
14
15 kaccelX chnget "accelerometerX"
16 kaccelY chnget "accelerometerY"
17 kaccelZ chnget "accelerometerZ"
18
19 kgyroX chnget "gyroX"
20 kgyroY chnget "gyroY"
21 kgyroZ chnget "gyroZ"
22
23 kattRoll chnget "attitudeRoll"
24 kattPitch chnget "attitudePitch"
25 kattYaw chnget "attitudeYaw"
26
27
28 kcutoff = 5000 + (4000 * kattYaw)
29 kresonance = .3 + (.3 * kattRoll)
30 kpch = 880 + (kaccelX * 220)
31
32 a1 vco2 (kattPitch + .5) * .2, kpch
33
34 a1 moogladder a1, kcutoff, kresonance
35
36 aL, aR reverbsc a1, a1, .72, 5000
37
38 outs aL, aR
39
40
41 endin
42
43 </CsInstruments>
44 <CsScore>
45 f1 0 16384 10 1
46
47 i1 0 360000
48
49 </CsScore>
50 </CsoundSynthesizer>