Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 9 additions & 3 deletions common/src/lua/simplemidi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ init_element_midi = function(self)

if p1 == -1 then
p1 = midi_auto_p1(self)
if mode == 1 then
p1 = p1 % 32
end
end

if p2 == -1 then
Expand All @@ -64,8 +67,8 @@ init_element_midi = function(self)
end
end

self.gmrr = function(self, ev, ch, cmd, p1, features)
gmrr(self, ev, ch, cmd, p1, features)
self.gmrr = function(self, ev, ch, cmd, p1, features, mode)
gmrr(self, ev, ch, cmd, p1, features, mode)
end
end

Expand All @@ -75,7 +78,7 @@ init_simple_midi = function()
end
end

gmrr = function(self, ev, ch, cmd, p1, features)
gmrr = function(self, ev, ch, cmd, p1, features, mode)
if ev == -1 then
ev = event_function_name():sub(1, -2)
end
Expand Down Expand Up @@ -104,6 +107,9 @@ gmrr = function(self, ev, ch, cmd, p1, features)
event[2] = 144
end
local v = event[4]
if mode == 1 then
v = 128 * v
end
if
event[1] == ch
and event[2] == cmd
Expand Down
Loading
Loading