Debian Codegraph @

examples/readk-2.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;realtime audio out
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o readk-2.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 nchnls = 2
14 0dbfs = 1
15
16 giSine ftgen 0, 0, 2^10, 10, 1
17
18 instr 1 ;writes a control signal to a file
19 kfreq randh 100, 1, 2, 1, 500 ;generates one random number between 400 and 600 per second
20 dumpk kfreq, "dumpk.txt", 8, 1 ;writes the control signal
21 printk 1, kfreq ;prints it
22 endin
23
24 instr 2 ;reads the file written by instr 1
25 kfreq readk "dumpk.txt", 8, 1
26 printk 1, kfreq ;prints it
27 aout poscil .2, kfreq, giSine
28 outs aout, aout
29 endin
30
31 </CsInstruments>
32 <CsScore>
33 i 1 0 5
34 i 2 5 5
35 e
36 </CsScore>
37 </CsoundSynthesizer>