Debian Codegraph @

examples/lpf18.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in
5 -odac ;;;RT audio out
6 ; For Non-realtime ouput leave only the line below:
7 ;-o lpf18.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; by Kevin Conder with help from Iain Duncan
12
13 sr = 44100
14 ksmps = 32
15 nchnls = 2
16 0dbfs = 1
17
18 instr 1
19
20 kamp init 1 ; Note that its amplitude (kamp) ranges from 0 to 1.
21 kcps init 440
22 knh init 3
23 ifn = 1
24 asine buzz kamp, kcps, knh, ifn ; Generate a sine waveform.
25 kfco line 300, p3, 3000 ; Filter the sine waveform.
26 kres init 0.8 ; Vary the cutoff frequency (kfco) from 300 to 3,000 Hz.
27 kdist = p4
28 ivol = p5
29 aout lpf18 asine, kfco, kres, kdist
30 outs aout * ivol, aout * ivol
31
32 endin
33
34 </CsInstruments>
35 <CsScore>
36 f 1 0 16384 10 1 ; sine wave.
37
38 ; different distortion and volumes to compensate
39 i 1 0 4 0.2 .8
40 i 1 4.5 4 0.9 .7
41 e
42 </CsScore>
43 </CsoundSynthesizer>