Skip to content

Commit

Permalink
Add MIDI commands to autochord queue in FIFO order (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
deckerego authored May 16, 2023
1 parent e07f123 commit e2c7643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autochords.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def send_command(self, command, root, mask):
delay += note_delay_seconds

def queue_command(self, command, delay=0.0):
self.command_queue.append((command, time.monotonic() + delay))
self.command_queue.insert(0, (command, time.monotonic() + delay))
self.command_queue.sort(reverse=True, key=lambda n: n[1])

def rotate_event(self, encoder_position, encoder_last_position, encoder_switch):
Expand Down

0 comments on commit e2c7643

Please sign in to comment.