Skip to content

Commit

Permalink
execute global Midi.remove callback
Browse files Browse the repository at this point in the history
this runs the global, customizable midi device removal callback when a device is unplugged (if the device is registered by the norns midi system), in addition to and without affecting the per-device removal callback (if defined.)

alternative to PR #1562, addressing issue #1557
  • Loading branch information
catfact authored Jul 29, 2022
1 parent a32c4d6 commit fcaa01e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/core/midi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ end
-- remove a device.
_norns.midi.remove = function(id)
if Midi.devices[id] then
Midi.remove(Midi.devices[id])
if Midi.devices[id].remove then
local dev = {
id = Midi.devices[id].id,
Expand Down

0 comments on commit fcaa01e

Please sign in to comment.