JUST USE midigrid.
Folks have been doing some good work over at the midigrid repo. I recommend using this since it is in active development by a handful of people, it supports more devices, and is just generally more future-proof. It also uses some of the same code as this repo (with my blessing). As far as I can tell, the only thing this lib has that it doesn't is the deliciously snarky name.
Implements some of the Grid API for versions of the Novation Launchpad that only have buttons and red and green LEDs. To be more Grid-like, the top row of the Launchpad is treated as a 10th column (i.e., X = 10).
16 possible colors 0-15. 4 red and green levels:
- More significant 2 bits (
8
and4
) are green. - Less significant 2 bits (
2
and1
) are red.
Set LED at (x, y) to color (see color bits above).
Set all LEDs to color.
Empty - only here to match Grid API.
Sets up MIDI connection (add/remove) overrides if not set up already, and
returns the API. id
argument is currently ignored.
Key handler. Bring your own implementation, just like Grid.
Update MIDI devices and find a device that matches known names of supported
Launchpad devices. Return true
if device found, false
otherwise. Called
by lp.connect
, probably don't need to call manually.
Clear key handler.
- Multiple devices
- RGB, Control, Keys, etc. (OG/Mini Red/Green only)