| Hello,
I would like to make a drum machine that works like a midi drum
machine.
I have some instrument called kick, highhat, etc.
I want to map these to different noteon events on channel 10.
The following code fails to achieve this:
... instrument definitions ...
; midi map drums
#define mapdrumtokey(drumname'drumkey) #
if idruminstr = $drumkey then
prints "drum enabled $drumname"
schedkwhen 1, 0, 0, "$drumname", 0, 1, 1
endif
#
instr 1
idruminstr notnum
prints "istr 1 triggered, notnum=%d", idruminstr
$mapdrumtokey(kick'47)
$mapdrumtokey(snare'48)
$mapdrumtokey(hihat'49)
endin
--
Joakim Verona
|