Debian Codegraph @

examples/clip.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 clip.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 ; white noise
17
18 arnd rand 1 ; full amlitude
19 ; Clip the noisy waveform's amplitude to 0.5
20 a1 clip arnd, p4, 0.5
21 outs a1, a1
22
23 endin
24
25 instr 2 ; white noise
26
27 arnd rand 1 ; full amlitude
28 ; Clip the noisy waveform's amplitude to 0.1
29 a1 clip arnd, p4, 0.1
30 outs a1, a1
31
32 endin
33
34 </CsInstruments>
35 <CsScore>
36
37 ; Play Instrument #1 for one second.
38 i 1 0 1 2
39 ; Play Instrument #2 for one second.
40 i 2 1 1 2
41 s 3
42 ; Play Instrument #1 for one second.
43 i 1 0 1 0
44 ; Play Instrument #2 for one second.
45 i 2 1 1 0
46 s 3
47 ; Play Instrument #1 for one second.
48 i 1 0 1 1
49 ; Play Instrument #2 for one second.
50 i 2 1 1 1
51 e
52
53 </CsScore>
54 </CsoundSynthesizer>