Debian Codegraph @

examples/downsamp.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 downsamp.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
17
18 ifrq = cpspch(p4)
19 ain diskin2 "drumsMlp.wav", 1
20 aenv follow ain, .001 ;take the amplitude every 1/1000th of a second
21 alow tone aenv, 25 ;lowpass-filter (25 Hz) for a clean signal
22 kenv downsamp alow
23 asig pluck kenv, ifrq, 15, 0, 1
24 outs asig, asig
25 endin
26
27 </CsInstruments>
28 <CsScore>
29
30 i 1 0 2 9
31 i 1 + . 7
32 i 1 + . 5
33
34 e
35 </CsScore>
36 </CsoundSynthesizer>
37