PSdH:HHM ꣸C̭6VIAZ LuaDrumMapAZLU--[[ Drum Map like functionality, edit the text to set your mapping AZ, 2016 ]]-- -- This table defines the mapping local dm = { ["E4"] = "D#4", ["A4"] = "G#4", ["B4"] = "A#4" } -- The rest you can keep unchanged -- Convert note names to numbers local ndm = { } for noteIn,noteOut in pairs(dm) do ndm[MfxKey(noteIn)] = MfxKey(noteOut) end function OnInput(pqIn, pqOut) for i,e in ipairs(pqIn) do if e.Key then -- Is Note ? local newkey = ndm[e.Key] if newkey then -- Mapping exist ? e.Key = newkey -- map the note end end pqOut.add(e) end end OnEvents = function ( From, To, pqIn, pqOut) OnInput(pqIn, pqOut) end