Debian Codegraph @

examples/phaser1.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in No messages
5 -odac -iadc -d ;;;RT audio I/O
6 ; For Non-realtime ouput leave only the line below:
7 ; -o phaser1.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 kr = 4410
13 ksmps = 10
14 nchnls = 1
15
16 ; demonstration of phase shifting abilities of phaser1.
17 instr 1
18 ; Input mixed with output of phaser1 to generate notches.
19 ; Shows the effects of different iorder values on the sound
20 idur = p3
21 iamp = p4 * .05
22 iorder = p5 ; number of 1st-order stages in phaser1 network.
23 ; Divide iorder by 2 to get the number of notches.
24 ifreq = p6 ; frequency of modulation of phaser1
25 ifeed = p7 ; amount of feedback for phaser1
26
27 kamp linseg 0, .2, iamp, idur - .2, iamp, .2, 0
28
29 iharms = (sr*.4) / 100
30
31 asig gbuzz 1, 100, iharms, 1, .95, 2 ; "Sawtooth" waveform modulation oscillator for phaser1 ugen.
32 kfreq oscili 5500, ifreq, 1
33 kmod = kfreq + 5600
34
35 aphs phaser1 asig, kmod, iorder, ifeed
36
37 out (asig + aphs) * iamp
38 endin
39
40
41 </CsInstruments>
42 <CsScore>
43
44 ; inverted half-sine, used for modulating phaser1 frequency
45 f1 0 16384 9 .5 -1 0
46 ; cosine wave for gbuzz
47 f2 0 8192 9 1 1 .25
48
49 ; phaser1
50 i1 0 5 7000 4 .2 .9
51 i1 6 5 7000 6 .2 .9
52 i1 12 5 7000 8 .2 .9
53 i1 18 5 7000 16 .2 .9
54 i1 24 5 7000 32 .2 .9
55 i1 30 5 7000 64 .2 .9
56 e
57
58
59 </CsScore>
60 </CsoundSynthesizer>