| 1 |
<Cabbage> |
| 2 |
form caption("Untitled") size(400, 300), \ |
| 3 |
colour(58, 110, 182), \ |
| 4 |
pluginID("def1") |
| 5 |
keyboard bounds(8, 158, 381, 95) |
| 6 |
</Cabbage> |
| 7 |
<CsoundSynthesizer> |
| 8 |
<CsOptions> |
| 9 |
-n -d -+rtmidi=NULL -M0 -m0d --midi-key-cps=4 --midi-velocity-amp=5 |
| 10 |
</CsOptions> |
| 11 |
<CsInstruments> |
| 12 |
; Initialize the global variables. |
| 13 |
sr = 44100 |
| 14 |
ksmps = 32 |
| 15 |
nchnls = 2 |
| 16 |
0dbfs = 1 |
| 17 |
|
| 18 |
;instrument will be triggered by keyboard widget |
| 19 |
instr 1 |
| 20 |
iFreq = p4 |
| 21 |
iAmp = p5 |
| 22 |
iAtt = 0.1 |
| 23 |
iDec = 0.4 |
| 24 |
iSus = 0.6 |
| 25 |
iRel = 0.7 |
| 26 |
kEnv madsr iAtt, iDec, iSus, iRel |
| 27 |
aOut vco2 iAmp, iFreq |
| 28 |
outs aOut*kEnv, aOut*kEnv |
| 29 |
endin |
| 30 |
|
| 31 |
</CsInstruments> |
| 32 |
<CsScore> |
| 33 |
;causes Csound to run for about 7000 years... |
| 34 |
f0 z |
| 35 |
</CsScore> |
| 36 |
</CsoundSynthesizer> |