Debian Codegraph @

examples/tabmorpha.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 tabmorpha.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 0, 0, 8193, 10, 1 ; sine wave
17 giSquare ftgen 0, 0, 8193, 7, 1, 4096, 1, 0, -1, 4096, -1 ; square wave
18 giTri ftgen 0, 0, 8193, 7, 0, 2048, 1, 4096, -1, 2048, 0 ; triangle wave
19 giSaw ftgen 0, 0, 8193, 7, 1, 8192, -1 ; sawtooth wave, downward slope
20
21
22 instr 1
23
24 iamp = .7
25 aindex phasor 110 ; read table value at this index
26 aweightpoint = 0 ; set weightpoint
27 atabnum1 line 0, p3, 3 ; morph through all tables
28 atabnum2 = 2 ; set to triangle wave
29 asig tabmorpha aindex, aweightpoint, atabnum1,atabnum2, giSine, giSquare, giTri, giSaw
30 asig = asig*iamp
31 outs asig, asig
32
33 endin
34 </CsInstruments>
35 <CsScore>
36
37 i1 0 10
38 e
39 </CsScore>
40 </CsoundSynthesizer>
41