Debian Codegraph @

examples/pchtom.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 </CsOptions>
4 <CsInstruments>
5
6 sr = 44100
7 ksmps = 128
8 nchnls = 2
9 0dbfs = 1.0
10
11 ; Show some conversions, both at i- and at k-time
12
13 instr 1
14 imidi = pchtom(8.09)
15 print imidi
16
17 kidx init 0
18
19 kpch = 8 + kidx / 100
20 kmidi = pchtom(kpch)
21 kidx += 1
22 printf "kpch: %f kmidi: %f\n", kidx+1, kpch, kmidi
23
24 if kidx >= 12 then
25 turnoff
26 endif
27
28 endin
29
30 </CsInstruments>
31 <CsScore>
32 i 1 0 1
33
34 </CsScore>
35 </CsoundSynthesizer>
36