Skip to content

Commit f5528a9

Browse files
authored
Merge pull request #1599 from jedgarpark/macropad-ableton
tweaked to ignore out of range clips
2 parents 272bf8e + 72ca22b commit f5528a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Macropad_Ableton/code.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: MIT
33
# Ableton Live Macropad Launcher
44
# In Ableton, choose "Launchpad Mini Mk3" as controller with MacroPad 2040 as in and out
5+
# Use empty fifth scene to allow "unlaunching" of tracks with encoder modifier
56
import board
67
from digitalio import DigitalInOut, Pull
78
import keypad
@@ -156,7 +157,7 @@
156157
"\n"
157158
)
158159
# send neopixel lightup code to key, text to display
159-
if msg_in.note < 84 and msg_in.note > 50:
160+
if msg_in.note in LP_PADS:
160161
pixels[LP_PADS[msg_in.note]] = LP_COLORS[msg_in.velocity]
161162
pixels.show()
162163
if msg_in.velocity == 21: # active pad is indicated by Live as vel 21

0 commit comments

Comments
 (0)