Debian Codegraph @

examples/compress2.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac -iadc ;;;RT audio out and in
5 ; For Non-realtime ouput leave only the line below:
6 ; -o compress2.wav -W ;;; for file output any platform
7 </CsOptions>
8 <CsInstruments>
9
10 sr = 44100
11 ksmps = 32
12 nchnls = 2
13 nchnls_i = 1 ; assume only one mono signal for audio input!
14 0dbfs = 1
15
16 instr 1 ; uncompressed signal
17
18 asig diskin2 "drumsMlp.wav", 1, 0, 1
19 outs asig, asig
20 endin
21
22
23 instr 2 ; compressed signal, use the "drumsMlp.wav" audio file and a soundfile
24
25 avoice diskin2 "Mathews.wav", 1, 0, 1
26 asig diskin2 "drumsMlp.wav", 1, 0, 1
27 prints "***compressing according to Mathews.wav***\n\n"
28 kthresh = -90
29 kloknee = -50
30 khiknee = -30
31 kratio = 6
32 katt = 0.01
33 krel = .1
34 ilook = .02
35 asig compress2 asig, avoice, kthresh, kloknee, khiknee, kratio, katt, krel, ilook ; voice-activated compressor
36 outs asig, asig
37 endin
38
39 instr 3 ; compressed signal, use the "drumsMlp.wav" audio file and a mic
40
41 avoice in ; duck the audio signal "drumsMlp.wav" with your voice.
42 asig diskin2 "drumsMlp.wav", 1, 0, 1
43 prints "***compressing according to your mic -- if present***\n\n"
44 kthresh = -90
45 kloknee = -50
46 khiknee = -30
47 kratio = 5
48 katt = 0.1
49 krel = .5
50 ilook = .02
51 asig compress2 asig, avoice, kthresh, kloknee, khiknee, kratio, katt, krel, ilook ; voice-activated compressor
52 outs asig, asig
53 endin
54
55 </CsInstruments>
56 <CsScore>
57 s
58 i1 0 4
59 s
60 i2 0 16
61 s
62 i3 0 30
63
64 e
65 </CsScore>
66 </CsoundSynthesizer>