# HG changeset patch # User Andrew McPherson # Date 1385415362 0 # Node ID 61e3c9df467406b26a8e49ea155cf06e2d811aed # Parent b9038a983e11ce5da932501ce345423c85a5081d Fix bug where TouchKeys standalone mode turns off when mode is changed. diff -r b9038a983e11 -r 61e3c9df4674 Source/TouchKeys/MidiKeyboardSegment.cpp --- a/Source/TouchKeys/MidiKeyboardSegment.cpp Sat Nov 23 19:26:24 2013 +0000 +++ b/Source/TouchKeys/MidiKeyboardSegment.cpp Mon Nov 25 21:36:02 2013 +0000 @@ -210,21 +210,21 @@ void MidiKeyboardSegment::setModeOff() { allNotesOff(); - removeAllOscListeners(); + removeOscListener("/midi/noteon"); setAllControllerActionsTo(kControlActionBlock); mode_ = ModeOff; } void MidiKeyboardSegment::setModePassThrough() { allNotesOff(); - removeAllOscListeners(); + removeOscListener("/midi/noteon"); setAllControllerActionsTo(kControlActionPassthrough); mode_ = ModePassThrough; } void MidiKeyboardSegment::setModeMonophonic() { allNotesOff(); - removeAllOscListeners(); + removeOscListener("/midi/noteon"); setAllControllerActionsTo(kControlActionPassthrough); mode_ = ModeMonophonic; } @@ -232,7 +232,6 @@ void MidiKeyboardSegment::setModePolyphonic() { // First turn off any notes in the current mode allNotesOff(); - removeAllOscListeners(); setAllControllerActionsTo(kControlActionBroadcast); // Register a callback for touchkey data. When we get a note-on message,