Debian Codegraph @

examples/doppler.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;RT audio out
5 ;-iadc ;;;uncomment -iadc if RT audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o doppler.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 48000
12 ksmps = 128
13 nchnls = 2
14 0dbfs = 1
15
16 instr 1
17
18 iattack init 0.05
19 irelease init 0.05
20 isustain init p3
21 p3 init iattack + isustain + irelease
22 kdamping linseg 0.0, iattack, 1.0, isustain, 1.0, irelease, 0.0
23 kmic init 4
24 ; Position envelope, with a changing rate of change of position.
25 ; transeg a dur ty b dur ty c dur ty d
26 kposition transeg 4, p3*.4, 0, 120, p3*.3, -3, 50, p3*.3, 2, 4
27 ismoothinghz init 6
28 ispeedofsound init 340.29
29 asignal vco2 0.5, 110
30 aoutput doppler asignal, kposition, kmic, ispeedofsound, ismoothinghz
31 outs aoutput*kdamping, aoutput * kdamping
32 endin
33
34 </CsInstruments>
35 <CsScore>
36
37 i1 0.0 20
38 e1
39 </CsScore>
40 </CsoundSynthesizer>