| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac ;;;realtime audio out |
| 5 |
;-iadc ;;;uncomment -iadc if real audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o mac.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 ;4 band equalizer |
| 17 |
|
| 18 |
klow = p4 ;low gain1 |
| 19 |
aenv1 oscil 0.2, 1, 4 |
| 20 |
aenv1 = aenv1 + klow |
| 21 |
klmid = p5 ;low gain2 |
| 22 |
aenv2 oscil 0.21, 1.1, 4 |
| 23 |
aenv2 = aenv2 + klmid |
| 24 |
kmidh = p6 ;high gain1 |
| 25 |
aenv3 oscil 0.19, 1.2, 4 |
| 26 |
aenv3 = aenv3 + kmidh |
| 27 |
khigh = p7 ;high gain2 |
| 28 |
aenv4 oscil 0.18, 1.3, 4 |
| 29 |
aenv4 = aenv4 + khigh |
| 30 |
|
| 31 |
ifn = p8 ;table |
| 32 |
|
| 33 |
ilc1 table 0, ifn ;low freqency range |
| 34 |
ilc2 table 1, ifn ;low-mid |
| 35 |
ihc1 table 2, ifn ;mid-high |
| 36 |
ihc2 table 3, ifn ;high |
| 37 |
|
| 38 |
asig diskin2 "fox.wav", 1 |
| 39 |
alow1 butterlp asig, ilc1 ;lowpass 1 |
| 40 |
almid butterlp asig, ilc2 ;lowpass 2 |
| 41 |
amidh butterhp asig, ihc1 ;highpass 1 |
| 42 |
ahigh butterhp asig, ihc2 ;highpass 2 |
| 43 |
aout maca aenv1, alow1, aenv2, almid, aenv3, amidh, aenv4, ahigh |
| 44 |
outs aout, aout |
| 45 |
|
| 46 |
endin |
| 47 |
</CsInstruments> |
| 48 |
<CsScore> |
| 49 |
f1 0 4 -2 150 300 600 5000 |
| 50 |
f2 0 4 -2 75 500 1000 10000 |
| 51 |
f3 0 4 -2 200 700 1500 3000 |
| 52 |
f4 0 4096 10 1 |
| 53 |
|
| 54 |
; low lowmid midhigh high table |
| 55 |
i 1 0 2.8 2 1 1 1 1 |
| 56 |
i 1 3 2.8 2 3 1 1 2 |
| 57 |
i 1 6 2.8 2 1 2 3 3 |
| 58 |
e |
| 59 |
</CsScore> |
| 60 |
</CsoundSynthesizer> |
| 61 |
|