TimbreShifting.lua

Timbre Shifting script borrows notes froms neighbouring keygroups and retune them to alter timbre

--------------------------------------------------------------------------------
--! @example TimbreShifting.lua
--! Timbre Shifting script
--! borrows notes froms neighbouring keygroups and retune them to alter timbre
--------------------------------------------------------------------------------
shiftKnob = Knob("shift", 0, -5, 5, true)
function onNote(e)
local shift = shiftKnob.value
local note = e.note + shift
local id = playNote(note, e.velocity, -1)
changeTune(id, -shift, false, true)
end
function onRelease()
-- eat event release is automatic in playNote
end