rendered paste body<CsoundSynthesizer>
<CsOptions>
;-odac -b5120 -B10240 -M8
</CsOptions>
<CsInstruments>
sr=44100
ksmps=25
nchnls=2
#include "usbmidi"
instr 11
kmtrig init 0
kswitch init 0
iamp = 0dbfs * .8
kstat, kchan, k1, k2 midiin
kyes = kstat * kchan * k1/176
kswitch = (kyes == 15 ? 1 : 0)
printk2 kswitch
if kswitch == 0 goto nothing
kmtrig = (kmtrig == 0 ? 1 : 0)
nothing:
kamp lineto kmtrig, .5
kdest = gkc10*4 + 100
kfreq port kdest, .05
aosc oscil 1, kfreq, 1
asig = aosc * iamp * kamp
outs asig, asig
endin
</CsInstruments>
<CsScore>
t 0 60 1 60 1 120 4 60
f0 600 256 10 1
f1 0 16384 10 1
i1 0 60
i11 0 60
e
</CsScore>
</CsoundSynthesizer>