Debian Codegraph @

examples/oscilikts.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 oscilikts.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: oscilikts example.
18 instr 1
19 ; Frequency envelope.
20 kfrq expon 400, p3, 1200
21 ; Phase.
22 kphs line 0.1, p3, 0.9
23
24 ; Sync 1
25 atmp1 phasor 100
26 ; Sync 2
27 atmp2 phasor 150
28 async diff 1 - (atmp1 + atmp2)
29
30 a1 oscilikts 14000, kfrq, 1, async, 0
31 a2 oscilikts 14000, kfrq, 1, async, -kphs
32
33 out a1 - a2
34 endin
35
36
37 </CsInstruments>
38 <CsScore>
39
40 ; Table #1: Sawtooth wave
41 f 1 0 3 -2 1 0 -1
42
43 ; Play Instrument #1 for four seconds.
44 i 1 0 4
45 e
46
47
48 </CsScore>
49 </CsoundSynthesizer>