| 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 gen25.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 |
gisin ftgen 1, 0, 32768, 10, 1 |
| 17 |
gienv ftgen 2, 0, 1025, 25, 0, 0.01, 200, 1, 400, 1, 513, 0.01 ; y value must be >= 0 |
| 18 |
|
| 19 |
|
| 20 |
instr 1 |
| 21 |
|
| 22 |
kcps init 3/p3 ;play 3x over duration of note |
| 23 |
kndx phasor kcps |
| 24 |
ixmode = 1 ;normalize to 0-1 |
| 25 |
kval table kndx, gienv, ixmode |
| 26 |
kval =kval*100 ;scale up to 0-100 |
| 27 |
asig poscil 1, 220+kval, gisin ;use table for amplitude |
| 28 |
outs asig, asig |
| 29 |
|
| 30 |
endin |
| 31 |
</CsInstruments> |
| 32 |
<CsScore> |
| 33 |
|
| 34 |
i 1 0 4 |
| 35 |
|
| 36 |
e |
| 37 |
</CsScore> |
| 38 |
</CsoundSynthesizer> |
| 39 |
|