launchpad.py icon indicating copy to clipboard operation
launchpad.py copied to clipboard

Launchpad mini mk3 recognized as generic/"Launchpad Mk1/S/Mini"

Open jonathanhirz opened this issue 3 years ago • 3 comments

Hello. I have my launchpad mini mk3 hooked up to a raspberry pi zero w. Just trying to get a little light show going. When I run hello.py, it recognizes as "Launchpad Mk1/S/Mini", and only the top three buttons respond (Drums/Keys/User). I saw the note about compiling pygame from source, I tried that but it failed to build because of dependencies. If this is the solution, I will keep trying that, but if there's something else I am missing, and can just use pygame from apt, I would love the help. Thanks.

I tried changing some basic scripts around, here's the output from ListAll():

Available MIDI devices: 0 (b'ALSA', b'Midi Through Port-0', 0, 1, 0) 1 (b'ALSA', b'Midi Through Port-0', 1, 0, 0) 2 (b'ALSA', b'Launchpad Mini MK3 MIDI 1', 0, 1, 0) 3 (b'ALSA', b'Launchpad Mini MK3 MIDI 1', 1, 0, 0) 4 (b'ALSA', b'Launchpad Mini MK3 MIDI 2', 0, 1, 0) 5 (b'ALSA', b'Launchpad Mini MK3 MIDI 2', 1, 0, 0)

Also tried launchpad_rgb.py, and that failed too. Output was:

Running...

  • Python 3.9.2
  • PyGame 1.9.6
  • No Launchpad available

So, something is weird and my launchpad isn't being recognized.

I'm trying to make a little 8x8 pixel animation led panel with parts I had lying around, and this seems like the perfect project to get that done, so thanks for making it!

jonathanhirz avatar Nov 12 '21 20:11 jonathanhirz

Hi,

We had the same issue. When checking and opening the port it checks for the name MiniMK3 which works correctly under Windows.

We however noticed it reports as Mini MK3 under linux. Quick and dirty fix / workaround is to use the following;

Instead of this :

elif launchpad.LaunchpadMiniMk3().Check( 1 ):
		lp = launchpad.LaunchpadMiniMk3()
		if lp.Open( 1 ):
			print("Launchpad Mini Mk3")
			mode = "Pro"

Extend the check to :

elif launchpad.LaunchpadMiniMk3().Check( 1 ) or launchpad.LaunchpadMiniMk3().Check( 1, "Mini MK3" ) :
		lp = launchpad.LaunchpadMiniMk3()
		if lp.Open( 1 ) or lp.Open( 1 , "Mini MK3"): 
			print("Launchpad Mini Mk3")
			mode = "Pro"

After which the MiniMK3 is correctly recognized.

MSmeets94 avatar Dec 22 '21 16:12 MSmeets94

I haven't had a chance to check this out yet, but thank you for the help!

jonathanhirz avatar Jan 07 '22 00:01 jonathanhirz

Sì, that's the "official" way to do this, as the names are different on every platform and distribution.

FMMT666 avatar Jan 28 '22 17:01 FMMT666