Debian Codegraph @

examples/vco2init.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 vco2init.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr=44100
12 ksmps=1
13 nchnls=2
14
15 ; create waveform with discontinuities, so it has a lot of high freq content
16 gitable ftgen 0, 0, 2^16+1, 7, -1, 2^14, 1, 0, -1, 2^14, 1, 0, -1, 2^15, 1
17 ; make bandlimited tables of the waveform
18 gi_nextfree vco2init -gitable, gitable+1, 1.05, 128, 2^16, gitable
19 gitable_bl = -gitable
20
21 instr 1
22
23 kfreq expon 14000, p3, 500
24 kfn vco2ft kfreq, gitable_bl
25 asig oscilikt 5000, kfreq, kfn
26 printk 0.1, kfn
27
28 ; remove semicolon on next line to hear original waveform, demonstrating the aliasing
29 ;asig oscili 5000, kfreq, gitable
30 outs asig, asig
31
32 endin
33 </CsInstruments>
34 <CsScore>
35 i1 0 5
36 e
37 </CsScore>
38 </CsoundSynthesizer>