Debian Codegraph @

examples/schedule.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 schedule.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 - oscillator with a high note.
18 instr 1
19 ; Play Instrument #2 at the same time.
20 schedule 2, 0, p3
21
22 ; Play a high note.
23 a1 oscils 10000, 880, 1
24 out a1
25 endin
26
27 ; Instrument #2 - oscillator with a low note.
28 instr 2
29 ; Play a low note.
30 a1 oscils 10000, 220, 1
31 out a1
32 endin
33
34
35 </CsInstruments>
36 <CsScore>
37
38 ; Table #1, a sine wave.
39 f 1 0 16384 10 1
40
41 ; Play Instrument #1 for half a second.
42 i 1 0 0.5
43 ; Play Instrument #1 for half a second.
44 i 1 1 0.5
45 e
46
47
48 </CsScore>
49 </CsoundSynthesizer>