Skip to content

Commit

Permalink
Merge pull request #60 from MiguelGuthridge/miguel/fix-lk-macos-recog…
Browse files Browse the repository at this point in the history
…nition

Fix bug where some Launchkey devices weren't detected on MacOS
  • Loading branch information
MaddyGuthridge authored Oct 6, 2022
2 parents 2f5269b + b0fbf4e commit af912be
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/devices/novation/launchkey/mk3/lk_25_37.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ def getDrumPadSize(cls) -> tuple[int, int]:
return 2, 8

def getDeviceNumber(self) -> int:
return 2 if '2' in device.getName() else 1
if (
'MIDIIN2' in device.getName()
or 'DAW' in device.getName()
):
return 2
else:
return 1

@classmethod
def create(cls, event: FlMidiMsg = None, id: str = None) -> 'Device':
Expand Down
8 changes: 7 additions & 1 deletion src/devices/novation/launchkey/mk3/lk_49_61.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,13 @@ def getDrumPadSize(cls) -> tuple[int, int]:
return 2, 8

def getDeviceNumber(self) -> int:
return 2 if '2' in device.getName() else 1
if (
'MIDIIN2' in device.getName()
or 'DAW' in device.getName()
):
return 2
else:
return 1

@classmethod
def create(cls, event: FlMidiMsg = None, id: str = None) -> 'Device':
Expand Down
8 changes: 7 additions & 1 deletion src/devices/novation/launchkey/mk3_mini/mini.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ def getDrumPadSize(cls) -> tuple[int, int]:
return 2, 8

def getDeviceNumber(self) -> int:
return 2 if '2' in device.getName() else 1
if (
'MIDIIN2' in device.getName()
or 'DAW' in device.getName()
):
return 2
else:
return 1

@classmethod
def create(cls, event: FlMidiMsg = None, id: str = None) -> 'Device':
Expand Down

0 comments on commit af912be

Please sign in to comment.