InvertPitch.lua
--------------------------------------------------------------------------------
--! @example "InvertPitch.lua"
--------------------------------------------------------------------------------
CenterPitch = Knob("Center_Pitch", 60, 0, 127, true)
function onNote(e)
local center = CenterPitch.value
local delta = e.note-center
local note = center - delta
if note>=0 and note<=127 then
playNote(note, e.velocity)
end
end
function onRelease()
-- eat event
end