Debian Codegraph @

examples/marimba.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in No messages
5 -odac -iadc -d ;;;RT audio I/O
6 ; For Non-realtime ouput leave only the line below:
7 ; -o marimba.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; Initialize the global variables.
12 sr = 44100
13 ksmps = 128
14 nchnls = 2
15
16 ; Instrument #1.
17 instr 1
18 ifreq = cpspch(p4)
19 ihrd = 0.1
20 ipos = 0.561
21 imp = 1
22 kvibf = 6.0
23 kvamp = 0.05
24 ivibfn = 2
25 idec = 0.6
26
27 a1 marimba 20000, ifreq, ihrd, ipos, imp, kvibf, kvamp, ivibfn, idec, 20, 10
28
29 outs a1, a1
30 endin
31
32
33 </CsInstruments>
34 <CsScore>
35
36 ; Table #1, the "marmstk1.wav" audio file.
37 f 1 0 256 1 "marmstk1.wav" 0 0 0
38 ; Table #2, a sine wave for the vibrato.
39 f 2 0 128 10 1
40
41 ; Play Instrument #1 for one second.
42 i 1 0 1 8.09
43 i 1 + 0.5 8.00
44 i 1 + 0.5 7.00
45 i 1 + 0.25 8.02
46 i 1 + 0.25 8.01
47 i 1 + 0.25 7.09
48 i 1 + 0.25 8.02
49 i 1 + 0.25 8.01
50 i 1 + 0.25 7.09
51 i 1 + 0.3333 8.09
52 i 1 + 0.3333 8.02
53 i 1 + 0.3334 8.01
54 i 1 + 0.25 8.00
55 i 1 + 0.3333 8.09
56 i 1 + 0.3333 8.02
57 i 1 + 0.25 8.01
58 i 1 + 0.3333 7.00
59 i 1 + 0.3334 6.00
60
61 e
62
63
64 </CsScore>
65 </CsoundSynthesizer>