| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac ;;;realtime audio out |
| 5 |
;-iadc ;;;uncomment -iadc if realtime audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o filter2.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 ; 2 saw waves of which one is slightly detuned |
| 17 |
|
| 18 |
ib1 = p5 |
| 19 |
ivol = p6 ;volume to compensate |
| 20 |
kcps init cpspch(p4) |
| 21 |
asig1 vco2 .05, kcps ;saw 1 |
| 22 |
asaw1 filter2 asig1, 1, 1, 1, ib1 ;filter 1 |
| 23 |
asig2 vco2 .05, kcps+1 ;saw 2 |
| 24 |
asaw2 filter2 asig2, 1, 1, 1, ib1 ;filter 2 |
| 25 |
aout = (asaw1+asaw2)*ivol ;mix |
| 26 |
outs aout, aout |
| 27 |
|
| 28 |
endin |
| 29 |
</CsInstruments> |
| 30 |
<CsScore> |
| 31 |
|
| 32 |
i 1 0 4 6.00 -.001 5 ;different filter values |
| 33 |
i 1 + 4 6.00 -.6 2 ;and different volumes |
| 34 |
i 1 + 4 6.00 -.95 .3 ;to compensate |
| 35 |
e |
| 36 |
</CsScore> |
| 37 |
</CsoundSynthesizer> |