Debian Codegraph @

examples/pdclip.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in
5 -odac -iadc ;;;RT audio I/O
6 ; For Non-realtime ouput leave only the line below:
7 ; -o abs.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; test instrument for pdclip opcode
12 instr 3
13
14 idur = p3
15 iamp = p4
16 ifreq = p5
17 ifn = p6
18
19 kenv linseg 0, .05, 1.0, idur - .1, 1.0, .05, 0
20 aosc oscil 1.0, ifreq, ifn
21
22 kmod expseg 0.00001, idur, 1.0
23 aout pdclip aosc, kmod, 0.0, 1.0
24
25 out kenv*aout*iamp
26 endin
27
28 </CsInstruments>
29 <CsScore>
30 f1 0 16385 10 1
31 f2 0 16385 10 1 .5 .3333 .25 .5
32
33 ; pdclipped sine wave
34 i3 0 3 15000 440 1
35 i3 + 3 15000 330 1
36 i3 + 3 15000 220 1
37 s
38
39 ; pdclipped composite wave
40 i3 0 3 15000 440 2
41 i3 + 3 15000 330 2
42 i3 + 3 15000 220 2
43 e
44 </CsScore>
45 </CsoundSynthesizer>