Debian Codegraph @

examples/mton-ntom.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 --nosound
4 </CsOptions>
5 <CsInstruments>
6
7 instr 1
8 S4 mton ntom("7D+63")
9 puts S4, 1
10
11 S1 mton 60
12 printf_i "midi 60 = %s \n", 1, S1
13
14 S2 mton ftom(442)
15 printf_i "442 Hz = %s \n", 1, S2
16
17 S3 = mton(48.25)
18 printf_i "midi 48.25 = %s \n", 1, S3
19
20 k1 = ntom("4C")
21 printf_i "4C = midi %f \n", 1, k1
22
23 i2 ntom "4E"
24 printf_i "4E = %f \n", 1, i2
25
26 S5 = mton(ntom("4G+"))
27 printf_i "roundtrip 4G+: %s \n", 1, S5
28
29 turnoff
30 endin
31
32 instr 2
33 ; test i-time and k-time execution
34 k1 = ntom("4Eb-31")
35 printf "4Eb-31 = %f \n", 1, k1
36
37 i0 ntom "4C+"
38 printf_i "4C+ = %f \n", 1, i0
39
40 i1 = ntom:i("4A")
41 printf_i "4A = %f \n", 1, i1
42 turnoff
43 endin
44
45 </CsInstruments>
46 <CsScore>
47
48 i 1 0 1
49 i 2 0 1
50
51 </CsScore>
52 </CsoundSynthesizer>