| 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 zfilter2.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
; By Stefano Cucchi 2020 |
| 12 |
|
| 13 |
sr = 44100 |
| 14 |
ksmps = 32 |
| 15 |
nchnls = 2 |
| 16 |
0dbfs = 1 |
| 17 |
|
| 18 |
instr 1 |
| 19 |
|
| 20 |
kdamp linseg p5, p3, p6 |
| 21 |
kfreq linseg p7, p3, p8 |
| 22 |
kcps init cpspch(p4) |
| 23 |
asig1 vco2 .2, kcps |
| 24 |
asaw zfilter2 asig1, kdamp, kfreq, 2, 2, 0.81, 0.713, 0.0001, 0.99 |
| 25 |
|
| 26 |
acompare oscil 0.2, 440 ; signal comparator for volume |
| 27 |
asaw balance asaw, acompare ; adjust the volume. Volume can have big variation due to filter. |
| 28 |
outs asaw, asaw |
| 29 |
|
| 30 |
endin |
| 31 |
</CsInstruments> |
| 32 |
<CsScore> |
| 33 |
|
| 34 |
i 1 0 5 6.00 0.6 0.99 0.006 0.006 ; varying ringing time (from 0.6 to 0.99) |
| 35 |
i 1 6 5 6.00 0.3 0.3 0.01 -0.8 ; varying frequency warp factor (from 0.01 to -0.8) |
| 36 |
e |
| 37 |
</CsScore> |
| 38 |
</CsoundSynthesizer> |