The MIDI keypad can send note on/off messages as well as pitch bend and mod wheel CC (continuous controller) messages. This example code works on the NeoTrellis M4 with both USB MIDI over the micro USB port and classic MIDI over the UART serial port.

In order to make it simple to get up and running with your Trellis M4 Classic MIDI Controller with no programming required, we've created a drag-and-drop firmware you can use. You can skip to the page Custom Code in Arduino if you want to customize things!

If you're just getting started with your NeoTrellis, there is lots more info here in the main Learn Guide!

Download

First, download the firmware file linked in the button below and save it to your computer hard drive somewhere you'll be able to find it, such as your Downloads folder.

This program will replace CircuitPython, to get back to your CircuitPython projects, reinstall it by following https://learn.adafruit.com/adafruit-neotrellis-m4/circuitpython

Install the Firmware

Plug your NeoTrellis M4 into your computer with a good quality, data capable USB cable. Life is too short to go through the pain of accidentally using a power-only USB cable, so please round up any you own, cut them in half, travel to a distant land, bury them, and dance on their grave.

Your NeoTrellis will start up, and you'll see a purple indicator light on the back side.

Bootloader Mode

Now, we'll put the NeoTrellis into "bootloader" mode. In this mode it will appear as a USB drive on your computer and will be ready to receive a new .uf2 firmware file. Use a thin, pointed object such as a headphone plug to double-click the reset button on the back side of the board.

Synth Connection

Finally, plug your MIDI cable into your synthesizer MIDI-IN jack, power up the NeoTrellis via USB power, and play!

While playing, use the keypad as a chromatic keyboard,  the forward/backward tilt as mod wheel control, and the side-to-side tilt as pitch bend.

MIDI Arpeggiator

The MIDI arpeggiator example code works on the NeoTrellis with both USB MIDI over the micro USB port and classic MIDI over the UART serial port.

Install it this file below the same way as you did with the keypad firmware on the previous page.

Customize with Arduino

If you'd like to customize things further, you can edit the code in Arduino. Open your Arduino IDE. If you are new to Arduino, check out this guide: Adafruit Arduino IDE Setup.

Head here to download the Adafruit_NeoTrellisM4 library and example code. You can learn more about Arduino libraries by reading this guide from Adafruit.

You'll also need to make sure you've updated your Board Definitions to version 1.2.8 or higher of the SAMD boards by heading to Tools -> Board Manager in the Arduino IDE, filter for "Adafruit SAMD" and choose the install shown below.

This guide was first published on Nov 20, 2018. It was last updated on Nov 20, 2018.
This page (MIDI Keypad & MIDI Arpeggiator) was last updated on Oct 24, 2020.