# Adafruit MIDI FeatherWing

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/095/276/medium800/adafruit_products_MIDI_FW_front.jpg?1601489446)

Turn your Feather into a song-bird with this musically-enabled FeatherWing that adds MIDI input and output jacks to just about any Feather. You get both input and output DIN-5 MIDI jacks, a 3V optical isolator so you can interface with MIDI on 3.3V logic/power microcontrollers, and two blinky indicator LEDs underneath the jacks to help you know when data is sent and received.

![](https://cdn-learn.adafruit.com/assets/assets/000/095/279/medium800/adafruit_products_MIDI_FW_top_angle_back.jpg?1601489507)

[For those who have moved from DIN-5 jacks to "TRS MIDI A" 3.5mm jacks](https://www.midi.org/midi-articles/updated-how-to-make-your-own-3-5mm-mini-stereo-trs-to-midi-5-pin-din-cables), we provide spots to solder in 3.5mm stereo jacks (optional and not included by default)

We use the hardware serial pins RX and TX to send/receive data - you'll need to set these to 31250 baud in your programming language and then send/receive MIDI packet data. [For example, here's how you would do it in Arduino](https://learn.adafruit.com/adafruit-midi-featherwing/arduino-midi-example) thanks to this [full-featured library with helpers](https://github.com/FortySevenEffects/arduino_midi_library). [Here's an example on using a UART for MIDI transport in CircuitPython](https://learn.adafruit.com/adafruit-midi-featherwing/circuitpython-midi-example).

![](https://cdn-learn.adafruit.com/assets/assets/000/095/278/medium800/adafruit_products_MIDI_FW_top_header.jpg?1601489477)

Because we use the UART, this works with all Feathers **except for those with USB-Serial converters that use the UART pins**. Right now that means the ESP8266 Huzzah Feather, 328p Feather and nRF52 Feather don't work because they use the hardware UART for programming. Any other Feathers with native USB will work just fine.

![](https://cdn-learn.adafruit.com/assets/assets/000/095/280/medium800/adafruit_products_MIDI_FW_bottom.jpg?1601489522)

Comes as a kit with an assembled PCB that has all the surface-mount components attached, loose headers, and two loose DIN-5 jacks. Some basic soldering is required to assemble the header and DIN jacks in place. If you like to use 3.5mm jacks, [you'll want to pick up some through-hole 3.5mm stereo jacks](https://www.adafruit.com/product/1699) and solder those in, instead.

![](https://cdn-learn.adafruit.com/assets/assets/000/095/277/medium800/adafruit_products_MIDI_FW_other_config.jpg?1601489463)

# Adafruit MIDI FeatherWing

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/095/281/medium800/adafruit_products_MIDI_FW_pinouts.jpg?1601489783)

![](https://cdn-learn.adafruit.com/assets/assets/000/095/283/medium800/adafruit_products_MIDI_FW_pinouts_bottom.jpg?1601491249)

# Power Pins
![](https://cdn-learn.adafruit.com/assets/assets/000/095/284/medium800/adafruit_products_MIDI_FW_Power_pins.jpg?1601491265)

This FeatherWing is powered from the Feather **3V** power pin, and uses the common **GND** pin.

# Data Pins
![](https://cdn-learn.adafruit.com/assets/assets/000/095/285/medium800/adafruit_products_MIDI_FW_UART_pins.jpg?1601491374)

We use the hardware serial pins **RX** and **TX** to send/receive data - you'll need to set these to 31250 baud in your programming language and then send/receive MIDI packet data. Because we use the UART, this works with all Feathers **except for those with USB-Serial converters that use the UART pins**. Right now that means the ESP8266 Huzzah Feather, 328p Feather and nRF52 Feather don't work because they use the hardware UART for programming. Any other Feathers with native USB will work just fine.

# MIDI Pins
![](https://cdn-learn.adafruit.com/assets/assets/000/095/286/medium800/adafruit_products_MIDI_FW_MIDI_pins.jpg?1601491441)

Solder your MIDI or 3.5mm stereo jacks to these pins.

# Adafruit MIDI FeatherWing

## Arduino MIDI Example

https://youtu.be/weNrnXaB0dQ

## Demo

This example plays notes on MIDI channel 1 with MIDI **NoteOn** and **NoteOff** to specify note values and velocity.

Plug a DIN-5 MIDI cable or 3.5mm TRS cable into the MIDI FeatherWing MIDI out port on one end and your favorite MIDI-capable synthesizer on the other.

In the example shown in the video above, a 3.5mm TRS MIDI cable is being used to have the Feather send notes to a KORG NTS-1 synthesizer module.

To use the MIDI FeatherWing with Arduino, first, [get set up with Arduino IDE as detailed here](https://learn.adafruit.com/adafruit-neotrellis-m4/setup).

## Libraries

To add libraries, in the Arduino IDE click **Sketch \> Include Library \> Manage Libraries...**

In the **Library Manager** window, search for the **MIDI Library** by Francois Best, Iathoub and install the latest version.

Note: this is the same library that used to be known as the Forty Seven Effects MIDI library. Loads of great details to be had [here](https://github.com/FortySevenEffects/arduino_midi_library)!

![adafruit_products_guide_lib.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/029/medium640/adafruit_products_guide_lib.jpg?1616795116)

![adafruit_products_guide_lib2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/030/medium640/adafruit_products_guide_lib2.jpg?1616795507)

## Upload Code

Copy the code example below then paste it into a new Arduino document. Save the Arduino file, then compile and upload it to your Feather board. Be sure to pick the **USB Stack \> Tiny USB** option in the **Tools** menu before compiling and uploading.

![](https://cdn-learn.adafruit.com/assets/assets/000/122/470/medium800/adafruit_products_miditiny.jpg?1689032769)

Once uploaded, it will begin sending MIDI to your synth!

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/MIDI_FeatherWing/MIDI_FeatherWing.ino

# Adafruit MIDI FeatherWing

## CircuitPython MIDI Example

https://youtu.be/D4DvWx-1Gzc

Here's a quick example to get you started with MIDI in CircuitPython.

[Install the latest CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython) on your Feather board, then [download the Library bundle](https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries).

Drag a copy of the **adafruit\_midi** library onto your **CIRCUITPY** drive's **lib** folder.

You can check out lots more details on this library [here](https://github.com/adafruit/Adafruit_CircuitPython_MIDI).

This example will play notes on MIDI channel 1 with MIDI **NoteOn** and **NoteOff** as well as send modulation changes with the **ControlChange** command.

Plug a DIN-5 MIDI cable or 3.5mm TRS cable into the MIDI FeatherWing MIDI out port on one end and your favorite MIDI-capable synthesizer on the other.

In the example shown in the video above, a classic DIN-5 MIDI cable is being used to have the Feather send notes to a Doepfer MIDI-to-CV/Gate/CC converter, which in turn drives notes, gate, and modulation on a Winterbloom Castor & Pollux Eurorack synthesizer module.

Copy the code below and paste it into Mu, then save it to your CIRCUITPY drive as **code.py**.

Once the file is saved to the Feather, it will begin sending MIDI notes to your synthesizer, drum machine, or other rad groove machine!

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/MIDI_FeatherWing/code.py

# Adafruit MIDI FeatherWing

## Downloads

## Files:

- [EagleCAD files on GitHub](https://github.com/adafruit/Adafruit-MIDI-FeatherWing-PCB)
- [Fritzing object in Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20MIDI%20FeatherWing%20Kit.fzpz)
- [Fritzing object (3.5mm jacks) in Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20MIDI%20FeatherWing%20Kit%20(3.5mm%20Jacks).fzpz)
- [3D models on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/4740%20MIDI%20FeatherWing)

# Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/095/273/medium800/adafruit_products_MIDI_FW_sch.png?1601489240)

![](https://cdn-learn.adafruit.com/assets/assets/000/095/275/medium800/adafruit_products_MIDI_FW_fab_print.png?1601489189)

# 3D Model
![](https://cdn-learn.adafruit.com/assets/assets/000/122/568/medium800/adafruit_products_4740-MIDI-FeatherWing.jpg?1689345832)


## Primary Products

### Adafruit MIDI FeatherWing Kit

[Adafruit MIDI FeatherWing Kit](https://www.adafruit.com/product/4740)
Turn your Feather into a song-bird with this musically-enabled FeatherWing that adds MIDI input and output jacks to just about any Feather. You get both input and output DIN-5 MIDI jacks, a 3V optically isolator so you can interface with MIDI on 3.3V logic/power microcontrollers, and two...

In Stock
[Buy Now](https://www.adafruit.com/product/4740)
[Related Guides to the Product](https://learn.adafruit.com/products/4740/guides)

## Related Guides

- [Introducing Adafruit Feather](https://learn.adafruit.com/adafruit-feather.md)
- [Arcade Synth Controller](https://learn.adafruit.com/arcade-synth-controller.md)
- [MIDI Melody Maker](https://learn.adafruit.com/midi-melody-maker.md)
- [MIDI for Makers](https://learn.adafruit.com/midi-for-makers.md)
- [USB MIDI Host Messenger](https://learn.adafruit.com/usb-midi-host-messenger.md)
- [4x4 Rotary Encoder MIDI Messenger](https://learn.adafruit.com/4x4-rotary-encoder-midi-messenger.md)
- [LEGO Head Lamp with Audio](https://learn.adafruit.com/lego-head-lamp-with-audio.md)
- [How we designed an injection-molded case](https://learn.adafruit.com/how-we-designed-an-injection-molded-case-for-raspberry-pi.md)
- [Adafruit Floppy FeatherWing with 34-Pin IDC Connector](https://learn.adafruit.com/adafruit-floppy-featherwing-with-34-pin-idc-connector.md)
- [ADXL345 Digital Accelerometer](https://learn.adafruit.com/adxl345-digital-accelerometer.md)
- [Pixie - the 3W Chainable LED Pixel](https://learn.adafruit.com/pixie-3-watt-smart-chainable-led-pixels.md)
- [Adafruit TPA2012 2.1W Stereo Audio Amplifier](https://learn.adafruit.com/adafruit-ts2012-2-8w-stereo-audio-amplifier.md)
- [Adafruit STEMMA Audio Amp](https://learn.adafruit.com/stemma-audio-amp.md)
- [Gemma-Powered NeoPixel LED Sound Reactive Drums](https://learn.adafruit.com/gemma-powered-neopixel-led-sound-reactive-drums.md)
- [Adafruit RP2040 CAN Bus Feather](https://learn.adafruit.com/adafruit-rp2040-can-bus-feather.md)
