Debian Codegraph @

examples/phasor.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 real audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o phasor.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 instr 1
17
18 ifn = 1 ;read table 1 with our index
19 ixmode = 1
20 kndx phasor p4
21 kfrq table kndx, ifn, ixmode
22 asig poscil .6, kfrq, 2 ;re-synthesize with sine
23 outs asig, asig
24
25 endin
26 </CsInstruments>
27 <CsScore>
28 f 1 0 1025 -7 200 1024 2000 ;a line from 200 to 2,000
29 f 2 0 16384 10 1;sine wave
30
31 i 1 0 1 1 ;once per second
32 i 1 2 2 .5 ;once per 2 seconds
33 i 1 5 1 2 ;twice per second
34 e
35 </CsScore>
36 </CsoundSynthesizer>