Skip to content

Commit

Permalink
v0.4.5c: forgot note off and cc websocket messages
Browse files Browse the repository at this point in the history
  • Loading branch information
euwbah committed Aug 8, 2021
1 parent 2ddb8dc commit 51711bb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,15 @@ def do_later():

if CONFIGS.MPE_MODE:
self.send_note_off(channel, note, vel)
else:
if existing := tracker.check_existing(channel):

if existing := tracker.check_existing(channel):
if not CONFIGS.MPE_MODE:
self.send_note_off(existing.channel_sent, existing.midi_note_sent, vel)
else:
print('warning: unable to find existing note to turn off in MIDI mode. '
'There may be a stuck note present.')

ws_server.send_note_off(existing.edosteps_from_a4, vel)
else:
print('warning: unable to find existing note to turn off in websocket/MIDI mode. '
'There may be a stuck note present.')

tracker.register_off(channel)

Expand Down Expand Up @@ -188,6 +191,8 @@ def send_cc(self, channel, cc, val):
else:
self.out_port.send_message([midi.CONTROL_CHANGE + channel, cc, val])

ws_server.send_cc(cc, val);

def send_pitch_bend(self, channel, pitchbend):
lsb, msb = convert.pitch_bend_to_raw_pitch_msg(pitchbend)
if channel == ALL_CHANNELS:
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def intable(s):


if __name__ == '__main__':
print('microtonal seaboard retuner v0.4.5')
print('microtonal seaboard retuner v0.4.5c')

has_read_configs = configs.read_configs()

Expand Down

0 comments on commit 51711bb

Please sign in to comment.