Cabbage Logo
Back to Cabbage Site

Schedkwhen

hi
im trying to trigger instr 2000 with schedkwhen

here is triggering code

instr 1666
kstat, kchn, kdata1, kdata2 midiin

if kstat == 144 then

ktrgnot = 1
endif
schedkwhen ktrgnot, -1, -1, 2000+kdata1*0.001, 0, -1,kdata1
ktrgnot = 0
endin

but how i send note duration to instr 2000 to madsr worx properly with sustain and release etc.

cheers

Doesn’t it take a duration parameter?