Debian Codegraph @

examples/resony.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 resonx.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 instr 1 ; unfiltered noise
17
18 kenv linseg 0, p3*.5, 1, p3*.5, 0 ;envelope
19 asig rand 0.7 ;white noise
20 outs asig*kenv, asig*kenv
21
22 endin
23
24 instr 2 ; filtered noise
25
26 ksep = p4 ;vary seperation of center frequency of filters in octaves
27 kenv linseg 0, p3*.5, 1, p3*.5, 0 ;envelope
28 asig rand 0.7
29 kbf line 300, p3, 2000 ;vary base frequency
30 afilt resony asig, kbf, 300, 4, ksep
31 asig balance afilt, asig
32 outs asig*kenv, asig*kenv
33
34 endin
35 </CsInstruments>
36 <CsScore>
37
38 i 1 0 2
39 i 2 3 2 1
40 i 2 6 2 3
41
42 e
43 </CsScore>
44 </CsoundSynthesizer>