Debian Codegraph @

examples/dumpk.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 dumpk.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; Initialize the global variables.
12 sr = 44100
13 kr = 20
14 nchnls = 1
15
16 ; By Andres Cabrera 2008
17
18 instr 1
19 ; Write fibonacci numbers to file "fibonacci.txt"
20 ; as ascii long integers (mode 7), using the orchestra's
21 ; control rate (iprd = 0)
22
23 knumber init 0
24 koldnumber init 1
25 ktrans init 1
26 ktrans = knumber
27 knumber = knumber + koldnumber
28 koldnumber = ktrans
29 dumpk knumber, "fibonacci.txt", 7, 0
30 printk2 knumber
31 endin
32
33
34 </CsInstruments>
35 <CsScore>
36
37 ;Write to the file for 1 second. Since control rate is 20, 20 values will be written
38 i 1 0 1
39
40
41
42 </CsScore>
43 </CsoundSynthesizer>