1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac -iadc ;;;RT audio out and in
; For Non-realtime ouput leave only the line below:
; -o compress2.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 2
instr 1 ; uncompressed signal
asig diskin2 "beats.wav", 1, 0, 1
outs asig, asig
endin
instr 2 ; compressed signal.
; Use the "beats.wav" audio file and a mic
avoice in
asig diskin2 "beats.wav", 1, 0, 1
; duck the audio signal "beats.wav" with your voice.
kthresh = -90
kloknee = -50
khiknee = -30
kratio = 3
katt = 0.1
krel = .5
ilook = .02
asig compress2 asig, avoice, kthresh, kloknee, khiknee, kratio, katt, krel, ilook ; voice-activated compressor
outs asig, asig
endin
</CsInstruments>
<CsScore>
i 1 0 5
i 2 6 21
e
</CsScore>
</CsoundSynthesizer>
|