Debian Codegraph @

examples/vco2ft.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in No messages
5 -odac -iadc -d ;;;RT audio I/O
6 ; For Non-realtime ouput leave only the line below:
7 ; -o vco2ft.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 10
13 nchnls = 1
14
15 ; user defined waveform -1: trapezoid wave with default parameters (can be
16 ; accessed at ftables starting from 10000)
17 itmp ftgen 1, 0, 16384, 7, 0, 2048, 1, 4096, 1, 4096, -1, 4096, -1, 2048, 0
18 ift vco2init -1, 10000, 0, 0, 0, 1
19 ; user defined waveform -2: fixed table size (4096), number of partials
20 ; multiplier is 1.02 (~238 tables)
21 itmp ftgen 2, 0, 16384, 7, 1, 4095, 1, 1, -1, 4095, -1, 1, 0, 8192, 0
22 ift vco2init -2, ift, 1.02, 4096, 4096, 2
23
24 instr 1
25 kcps expon p4, p3, p5 ; instr 1: basic vco2 example
26 a1 vco2 12000, kcps ; (sawtooth wave with default
27 out a1 ; parameters)
28 endin
29
30 instr 2
31 kcps expon p4, p3, p5 ; instr 2:
32 kpw linseg 0.1, p3/2, 0.9, p3/2, 0.1 ; PWM example
33 a1 vco2 10000, kcps, 2, kpw
34 out a1
35 endin
36
37 instr 3
38 kcps expon p4, p3, p5 ; instr 3: vco2 with user
39 a1 vco2 14000, kcps, 14 ; defined waveform (-1)
40 aenv linseg 1, p3 - 0.1, 1, 0.1, 0 ; de-click envelope
41 out a1 * aenv
42 endin
43
44 instr 4
45 kcps expon p4, p3, p5 ; instr 4: vco2ft example,
46 kfn vco2ft kcps, -2, 0.25 ; with user defined waveform
47 a1 oscilikt 12000, kcps, kfn ; (-2), and sr/4 bandwidth
48 out a1
49 endin
50
51
52 </CsInstruments>
53 <CsScore>
54
55 i 1 0 3 20 2000
56 i 2 4 2 200 400
57 i 3 7 3 400 20
58 i 4 11 2 100 200
59
60 f 0 14
61
62 e
63
64
65 </CsScore>
66 </CsoundSynthesizer>