Skip to main content

Use the Launchpad-Mk2 as a Macro Device

Project description

MacroPad




Simple Example

import macropad


# Create Pad Instance
lp = macropad.MacroPad()


# Bind function btn_up to Button X0 Y0 with color red and on press color green
@lp.bind(x=0, y=0, colorcode=5, color_on_activate=21)
def btn_up():
    print("X-0 Y-0 PRESSED!")

# Start the Button Listener Thread
lp.start_binding_execution_thread()


# Wait forever
while True: continue


# Only needed if the programm is ending and not killed, without you get some MIDI errors
lp.close()




Stop Button Listener Thread

lp.stop_binding_execution_thread()




Unbind Keys

# Unbind Button X0 Y0
lp.unbind(x=0, y=0)

# Unbind Every Button
lp.unbind_all()




Coltrol Led's

# Turn Led X0 Y0 red
lp.enable_led(x=0, y=0, colorcode=5)

# Turn Led X0 Y0 off
lp.disable_led(x=0, y=0)

# Turn all Led´s off
lp.disable_all_leds()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

macropad-1.1.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

macropad-1.1.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file macropad-1.1.1.tar.gz.

File metadata

  • Download URL: macropad-1.1.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.7

File hashes

Hashes for macropad-1.1.1.tar.gz
Algorithm Hash digest
SHA256 92af56a0c02d432e6acc3c8d04207b39126c1d5a134657643cca111d6e7da9c8
MD5 fb7728606267b72a4b3e7921beb174bb
BLAKE2b-256 695af47b8221bd1e3b925f781b5d74283d31cb239b364385713619123c06be6a

See more details on using hashes here.

File details

Details for the file macropad-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: macropad-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.7

File hashes

Hashes for macropad-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a82918836abf8ed4ed56e639b8421ce43ece3f7aa8f9a0232378a4771edb04e
MD5 c5f76ea5dac636be6c42f8e6d7343a79
BLAKE2b-256 3e04c989adc317841940d018623ed4f918991f3a6ef25f10b2ded532fe90df8c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page