Debian Codegraph @

examples/tempest.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in
5 -odac -iadc ;;;RT audio I/O
6 ; For Non-realtime ouput leave only the line below:
7 ; -o tempest.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; Initialize the global variables.
12 sr = 44100
13 kr = 4410
14 ksmps = 10
15 nchnls = 1
16
17 ; Instrument #1.
18 instr 1
19 ; Use the "drumsMlp.wav" sound file.
20 asig soundin "drumsMlp.wav"
21 ; Extract the pitch and the envelope.
22 kcps, krms pitchamdf asig, 150, 500, 200
23
24 iprd = 0.01
25 imindur = 0.1
26 imemdur = 3
27 ihp = 1
28 ithresh = 30
29 ihtim = 0.005
30 ixfdbak = 0.05
31 istartempo = 110
32 ifn = 1
33
34 ; Estimate its tempo.
35 k1 tempest krms, iprd, imindur, imemdur, ihp, ithresh, ihtim, ixfdbak, istartempo, ifn
36 printk2 k1
37
38 out asig
39 endin
40
41
42 </CsInstruments>
43 <CsScore>
44
45 ; Table #1, a declining line.
46 f 1 0 128 16 1 128 1
47
48 ; Play Instrument #1 for two seconds.
49 i 1 0 2
50 e
51
52
53 </CsScore>
54 </CsoundSynthesizer>