Debian Codegraph @

examples/ftgen.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 ftgen.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 gisine ftgen 1, 0, 16384, 10, 1 ;sine wave
17 gisquare ftgen 2, 0, 16384, 10, 1, 0 , .33, 0, .2 , 0, .14, 0 , .11, 0, .09 ;odd harmonics
18 gisaw ftgen 3, 0, 16384, 10, 0, .2, 0, .4, 0, .6, 0, .8, 0, 1, 0, .8, 0, .6, 0, .4, 0,.2 ;even harmonics
19
20 instr 1
21
22 ifn = p4
23 asig poscil .6, 200, ifn
24 outs asig, asig
25
26 endin
27 </CsInstruments>
28 <CsScore>
29
30 i 1 0 2 1 ;sine wave
31 i 1 3 2 2 ;odd harmonics
32 i 1 6 2 3 ;even harmonics
33 e
34 </CsScore>
35 </CsoundSynthesizer>