| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac ;;;RT audio out |
| 5 |
;-iadc ;;;uncomment -iadc if RT audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o balance.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 |
| 17 |
; Generate a band-limited pulse train. |
| 18 |
asrc buzz 0.9, 440, sr/440, 1 |
| 19 |
|
| 20 |
; Send the source signal through 2 filters. |
| 21 |
a1 reson asrc, 1000, 100 |
| 22 |
a2 reson a1, 3000, 500 |
| 23 |
|
| 24 |
; Balance the filtered signal with the source. |
| 25 |
afin balance a2, asrc |
| 26 |
outs afin, afin |
| 27 |
|
| 28 |
endin |
| 29 |
|
| 30 |
</CsInstruments> |
| 31 |
<CsScore> |
| 32 |
;sine wave. |
| 33 |
f 1 0 16384 10 1 |
| 34 |
|
| 35 |
i 1 0 2 |
| 36 |
e |
| 37 |
|
| 38 |
</CsScore> |
| 39 |
</CsoundSynthesizer> |