Skip to content

MacroPad RP2040 MIDI

MacroPad midi

Hero image

adafruit-macropad-rp2040-pinout

You can buy MacroPad on the official Adafruit store.

This blog post will allow you to make the MacroPad work as a MIDI device.

code.py
"""
Note On & Note Off
macropad.NoteOn() and macropad.NoteOff() functions takes the follwing parameters:
- note: The note (key) number either as an int (0-127) or a string which is parsed, e.g. "C4" (middle C) is 60, "A4" is 69.
- velocity: The strike velocity, 0-127, 0 is equivalent to a Note Off, defaults to 127.
"""
import time
from adafruit_macropad import MacroPad
macropad = MacroPad()
while True:
print("NoteOn/NoteOff MIDI using note number")
macropad.midi.send(macropad.NoteOn(44, 127))
time.sleep(0.5)
macropad.midi.send(macropad.NoteOff(44, 0))
time.sleep(1)

πŸ“‚ adafruit/macropad-rp2040/midi/00-note-on-off/code.pyView on GitLab β†—

When using the MacroPad as MIDI device, please refer to the following midi documentation APIs.

Both the sub-project will send MIDI notes, so you need a software that is capable of receiving the incoming MIDI information: try online MIDI piano.