| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
-odac -+rtmidi=virtual -M0 |
| 4 |
; activate real time audio and MIDI (virtual midi device) |
| 5 |
</CsOptions> |
| 6 |
<CsInstruments> |
| 7 |
sr = 44100 |
| 8 |
ksmps = 32 |
| 9 |
nchnls = 2 |
| 10 |
0dbfs = 1 |
| 11 |
|
| 12 |
instr 1 |
| 13 |
icps cpsmidi |
| 14 |
; attack-|sustain-|-release |
| 15 |
aEnv linsegr 0, 0.01, 0.1, 0.5,0; envelope that senses note releases |
| 16 |
aSig poscil aEnv, icps ; audio oscillator |
| 17 |
out aSig, aSig ; audio sent to output |
| 18 |
endin |
| 19 |
|
| 20 |
</CsInstruments> |
| 21 |
<CsScore> |
| 22 |
e 240 ; csound performance for 4 minutes |
| 23 |
</CsScore> |
| 24 |
</CsoundSynthesizer> |
| 25 |
;example by Iain McCurdy |