# Wireless UNTZtrument Using BLE MIDI 

## Overview

https://www.youtube.com/watch?v=c1aROLp7RvU

The UNTZtrument and HELLA UNTZtrument are both great options if you want an easily hackable open-source grid based MIDI controller. But what if you want to free yourself from USB cables during a live performance with your UNTZ? 

In this guide, we will replace the Arduino Leonardo used in the standard UNTZtrument with either the [Feather M0 Bluefruit LE][5], or the [Feather 32u4 Bluefruit LE][6]. This small hardware change will allow us send MIDI data *wirelessly* to computers and mobile devices using [Bluetooth LE MIDI][1].

## Prerequisites

This guide will expand on [the original UNTZtrument guide][2], and will show you how to use the Adafruit Feather Bluefruit LE to send MIDI messages wirelessly from your UNTZ to your computer or mobile device. You should make sure to follow the Arduino IDE Setup guides for your choice of the [Feather M0 Bluefruit LE][3] or the [Feather 32u4 Bluefruit LE][4]. You will also need to read through the [original UNTZtrument guide][2] before continuing with these modifications.

[1]: https://developer.apple.com/bluetooth/Apple-Bluetooth-Low-Energy-MIDI-Specification.pdf
[2]: https://learn.adafruit.com/untztrument-trellis-midi-instrument
[3]: https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le
[4]: https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le
[5]: https://www.adafruit.com/product/2995
[6]: https://www.adafruit.com/product/2829

Danger: 

# Wireless UNTZtrument Using BLE MIDI 

## Hardware Changes

Warning: 

### Adafruit Feather M0 Bluefruit LE

[Adafruit Feather M0 Bluefruit LE](https://www.adafruit.com/product/2995)
Feather is the new development board from Adafruit, and like its namesake, it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores.

This is the&nbsp; **Adafruit Feather M0 Bluefruit LE** &nbsp;- our take on an...

In Stock
[Buy Now](https://www.adafruit.com/product/2995)
[Related Guides to the Product](https://learn.adafruit.com/products/2995/guides)
![Angled Shot of the Adafruit Feather M0 Bluefruit LE.](https://cdn-shop.adafruit.com/640x480/2995-08.jpg)

### Adafruit Feather 32u4 Bluefruit LE

[Adafruit Feather 32u4 Bluefruit LE](https://www.adafruit.com/product/2829)
Feather is the new development board from Adafruit, and like its namesake it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores.

This is the&nbsp; **Adafruit Feather 32u4 Bluefruit** &nbsp;- our take on an...

In Stock
[Buy Now](https://www.adafruit.com/product/2829)
[Related Guides to the Product](https://learn.adafruit.com/products/2829/guides)
![Angled shot of rectangular microcontroller.](https://cdn-shop.adafruit.com/640x480/2829-10.jpg)

To make the UNTZ wireless, we will need to replace the Arduino Leonardo from the [UNTZtrument guide][1] with a 32u4 or M0 based Feather Bluefruit LE (seen above). Because of this change, we will need to make a couple small modifications to the case, and add a battery.

## Marking New Mounting Holes

The first thing we will need to do is to drill three new mounting holes for the Bluefruit Feather. To do this, I took the bottom plate from the UNTZ case and lined up the USB port of the Feather with the spot where the USB port of the Arduino Leonardo would normally sit. I then pressed on the Feather to make sure it wouldn't move, and used a felt tip marker to transfer the Feather mounting hole locations to the bottom plate.

[1]: https://learn.adafruit.com/untztrument-trellis-midi-instrument

![](https://cdn-learn.adafruit.com/assets/assets/000/037/805/medium800/feather_IMG_20161206_112426.jpg?1481042208)

## Drilling New Mounting Holes

Next I used a 1/8" (~3 millimeter) drill bit to drill new mounting holes in the bottom plate of the case. The mounting holes on the Feather are 0.1" diameter, but I wanted to make sure there was extra wiggle room since I was drilling by hand.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/622/medium800/feather_mounting.jpg?1480540901)

## Wiring Changes

Follow the original UNTZtrument guide for assembly instruction for the four or eight trellis panels that make up the UNTZ or HELLA UNTZ kits.

The SDA, SCL, GND, and power pin connections are in different locations on the Leonardo vs the Feather. Refer to the pinout diagram and the wiring diagram below for the locations of the pins on your Feather Bluefruit LE.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/625/medium800/feather_adafruit_products_2889_pinout_v1_0.png?1480543226)

I used 26 AWG silicone cover stranded-core wire to connect the Feather to the Trellis grid, which made it easy to assemble the case. Solid core wire works as well, but it is not nearly as flexible. The increased flexibility makes the case easier to assemble.

Here are the connections that you will need to solder using your choice of wire: 

* Trellis SDA -&gt; Feather SDA
* Trellis SCL -&gt; Feather SCL
* Trellis GND -&gt; Feather GND
* Trellis 5V -&gt; Feather 3V

![](https://cdn-learn.adafruit.com/assets/assets/000/037/624/medium800/feather_untz_fritzing.png?1480542573)

You will also need to attach a battery to your Feather, and secure it to the bottom plate in the UNTZ case. I used gaffers tape to secure the battery, but duct tape or any other similar tape should work.

No futher hardware modifications to the UNTZ kit are needed for BLE MIDI support. Follow the [UNTZtrument guide][1] for additional assembly instructions. Next, we will look at the Arduino libraries needed for UNTZ Bluetooth LE MIDI communication.

[1]: https://learn.adafruit.com/untztrument-trellis-midi-instrument

# Wireless UNTZtrument Using BLE MIDI 

## Code Changes

There are a couple code changes from the main [UNTZtrument guide][4], but for the most part the code is the same as the USB MIDI examples in that guide. The biggest change is the addition of the [Adafruit BluefruitLE nRF51 Library][1], which you should have installed while following along with the Feather Bluefruit M0 or 32u4 setup guides. 

Here is the full list of Arduino Libraries you will need to install using the Arduino Library Manager.

* [Adafruit Trellis][2]
* [Adafruit BluefruitLE nRF51][1]
* [Adafruit UNTZtrument][3] v2.0.0 or higher

[1]: https://github.com/adafruit/Adafruit_BluefruitLE_nRF51
[2]: https://github.com/adafruit/Adafruit_Trellis_Library
[3]: https://github.com/adafruit/Adafruit_UNTZtrument
[4]: https://learn.adafruit.com/untztrument-trellis-midi-instrument


![](https://cdn-learn.adafruit.com/assets/assets/000/037/628/medium800/feather_Screen_Shot_2016-11-30_at_5.10.10_PM.png?1480543961)

![](https://cdn-learn.adafruit.com/assets/assets/000/037/626/medium800/feather_Screen_Shot_2016-11-30_at_5.11.26_PM.png?1480543934)

![](https://cdn-learn.adafruit.com/assets/assets/000/037/627/medium800/feather_Screen_Shot_2016-11-30_at_5.10.23_PM.png?1480543943)

## BLE MIDI Examples

Two BLE examples exist in the UNTZtrument library:

* **BLE\_UNTZtrument\_Hello\_World.ino**
* **BLE\_UNTZtrument\_Step\_Seq.ino**

Navigate to the Adafruit UNTZtrument examples in the **File→Examples** menu of the Arduino IDE and select one of the BLE examples. Follow the standard upload procedure to upload the example sketch to your Feather M0 or 32u4 Bluefruit LE.

If you need more help with the upload process, visit the [32u4 Bluefruit LE Feather Guide][2] or the [M0 Bluefruit LE Feather Guide][1] for more information about using the Feather Bluefruit LE with the Arduino IDE.

[1]: https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le
[2]: https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le

![](https://cdn-learn.adafruit.com/assets/assets/000/037/629/medium800/feather_Screen_Shot_2016-11-30_at_5.15.49_PM.png?1480545089)

Now that we have an example loaded on the Feather, we can connect to a BLE MIDI compatible device.

# Wireless UNTZtrument Using BLE MIDI 

## BLE MIDI Setup

Now that you have an example sketch loaded, you will need to connect to the UNTZ using your computer or mobile device.

Click on a platform below to view setup instructions for your device:

* [macOS (OS X)](https://learn.adafruit.com/wireless-untztrument-using-ble-midi/macos-os-x)
* [iOS](https://learn.adafruit.com/wireless-untztrument-using-ble-midi/ios)
* [Android](https://learn.adafruit.com/wireless-untztrument-using-ble-midi/android)
* [Windows](https://learn.adafruit.com/wireless-untztrument-using-ble-midi/windows)

# Wireless UNTZtrument Using BLE MIDI 

## macOS (OS X)

First you will need to open the **Audio MIDI Setup** application found in **Applications/Utilities** on your Mac.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/636/medium800/feather_Screen_Shot_2016-11-30_at_5.46.50_PM.png?1480603806)

Once it is open, you will need to navigate to the **Window** menu item and select **Show MIDI Studio**.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/638/medium800/feather_Screen_Shot_2016-11-30_at_5.44.50_PM.png?1480603920)

Double click the Bluetooth icon in MIDI Studio.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/816/medium800/feather_ble.png?1481046218)

A list of Bluetooth devices should appear. Click the **connect** button to connect to the **Adafruit Bluefruit LE** device.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/639/medium800/feather_Screen_Shot_2016-11-30_at_5.45.07_PM.png?1480603996)

Next, use your favorite MIDI software synth to connect to the Adafruit Bluefruit LE device. If you don't have any MIDI software synths installed, a good option to start with is [SimpleSynth][1]. Once you have selected the Bluefruit, you should be able to press buttons on the UNTZ to send messages to your software synth.

[1]: http://notahat.com/simplesynth/

![](https://cdn-learn.adafruit.com/assets/assets/000/037/640/medium800/feather_Screen_Shot_2016-11-30_at_5.53.45_PM.png?1480604119)

# Wireless UNTZtrument Using BLE MIDI 

## iOS

For this demo, there are two free iOS apps that you will need to install on your iOS device:

* [midimittr](https://itunes.apple.com/app/midi-le/id925495245?mt=8#)
* [Perfect Piano](https://itunes.apple.com/us/app/perfect-piano-smart-keyboard/id942937409)

## Connecting to the UNTZ

First, you will need to open **midimittr** on your iPhone or iPad. This app is used to route BLE MIDI messages to MIDI capable iOS apps like Perfect Piano.

Once midimitter has opened, click on the icon on the top left of the screen to show the menu.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/806/medium800/feather_sidebar.png?1481044970)

Then, select the clients tab.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/807/medium800/feather_clients.png?1481045009)

Next, select the Adafruit Bluefruit LE device from the clients list. If you do not see your UNTZ, you will need to make sure that you have uploaded one of the BLE examples, and that your UNTZ is powered on.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/808/medium800/feather_select_ble.png?1481045140)

Once your UNTZ is connected, you can now navigate back to the routing tab.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/809/medium800/feather_routing.png?1481045179)

In the routing tab, select the Bluefruit as a source.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/810/medium800/feather_bluefruit.png?1481045338)

## Generating Sound with a Software Synth

Now that we have the Bluefruit connected, we can open up **Perfect Piano**. This app is a free example of many MIDI capable software synths in the iOS App Store. Each app might have slightly different requirements to use MIDI input, but Perfect Piano makes it easy. 

Open up the app to get started, and select the keyboard.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/813/medium800/feather_keyboard.jpg?1481045981)

You should now see a full screen keyboard like the one shown below.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/814/medium800/feather_keyboard2.jpg?1481046069)

You should now be able to press buttons on the UNTZ to trigger sounds in Perfect Piano.

The video below shows basic communication between the UNTZtrument and Perfect Piano on an iPad over Bluetooth LE MIDI.

https://www.youtube.com/watch?v=jWRpEvneEDI

# Wireless UNTZtrument Using BLE MIDI 

## Android

For this demo, there are two free apps that you will need to install on your Android device:

* [MIDI BLE Connect](https://play.google.com/store/apps/details?id=com.mobileer.example.midibtlepairing)
* [General MIDI Synth](https://play.google.com/store/apps/details?id=net.volcanomobile.sonivoxeasmidi)


## Connecting to the UNTZ

First, you will need to open **MIDI BLE Connect** on your Android device. This app is used to route BLE MIDI messages to MIDI capable apps like General MIDI Synth.

Once **MIDI BLE Connect** has opened, click on the scan button to search for your UNTZ.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/875/medium800/feather_an_scan.png?1481132223)

Next, select the Adafruit Bluefruit LE device from the list. If you do not see your UNTZ, you will need to make sure that you have uploaded one of the BLE examples, and that your UNTZ is powered on.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/876/medium800/feather_an_select.png?1481132297)

You should now see the Bluefruit LE device listed below the scan button on the main screen.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/877/medium800/feather_an_connected.png?1481132357)

## Generating Sound with a Software Synth

Now that we have the Bluefruit connected, we can open up the **General MIDI Synth** app. This app is a free example of many MIDI capable software synths in the Google Play Store. Each app might have slightly different requirements to use MIDI input, but **General MIDI Synth** makes it easy. 

Once the app has loaded, select the Bluefruit LE from the first dropdown menu.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/878/medium800/feather_an_midi_con.png?1481132480)

That's it! You should now be able to press buttons on your UNTZ, and hear the output from the MIDI Synth app.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/879/medium800/feather_an_midi_connected.png?1481132495)

# Wireless UNTZtrument Using BLE MIDI 

## Windows

Windows 10 recently added support for MIDI over Bluetooth LE, and you can read more about the changes here: [MIDI Enhancements in Windows 10][1]

Unfortunately, that means that real world support is very limited at this point, so your best bet is to use an Android, iOS, or macOS based device.

[1]: https://blogs.windows.com/buildingapps/2016/09/21/midi-enhancements-in-windows-10/#UoOKIUs36T18pdCP.97


## Featured Products

### Adafruit 8x8 NeoTrellis Feather M4 Kit Pack

[Adafruit 8x8 NeoTrellis Feather M4 Kit Pack](https://www.adafruit.com/product/1929)
We've upgraded our popular UNTZtrument with a total make-over, and it's been reborn as the NeoTrellis 8x8 Kit pack. This open-source 8x8 Grid Controller Kit with a&nbsp;super-specifically-laser-cut enclosure turns four panels of 4x4 NeoTrellis's into a handheld Feather M4...

In Stock
[Buy Now](https://www.adafruit.com/product/1929)
[Related Guides to the Product](https://learn.adafruit.com/products/1929/guides)
### Adafruit HELLA UNTZtrument! Open-Source 16x8 Grid Controller Kit

[Adafruit HELLA UNTZtrument! Open-Source 16x8 Grid Controller Kit](https://www.adafruit.com/product/1999)
Build and customize your very own open-source button grid controller based on the Adafruit Trellis with the UNTZtrument kit **HELLA UNTZtrument KIT**! Designed by PaintYourDragon, this DIY kit comes with delicious translucent button pads, controller pads, diffused white LEDS and a...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1999)
[Related Guides to the Product](https://learn.adafruit.com/products/1999/guides)
### Adafruit Feather M0 Bluefruit LE

[Adafruit Feather M0 Bluefruit LE](https://www.adafruit.com/product/2995)
Feather is the new development board from Adafruit, and like its namesake, it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores.

This is the&nbsp; **Adafruit Feather M0 Bluefruit LE** &nbsp;- our take on an...

In Stock
[Buy Now](https://www.adafruit.com/product/2995)
[Related Guides to the Product](https://learn.adafruit.com/products/2995/guides)
### Adafruit Feather 32u4 Bluefruit LE

[Adafruit Feather 32u4 Bluefruit LE](https://www.adafruit.com/product/2829)
Feather is the new development board from Adafruit, and like its namesake it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores.

This is the&nbsp; **Adafruit Feather 32u4 Bluefruit** &nbsp;- our take on an...

In Stock
[Buy Now](https://www.adafruit.com/product/2829)
[Related Guides to the Product](https://learn.adafruit.com/products/2829/guides)
### Lithium Ion Polymer Battery - 3.7v 500mAh

[Lithium Ion Polymer Battery - 3.7v 500mAh](https://www.adafruit.com/product/1578)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 500mAh for a total of about 1.9 Wh. If you need a larger (or smaller!) battery, <a...></a...>

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

## Related Guides

- [Adafruit Feather M0 Bluefruit LE](https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le.md)
- [MicroPython Displays: Drawing Shapes](https://learn.adafruit.com/micropython-displays-drawing-shapes.md)
- [What is Web MIDI & BLE MIDI?](https://learn.adafruit.com/web-ble-midi.md)
- [NeoTrellis MIDI Feedback Controller](https://learn.adafruit.com/neotrellis-midi-feedback-controller.md)
- [MicroPython for SAMD21](https://learn.adafruit.com/micropython-for-samd21.md)
- [UNTZtrument: a Trellis MIDI Instrument](https://learn.adafruit.com/untztrument-trellis-midi-instrument.md)
- [Custom Bluetooth Cherry MX Gamepad](https://learn.adafruit.com/custom-wireless-bluetooth-cherry-mx-gamepad.md)
- [Schluff - The Sleep Monitor](https://learn.adafruit.com/schluff-the-oshw-sleep-monitor.md)
- [3D Printed Case for Adafruit Feather](https://learn.adafruit.com/3d-printed-case-for-adafruit-feather.md)
- [Bluefruit Controlled Macetech RGB LED Shades](https://learn.adafruit.com/ledshades.md)
- [Using Bluefruit BLE to Give Disabled Users Switch Control Access to IOS Devices](https://learn.adafruit.com/ios-switch-control-using-ble.md)
- [Introducing Adafruit Feather](https://learn.adafruit.com/adafruit-feather.md)
- [My Mini Race Car](https://learn.adafruit.com/my-mini-race-car.md)
- [Build a Bluetooth App using Swift 5](https://learn.adafruit.com/build-a-bluetooth-app-using-swift-5.md)
- [Proper Debugging of ATSAMD21 Processors](https://learn.adafruit.com/proper-step-debugging-atsamd21-arduino-zero-m0.md)
- [CircuitPython Hardware: ILI9341 TFT & FeatherWing](https://learn.adafruit.com/micropython-hardware-ili9341-tft-and-featherwing.md)
