Skip to content

Commit

Permalink
fix midi clock double-tap (#1680)
Browse files Browse the repository at this point in the history
  • Loading branch information
dndrks authored May 24, 2023
1 parent 36b9bf7 commit c51e7a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/core/clock.lua
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ function clock.add_params()
params:set_action("clock_midi_out_"..i,
function(x)
if x == 1 then
table.insert(send_midi_clock,i)
if not tab.contains(send_midi_clock,i) then
table.insert(send_midi_clock,i)
end
else
if tab.contains(send_midi_clock,i) then
table.remove(send_midi_clock,tab.key(send_midi_clock, i))
Expand Down Expand Up @@ -314,7 +316,6 @@ function clock.add_params()
end)

-- executes midi out (needs a subtick)
-- FIXME: lots of if's every tick blah
clock.run(function()
while true do
clock.sync(1/24)
Expand Down

0 comments on commit c51e7a9

Please sign in to comment.