Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 139 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ Now with full [Midi Fighter 64][23] support (8/2020).

Finally! Hehe, say hello to the [Mk3 Pro][24] (8/2020)

And here comes the [Midi Fighter 3D][27] (5/2021)

---
## STATUS 2021/01/xx:
## STATUS 2025/06/xx:

### Devices

Expand All @@ -40,11 +42,11 @@ Finally! Hehe, say hello to the [Mk3 Pro][24] (8/2020)

Launchpad Pro - class "LaunchpadPro()" LEDs and buttons (digitally only (yet))

Launchpad Pro Mk3 - class "LaunchpadProMk3()" EXPERIMENTAL+++ as in "should be really ok"
Launchpad Pro Mk3 - class "LaunchpadProMk3()" LEDs and buttons, pressure, everything; "should work"

Launchpad Mini Mk3 - class "LaunchpadMiniMk3()" LEDs and buttons *** RENAMED 5/2020 ***

Launchpad X - class "LaunchpadLPX()" EXPERIMENTAL+++ as in "should work really well"
Launchpad X - class "LaunchpadLPX()" LEDs and buttons and more

Launch Control - class "LaunchControl()" EXPERIMENTAL

Expand All @@ -56,13 +58,27 @@ Finally! Hehe, say hello to the [Mk3 Pro][24] (8/2020)

Midi Fighter 64 - class "MidiFighter64" LEDs and buttons

Midi Fighter 3D - class "MidiFighter3D IN WORK


> APPLE SILICON:
> You most likely need to compile your own PyGame version.
> 6/2025: The PyPI version has a broken MIDI out path, the MacPorts version comes without MIDI at all.
> I do not use Homebrew - maybe you can try your luck with that one.
> Compiling PyGame though is acually easy. Usually. Hehe.
> The process is explained somewhere below. CTRL-F your way down to "compile" in the RPi section.
> Also, please update your Launchpads to the latest version.


> PRO MK3 USERS:
> You need to disable the Launchpad's "Transmit Clock" in the MIDI settings!
> See section "For Launchpad Pro Mk3 users"
>
> The Pro Mk3 needs the latest Firmware to operate flawlessly. FW is only available
> via a Novation account- and product registration.
>
> Alternatively, visit [mat1jaczyyy's Firmware Utility][28] on a Chromium-based browser to update the firmware of Pro Mk3.
> USE THIS AT YOUR OWN RISK!

Please notice that the class "LaunchpadMk3()" was renamed to "LaunchpadMiniMk3()" in 5/2020.
This was necessary to avoid confusion with the device search string and the new "Pro-Mk3" Launchpad.
Expand All @@ -86,6 +102,21 @@ Successfully tested with Ubuntu 18.04-LTS+. Requires compiling your own PyGame t
---
## NEWS

### CHANGES 2025/06/XX:
- added notes for Apple Silicon
- added notes updating the MK2

### CHANGES 2021/05/XX:
- fixed Launchpad Mk1 code in buttons_raw.py demo; thx to jmtrivial
- added first Midi Fighter 3D code; derived from the MF64
- added MF3D LedCtrlRaw()
- added MF3D ButtonStateRaw()
- added MF3D LedCtrlXY()

### CHANGES 2021/04/XX:
- added link to driver for Mk1 Launchpad and Mini
- fixed Mk1 Automap buttons always yellow; thx to mutax and Ferada

### CHANGES 2021/01/XX:
- fix for Python 3.9
- updated documentation for raw LED and button codes (top row had wrong values)
Expand Down Expand Up @@ -322,7 +353,8 @@ Successfully tested with Ubuntu 18.04-LTS+. Requires compiling your own PyGame t

---
## Upcoming attractions, notes and thoughts


- "AP3": AKAI Professional APC mini MK2
- "PK3": the Pro Mk3 has some issues; needs to be fixed
- "All": optionally avoid resetting the X and Pro Mk3 to Live mode in Close(); (bc LEDs turn on)
- "FNT": fix character set; e.g. "!", "0", "N" and probably many more
Expand Down Expand Up @@ -551,7 +583,7 @@ The licensor cannot revoke these freedoms as long as you follow the license term
## Requirements

- [Python][2] 2, 3
- [Pygame][3] v1.9.1, (v1.9.2), v1.9.3, v1.9.4-XX, ...
- [Pygame][3] v1.9.1, (v1.9.2), v1.9.3, v1.9.4-XX, ..., v2.6.1 ...

Some Pygame versions do not work on some OSes (e.g. v1.9.2 might cause trouble
with Windows 7/10). I cannot tell you any more than just "try!".
Expand Down Expand Up @@ -586,6 +618,7 @@ Previously, launchpad.py was tested under
- Beagle Bone (Black)
- Banana Pi (Pro/M2/R1)
- pcDuino V3
- Apple Silicon (6/2025; you'll need to compile your own PyGame version)
- ...

Supported and tested red/green LED Launchpad devices, here referred to as "Classic" or "Mk1":
Expand Down Expand Up @@ -616,6 +649,8 @@ name it once shipped the first red/green LED with!
---
## Compiling your own PyGame

As of 6/2025, I would recommend to build it the "compile via 'setup.py'" way, below.

If you have problems with errors like "alsa.conf" or the ListAll() method
not recognizing any attached Launchpads on newer systems, especially Ubuntu 17/18,
you might consider compiling your own PyGame version.
Expand Down Expand Up @@ -675,6 +710,15 @@ name it once shipped the first red/green LED with!
If you need a fully working PyGame, with all features, I leave it up to you,
to resolve the remaining "not found" issues, but they're not required by Launchpad.py

In case Cython is missing, the 'setup.py' process will print the instructions to install it.
Otherwise, simply install it via

pip3 install cython

Assuming your Python 3 pip is named pip3, of course. Otherwise, check your matching version with

pip --version

Make sure PORTMIDI and PORTTIME are marked with "found", then continue the build process.
After a hopfully error-free build, execute (Ubuntu example for superuser access)

Expand All @@ -687,7 +731,7 @@ name it once shipped the first red/green LED with!
...


### Compile via "configure" (old)
### Compile via "configure" (old, not recommended)

Newer Python variants come with a fully functional setup.py (see above).
I just leave the old compiling instructions here...
Expand Down Expand Up @@ -738,6 +782,12 @@ name it once shipped the first red/green LED with!
---
## Random Notes

### Botton events work, but LED methods fail (won't light up)

In case of Apple Silicon, pls compile your own PyGame version. Explained above.
This also might me a solution on other rare or ARM platforms.


### Button, value and potentiometer polling

Until now (6/2017), Launchpad.py does not have an event system built in. You need to poll the buttons' or
Expand All @@ -755,6 +805,11 @@ name it once shipped the first red/green LED with!

### For Launchpad Mk1 users (the original "Classic" Launchpad):

Also valid for the Mk1 Mini.

(Most likely still) requires an USB driver for Windoze (7/10/...).
Look out for the Novation [USB Driver 2.xx][26].

USE CLASS "Launchpad":

lp = launchpad.Launchpad()
Expand Down Expand Up @@ -787,6 +842,9 @@ name it once shipped the first red/green LED with!

lp = launchpad.LaunchpadMk2()

Instructions to safely update to the latest version [here][29].
Especially for Apple Silicon!

### For Launchpad Mini Mk3 users

USE CLASS "LaunchpadMiniMk3":
Expand Down Expand Up @@ -904,6 +962,10 @@ There is no easy fix for this (unless you wish to spend a lot of time completely

### For Mac users

#### Apple Silicon

You need to compile your own PyGame version. See above.

#### Mac Python and Pygame

Good news, everybody. It now works with macOS Sierra \o/
Expand Down Expand Up @@ -1173,7 +1235,7 @@ Functions requiring a color code have a "...ByCode" naming style.


---
## Midi Fighter 64 class methods overview
## Midi Fighter 64 and Midi Fighter 3D class methods overview

*WORK IN PROGESS*

Expand Down Expand Up @@ -1201,7 +1263,6 @@ There is no possibility to control the RGB LEDs individually.
![RGB color palette](/images/mf64_colorcodes.png)



---
## Detailed description of common Launchpad methods

Expand Down Expand Up @@ -2377,8 +2438,8 @@ There is no possibility to control the RGB LEDs individually.
PARAMS:
RETURN: [ ] An empty list if no event occured, otherwise...
[ <x> , <y>, <value> ] ... a list with three fields:
<x> 0..7; x coordinate of button
<y> 0..7; y coordinate of button
<x> 0..7; x coordinate of button (0..3 for Midi Fighter 3D)
<y> 0..7; y coordinate of button (0..3 for Midi Fighter 3D)
<value> >0 = pressed; 0 = released


Expand Down Expand Up @@ -2415,6 +2476,7 @@ There is no possibility to control the RGB LEDs individually.
MODE_ANIM_TRIANGLE

PARAMS: <led> 36..99; number of the LED to control
see tables at end of file
<colorcode> 0..127; color code
<mode> [OPTIONAL] 18..53, see above
RETURN:
Expand Down Expand Up @@ -2449,6 +2511,7 @@ There is no possibility to control the RGB LEDs individually.
MODE_ANIM_TRIANGLE

PARAMS: <led> 36..99; number of the LED to control
see tables at end of file
<mode> 18..53; see above
RETURN:

Expand All @@ -2459,14 +2522,16 @@ There is no possibility to control the RGB LEDs individually.
See table with coordinates at the end of this document.
Color codes are somewhere above (see image).

PARAMS: <x> 0..7; x coordinate
<y> 0..7; y coordinate
PARAMS: <x> 0..7; x coordinate (0..3 for Midi Fighter 3D)
<y> 0..7; y coordinate (0..3 for Midi Fighter 3D)
<colorcode> 0..127; color code
RETURN:


### LedCtrlChar( char, color, [offsx = 0], [offsy = 0], [coloroff = 0] )

Only for Midi Fighter 64!

Displays character <char> with a color of <color> and a
lateral offset of <offsx> (-8..8) on the Midi Fighter.
<offsy> does not have yet any function.
Expand Down Expand Up @@ -2496,6 +2561,8 @@ There is no possibility to control the RGB LEDs individually.

### LedCtrlString( string, color, [coloroff = 0], [direction = 0], [waitms = 150] )

Only for Midi Fighter 64!

Scrolls <string> across the Midi Fighter's 8x8 matrix.
<color> specifies the color of the string and <coloroff> the background.
<direction> determines the direction of scrolling.
Expand Down Expand Up @@ -3144,6 +3211,62 @@ The mode keys return:



---
## (TODO) Led and Button codes, Midi Fighter 3D

### RAW Mode

Button and LED codes depend on the selected bank, the bottom row with the small buttons.
Selected bank is indicated with a ```#x#``` here.

Notice that the side button codes 36-40 might overlap with the arcade buttons.
This behaviour can be reprogrammed with the Midi Fighter Utility.

+---+---+---+---+ +---+---+---+---+
| 39| | | 36| | 55| | | 52|
+---+ +---+---+---+---+ +---+ +---+ +---+---+---+---+ +---+
| 23| | 43| | | 40| | 20| | 29| | 59| | | 56| | 26|
| 24| +---+---+---+---+ | 21| | 30| +---+---+---+---+ | 27|
| 25| | 47| | | 44| | 22| | 31| | 63| | | 60| | 28|
+---+ +---+---+---+---+ +---+ +---+ +---+---+---+---+ +---+
| 51| | | 48| | 67| | | 64|
+---+---+---+---+ +---+---+---+---+
+---+---+---+---+ +---+---+---+---+
| 3 | 2 | 1 |#0#| | 3 | 2 |#1#| 0 |
+---+---+---+---+ +---+---+---+---+

+---+---+---+---+ +---+---+---+---+
| 71| | | 68| | 87| | | 84|
+---+ +---+---+---+---+ +---+ +---+ +---+---+---+---+ +---+
| 35| | 75| | | 72| | 32| | 41| | 91| | | 88| | 38|
| 36| +---+---+---+---+ | 33| | 42| +---+---+---+---+ | 39|
| 37| | 79| | | 76| | 34| | 43| | 95| | | 92| | 40|
+---+ +---+---+---+---+ +---+ +---+ +---+---+---+---+ +---+
| 83| | | 80| | 99| | | 96|
+---+---+---+---+ +---+---+---+---+
+---+---+---+---+ +---+---+---+---+
| 3 |#2#| 1 | 0 | |#3#| 2 | 1 | 0 |
+---+---+---+---+ +---+---+---+---+


### XY MODE

0 1 2 3
+---+---+---+---+
0 | |1/0| | | 0
+---+ +---+---+---+---+ +---+
1 | | | | | | | | | 1
| | +---+---+---+---+ | |
2 | | | | | |3/2| | | 2
+---+ +---+---+---+---+ +---+
3 |0/3| | | | 3
+---+---+---+---+
+---+---+---+---+
| | | | |
+---+---+---+---+



---
Have fun
FMMT666(ASkr)
Expand Down Expand Up @@ -3175,3 +3298,7 @@ FMMT666(ASkr)
[23]: https://twitter.com/FMMT666/status/1299842680533463043
[24]: https://twitter.com/FMMT666/status/1299478117497688073
[25]: https://www.midifighter.com/
[26]: https://customer.novationmusic.com/en/support/downloads?brand=Novation&product_by_type=510&download_type=all
[27]: https://twitter.com/FMMT666/status/1390806661829386241
[28]: https://fw.mat1jaczyyy.com
[29]: https://support.novationmusic.com/hc/en-gb/articles/115003688729-My-Launchpad-MK2-Freezes-During-The-Firmware-Update
11 changes: 9 additions & 2 deletions examples/buttons_raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#
# Quick button test.
# Works with these Launchpads: Mk1, Mk2, Mini Mk3, S/Mini, Pro, Pro Mk3
# And these: Midi Figther 64
# And these: Midi Fighter 64, Mifi Fighter 3D
#
#
# FMMT666(ASkr) 7/2013..8/2020
# FMMT666(ASkr) 7/2013..5/2021
# www.askrprojects.net
#

Expand Down Expand Up @@ -80,7 +80,14 @@ def main():
print("Midi Fighter 64")
mode = "F64"

elif launchpad.MidiFighter3D().Check( 0 ):
lp = launchpad.MidiFighter3D()
if lp.Open( 0 ):
print("Midi Fighter 3D")
mode = "F3D"

else:
lp = launchpad.Launchpad()
if lp.Open():
print("Launchpad Mk1/S/Mini")
mode = "Mk1"
Expand Down
1 change: 1 addition & 0 deletions launchpad_py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
from launchpad_py.launchpad import LaunchpadMiniMk3
from launchpad_py.launchpad import LaunchpadLPX
from launchpad_py.launchpad import MidiFighter64
from launchpad_py.launchpad import MidiFighter3D
from launchpad_py.launchpad import LaunchpadProMk3
from launchpad_py import charset
Loading