Python API for the Novation Launchpad Mini MK3
Project description
lpminimk3
Python API for the Novation Launchpad Mini MK3 with an object-oriented approach.
The goals of this project are as follows:
- Intuitive, object-oriented design
- Convenient for use in script or in shell
- Access to all (or most) of the Launchpad Mini MK3 MIDI features
Installation
To install the most stable version of this package, run:
$ pip install lpminimk3
Usage example
Make sure your Launchpad is connected to your computer.
In script
"""Displays a random array of colors for 5 seconds."""
from lpminimk3 import Mode, find_launchpads
import random
import time
lp = find_launchpads()[0] # Get the first available launchpad
lp.open() # Open device for reading and writing on MIDI interface (by default)
lp.mode = Mode.PROG # Switch to the programmer mode
for led_id in range(81): # Loop through all 81 LEDs
lp.panel.led(led_id).color = random.randint(1, 127) # Set LED to a random color
time.sleep(5) # Keep LEDs on for a while
for led_id in range(81):
lp.panel.led(led_id).reset() # Turn off LED
View example file here.
In shell
$ python
>>> import lpminimk3
>>> lp = lpminimk3.find_launchpads()[0]
>>> lp.open()
>>> lp.device_inquiry() # Query device
MidiEvent(message=[240, 0, 32, 41, 2, 13, 14, 1, 247], deltatime=150.938086752)
>>>
>>> lp.mode = 'prog' # Switch to programmer mode
>>> lp.grid.led('0x0').color = 10 # Set color to yellow
>>> lp.grid.led(1,0).color = 10 # Set color of next LED to yellow
>>> lp.panel.led('logo').color = 1 # Set logo LED color to white
Release History
- 0.1.2
- Properly bump up version
- 0.1.1
- Cleanup README
- 0.1.0
- First release ever (Still a work in progress)
Notes
- Work in progress, so expect things to break!
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lpminimk3-0.1.2.tar.gz.
File metadata
- Download URL: lpminimk3-0.1.2.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4be83e68cdd12f92b1303a3c422ad10b224a8c9e835117f5acdc3df9b91e2ef9
|
|
| MD5 |
a3a3854bb879fa9a8eaf451eb4fb06f9
|
|
| BLAKE2b-256 |
2af5c6e40e2b855cc31beb3fff2a60bb9071330635f2df65a907936565784e84
|
File details
Details for the file lpminimk3-0.1.2-py3-none-any.whl.
File metadata
- Download URL: lpminimk3-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9e6e0f1cfd5c106ab912671f778d89a4356eaf894d6563f91b4579d48deefab
|
|
| MD5 |
5672b8d76186cd2ee369e82c0c82c222
|
|
| BLAKE2b-256 |
c5a1561c9c3ec8209eaa621b0a95ca38b40cd041964f7d06bc0bd59dc6493c85
|