Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix to add midi data when device is removed (issue #1557) " #1589

Merged
merged 1 commit into from
Jul 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions lua/core/midi.lua
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function Midi.add(dev) end
--- static callback when any midi device is removed.
-- user scripts can redefine.
-- @static
-- @param dev : a table with the removed device's id, name, and port
-- @param dev : a Midi table
function Midi.remove(dev) end

--- send midi event to device.
Expand Down Expand Up @@ -400,13 +400,7 @@ end
_norns.midi.remove = function(id)
if Midi.devices[id] then
if Midi.devices[id].remove then
local dev = {
id = Midi.devices[id].id,
name = Midi.devices[id].name,
port = Midi.devices[id].port
}
print(string.format("_norns.midi.remove: %d, %s, %s",dev.id,dev.name,dev.port))
Midi.devices[id].remove(dev)
Midi.devices[id].remove()
end
end
Midi.devices[id] = nil
Expand Down