Skip to content

pulling latest #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
105 changes: 96 additions & 9 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 2021/11/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,18 @@ 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


> 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 +93,17 @@ Successfully tested with Ubuntu 18.04-LTS+. Requires compiling your own PyGame t
---
## NEWS

### 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 @@ -755,6 +773,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 @@ -1173,7 +1196,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 +1224,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 +2399,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 +2437,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 +2472,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 +2483,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 +2522,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 +3172,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 +3259,6 @@ 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
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