From 79aef33c5f540a9f8e22ed5f33f72ded573f8fb7 Mon Sep 17 00:00:00 2001 From: Miguel Guthridge Date: Fri, 19 Feb 2021 21:23:37 +1100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=94=A8=20FIX:=20Unable=20to=20exit=20?= =?UTF-8?q?unassigned=20note=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function for detecting when to open the menu was blocked due to events being ignored --- noteprocessors/processnotes.py | 6 ++---- noteprocessors/unassigned.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/noteprocessors/processnotes.py b/noteprocessors/processnotes.py index f7cd8c7..2f4eb01 100644 --- a/noteprocessors/processnotes.py +++ b/noteprocessors/processnotes.py @@ -79,10 +79,8 @@ def process(command): object_to_call.process(command) - if command.ignored: return - - if command.ignored: return - + if command.ignored: break + # Then check the note mode menu button processNoteModeMenuOpener(command) diff --git a/noteprocessors/unassigned.py b/noteprocessors/unassigned.py index 603b213..5eefc40 100644 --- a/noteprocessors/unassigned.py +++ b/noteprocessors/unassigned.py @@ -43,7 +43,7 @@ def process(command): command.addProcessor("Unassigned processor") if command.type is not eventconsts.TYPE_INCONTROL and command.type is not eventconsts.TYPE_TRANSPORT: - command.ignore("Ignore all events") + command.ignore("Ignore all events", True) return From 5e1a5ec2a623129feac22d0fc938e6a5f01c1153 Mon Sep 17 00:00:00 2001 From: Miguel Guthridge Date: Fri, 19 Feb 2021 21:30:59 +1100 Subject: [PATCH 2/4] =?UTF-8?q?=E2=9C=8F=20CHANGE:=20Update=20legacy=20cod?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit command.actions.appendAction("Some action"); command.handled = True; was plain old messy --- otherprocessors/processdefault.py | 22 ++++++---------- windowprocessors/processchannelrack.py | 35 +++++++++----------------- 2 files changed, 20 insertions(+), 37 deletions(-) diff --git a/otherprocessors/processdefault.py b/otherprocessors/processdefault.py index ae08031..e24a2aa 100644 --- a/otherprocessors/processdefault.py +++ b/otherprocessors/processdefault.py @@ -40,26 +40,22 @@ def process(command): # Play-pause: only on lift if command.id == eventconsts.TRANSPORT_PLAY and command.is_lift: transport.start() - command.actions.appendAction("Play/Pause Transport") - command.handled = True + command.handle("Play/Pause Transport") # Stop: only on lift if command.id == eventconsts.TRANSPORT_STOP and command.is_lift: transport.stop() - command.actions.appendAction("Stop Transport") - command.handled = True + command.handle("Stop Transport") # Loop: only on lift if command.id == eventconsts.TRANSPORT_LOOP and command.is_lift: transport.setLoopMode() - command.actions.appendAction("Toggle Loop Mode") - command.handled = True + command.handle("Toggle Loop Mode") # Record: only on lift if command.id == eventconsts.TRANSPORT_RECORD and command.is_lift: transport.record() - command.actions.appendAction("Toggle Recording") - command.handled = True + command.handle("Toggle Recording") # Skip forward: start on press, stop on lift, faster on double press? if command.id == eventconsts.TRANSPORT_FORWARD: @@ -74,7 +70,7 @@ def process(command): if command.is_lift is True: transport.continuousMove(speed, 0) command.actions.appendAction("Stopped") - command.handled = True + command.handle("Continuous move", True) # Skip back: start on press, stop on lift, faster on double press? if command.id == eventconsts.TRANSPORT_BACK: @@ -89,18 +85,16 @@ def process(command): if command.is_lift is True: transport.continuousMove(speed, 0) command.actions.appendAction("Stopped") - command.handled = True + command.handle("Continuous move", True) # Next Track: next UI element if command.id == eventconsts.TRANSPORT_TRACK_NEXT and command.is_lift: ui.next() - command.actions.appendAction("Next UI Element") - command.handled = True + command.handle("Next UI Element") # Prev Track: prev UI element if command.id == eventconsts.TRANSPORT_TRACK_PREVIOUS and command.is_lift: ui.previous() - command.actions.appendAction("Previous UI Element") - command.handled = True + command.handle("Previous UI Element") diff --git a/windowprocessors/processchannelrack.py b/windowprocessors/processchannelrack.py index 7b813eb..4559f80 100644 --- a/windowprocessors/processchannelrack.py +++ b/windowprocessors/processchannelrack.py @@ -110,29 +110,24 @@ def processBitMode(command): if coord == [4, 1]: if command.is_double_click: gridBits.resetScroll() - command.actions.appendAction("Grid Bits: Reset scroll") - command.handled = True + command.handle("Grid Bits: Reset scroll") else: gridBits.scrollLeft() - command.actions.appendAction("Grid Bits: Scroll left") - command.handled = True + command.handle("Grid Bits: Scroll left") if coord == [5, 1]: gridBits.scrollRight() - command.actions.appendAction("Grid Bits: Scroll right") - command.handled = True + command.handle("Grid Bits: Scroll right") # Zoom grid bits if coord == [6, 1]: gridBits.zoomOut() - command.actions.appendAction("Grid Bits: Zoom out") - command.handled = True + command.handle("Grid Bits: Zoom out") if coord == [7, 1]: if command.is_double_click: gridBits.resetZoom() - command.actions.appendAction("Grid Bits: Reset zoom") + command.handle("Grid Bits: Reset zoom") else: gridBits.zoomIn() - command.actions.appendAction("Grid Bits: Zoom in") - command.handled = True + command.handle("Grid Bits: Zoom in") # Process when in menu def processMenuMode(command): @@ -142,32 +137,26 @@ def processMenuMode(command): # Next/prev track if coord == [0, 0]: ui.previous() - command.actions.appendAction("Channel Rack: Previous channel") - command.handled = True + command.handle("Channel Rack: Previous channel") elif coord == [0, 1]: ui.next() - command.actions.appendAction("Channel Rack: Next channel") - command.handled = True + command.handle("Channel Rack: Next channel") # Cut, Copy, Paste elif coord == [2, 0]: ui.cut() - command.actions.appendAction("UI: Cut") - command.handled = True + command.handle("UI: Cut") elif coord == [3, 0]: ui.copy() - command.actions.appendAction("UI: Copy") - command.handled = True + command.handle("UI: Copy") elif coord == [4, 0]: ui.paste() - command.actions.appendAction("UI: Paste") - command.handled = True + command.handle("UI: Paste") # To piano roll elif coord == [7, 1]: ui.showWindow(internal.consts.WINDOW_PIANO_ROLL) - command.actions.appendAction("Sent to pianoroll") - command.handled = True + command.handle("Sent to pianoroll") # Plugin window elif coord == [6, 1]: From 4f32b9fad02d03bb43be7bc759492fd0cb208c00 Mon Sep 17 00:00:00 2001 From: Miguel Guthridge Date: Fri, 19 Feb 2021 21:37:22 +1100 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=94=A8=20FIX:=20Fast-forward=20and=20?= =?UTF-8?q?Rewind=20controls=20didn't=20work=20in=20playlist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- windowprocessors/processplaylist.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/windowprocessors/processplaylist.py b/windowprocessors/processplaylist.py index 9eaf393..e85b51f 100644 --- a/windowprocessors/processplaylist.py +++ b/windowprocessors/processplaylist.py @@ -37,18 +37,18 @@ def process(command): # Process marker jumps if command.type == eventconsts.TYPE_TRANSPORT: if (command.id == eventconsts.TRANSPORT_BACK or command.id == eventconsts.TRANSPORT_FORWARD): - if not internal.shifts["MAIN"].use(): - if command.is_lift: - # Check that markers exist - if arrangement.getMarkerName(0) is not "": + # Only if markers exist + if arrangement.getMarkerName(0) is not "": + if not internal.shifts["MAIN"].use(): + if command.is_lift: if command.id == eventconsts.TRANSPORT_BACK: transport.markerJumpJog(-1) command.handle("Transport: Jump to previous marker") if command.id == eventconsts.TRANSPORT_FORWARD: transport.markerJumpJog(1) command.handle("Transport: Jump to next marker") - else: - command.handle("Catch transport skips", silent=True) + else: + command.handle("Catch transport skips", silent=True) From aece22c9f2506a90b4da7972e434ac116d0aa78c Mon Sep 17 00:00:00 2001 From: Miguel Guthridge Date: Fri, 19 Feb 2021 21:38:08 +1100 Subject: [PATCH 4/4] =?UTF-8?q?=E2=9C=8F=20CHANGE:=20Bump=20version=20numb?= =?UTF-8?q?er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/consts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/consts.py b/internal/consts.py index bdec3b9..13ac63f 100644 --- a/internal/consts.py +++ b/internal/consts.py @@ -18,7 +18,7 @@ SCRIPT_AUTHOR = "Miguel Guthridge" SCRIPT_VERSION_MAJOR = 3 SCRIPT_VERSION_MINOR = 0 -SCRIPT_VERSION_REVISION = 0 +SCRIPT_VERSION_REVISION = 1 SCRIPT_VERSION_SUFFIX = "" MIN_FL_SCRIPT_VERSION = 8 SCRIPT_URL = "https://github.com/MiguelGuthridge/Novation-LaunchKey-Mk2-Script"