| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
|
| 4 |
; Select audio/midi flags here according to platform |
| 5 |
; Audio out Audio in |
| 6 |
-odac ;; -iadc ;;;RT audio I/O |
| 7 |
; For Non-realtime ouput leave only the line below: |
| 8 |
; -o kr_example.wav -W ;;; for file output any platform |
| 9 |
|
| 10 |
; By Stefano Cucchi 2020 |
| 11 |
|
| 12 |
</CsOptions> |
| 13 |
|
| 14 |
<CsInstruments> |
| 15 |
|
| 16 |
sr = 44100 |
| 17 |
|
| 18 |
kr = 4410 ; NO glitch |
| 19 |
;kr = 10 ; Some GLITCH in kFreqMod |
| 20 |
;kr = 2 ; Lots of GLITCH in kFreqMod |
| 21 |
nchnls = 1 |
| 22 |
0dbfs = 1 |
| 23 |
|
| 24 |
instr 1 |
| 25 |
|
| 26 |
kenvelopemod linseg 0, 2, p4, p3-4, p4, 2, 0 |
| 27 |
|
| 28 |
kFreqMod expseg 200, p3, 800 |
| 29 |
amodulator oscil kenvelopemod, kFreqMod, 2 |
| 30 |
|
| 31 |
acarf phasor 440 |
| 32 |
ifn = 1 |
| 33 |
ixmode = 1 |
| 34 |
ixoff = 0 |
| 35 |
iwrap = 1 |
| 36 |
acarrier tablei acarf+amodulator, ifn, ixmode, ixoff, iwrap |
| 37 |
|
| 38 |
kgenenvelop linseg 0, 0.5, 0.3, p3-1, 0.3, 0.5, 0 |
| 39 |
out acarrier * kgenenvelop |
| 40 |
|
| 41 |
endin |
| 42 |
|
| 43 |
</CsInstruments> |
| 44 |
|
| 45 |
<CsScore> |
| 46 |
|
| 47 |
f1 0 4096 10 1 |
| 48 |
f2 0 4096 10 1 0.3 0.5 0.24 0.56 0.367 |
| 49 |
|
| 50 |
i1 0 5 0.2 |
| 51 |
e |
| 52 |
</CsScore> |
| 53 |
|
| 54 |
</CsoundSynthesizer> |