target={} center=64 transpose=0 function OnNote(channel, pitch, velocity) if velocity > 0 then local myPitch = transpose + center + (center - pitch) target[pitch] = myPitch Note(channel, myPitch, velocity) else if target[pitch]>0 then Note(channel, target[pitch], velocity) target[pitch]=0 end end end --function OnBend(channel, bend) -- Bend(channel, bend) --end function OnFrame(notes) end function OnStart(info) -- assign a description to be displayed in the header info.description = "Flip Intervals around center and transpose" info.link = "http://jamorigin.com/midi-machine" -- create widgets in the user interface Knob("center", 0, 38,88,1) Knob("transpose", 0, -12,12,1) --List("my_parameter_2", 1, "option 1","option 2","option 3") for i=1,127 do target[i]=0 end end