| 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 phaser2.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 |
instr 2 ; demonstration of phase shifting abilities of phaser2. |
| 17 |
; Input mixed with output of phaser2 to generate notches. |
| 18 |
; Demonstrates the interaction of imode and ksep. |
| 19 |
idur = p3 |
| 20 |
iamp = p4 * .04 |
| 21 |
iorder = p5 ; number of 2nd-order stages in phaser2 network |
| 22 |
ifreq = p6 ; not used |
| 23 |
ifeed = p7 ; amount of feedback for phaser2 |
| 24 |
imode = p8 ; mode for frequency scaling |
| 25 |
isep = p9 ; used with imode to determine notch frequencies |
| 26 |
kamp linseg 0, .2, iamp, idur - .2, iamp, .2, 0 |
| 27 |
iharms = (sr*.4) / 100 |
| 28 |
|
| 29 |
; "Sawtooth" waveform exponentially decaying function, to control notch frequencies |
| 30 |
asig gbuzz 1, 100, iharms, 1, .95, 2 |
| 31 |
kline expseg 1, idur, .005 |
| 32 |
aphs phaser2 asig, kline * 2000, .5, iorder, imode, isep, ifeed |
| 33 |
|
| 34 |
out (asig + aphs) * iamp |
| 35 |
endin |
| 36 |
|
| 37 |
|
| 38 |
</CsInstruments> |
| 39 |
<CsScore> |
| 40 |
|
| 41 |
; cosine wave for gbuzz |
| 42 |
f2 0 8192 9 1 1 .25 |
| 43 |
|
| 44 |
; phaser2, imode=1 |
| 45 |
i2 00 10 7000 8 .2 .9 1 .33 |
| 46 |
i2 11 10 7000 8 .2 .9 1 2 |
| 47 |
|
| 48 |
; phaser2, imode=2 |
| 49 |
i2 22 10 7000 8 .2 .9 2 .33 |
| 50 |
i2 33 10 7000 8 .2 .9 2 2 |
| 51 |
e |
| 52 |
|
| 53 |
|
| 54 |
</CsScore> |
| 55 |
</CsoundSynthesizer> |