Debian Codegraph @

examples/compress.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 compress.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
17 instr 1 ; uncompressed signal
18
19 asig diskin2 "drumsMlp.wav", 1, 0, 1
20 outs asig, asig
21 endin
22
23
24 instr 2 ; compressed signal, use the "drumsMlp.wav" audio file and a soundfile
25
26 avoice diskin2 "Mathews.wav", 1, 0, 1
27 asig diskin2 "drumsMlp.wav", 1, 0, 1
28 prints "***compressing according to Mathews.wav***\n\n"
29 kthresh = 0
30 kloknee = 40
31 khiknee = 60
32 kratio = 5
33 katt = 0.01
34 krel = .1
35 ilook = .02
36 asig compress asig, avoice, kthresh, kloknee, khiknee, kratio, katt, krel, ilook ; voice-activated compressor
37 outs asig, asig
38 endin
39
40 instr 3 ; compressed signal, use the "drumsMlp.wav" audio file and a mic
41
42 avoice in ; duck the audio signal "drumsMlp.wav" with your voice.
43 asig diskin2 "drumsMlp.wav", 1, 0, 1
44 prints "***compressing according to your mic -- if present***\n\n"
45 kthresh = 0
46 kloknee = 40
47 khiknee = 60
48 kratio = 3
49 katt = 0.1
50 krel = .5
51 ilook = .02
52 asig compress asig, avoice, kthresh, kloknee, khiknee, kratio, katt, krel, ilook ; voice-activated compressor
53 outs asig, asig
54 endin
55
56 </CsInstruments>
57 <CsScore>
58 s
59 i1 0 4
60 s
61 i2 0 16
62 s
63 i3 0 30
64 e
65 </CsScore>
66 </CsoundSynthesizer>