Debian Codegraph @

examples/gen18.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 gen18.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 = p4
19 ilen = ftlen(ifn)
20 aphase phasor 220
21 asig tablei aphase*ilen, ifn
22 outs asig, asig
23
24 endin
25 </CsInstruments>
26 <CsScore>
27
28 f 1 0 4096 10 1 ;sine
29 f 2 0 4096 10 1 0.5 0.3 0.25 0.2 0.167 0.14 0.125 .111 ;sawtooth
30 f 3 0 4096 11 10 5 2 ;cosine partials
31
32 f 11 0 8192 18 1 1 0 4095 2 1 4096 8191 ;sine+sawtooth
33 f 12 0 8192 18 1 1 0 4095 3 1 4096 8191 ;sine+cosine partials
34 f 13 0 1024 18 1 0.7 0 767 3 0.7 512 1023 ;sine+cosine partials overlapped, shorter table
35
36 i 1 0 2 2 ;play sawtooth
37 i 1 + 2 3 ;then cosine partials
38 i 1 5 2 11 ;now sine+sawtooth
39 i 1 + 2 12 ;and sine+cosine partials
40 i 1 + 2 13 ;and sine+cosine partials overlapped, shorter table
41
42 e
43 </CsScore>
44 </CsoundSynthesizer>
45