teensy midi controller

Empathy Box by Sophia Brueckner

midi

Click to download max patch and the latest Teensy code

This next module uses standard MIDI messages to communicate between a Teensy microcontroller and a computer, taking sensory information from the physical world and mapping it to processes and events on a computer. It can also be used to send messages from the computer to control things in the physical world, like LEDs and small motors.

Buttons, dials, and sliders are commonly used sensors, but you could also use photocells (which measure light), FSRs (pressure), and conductive thread (which measures capacitance, or touch), among others. While MIDI is commonly used in musical instruments, it is a standard communication protocol that can be used in interactive installations, live performances, and kinetic sculptures. MIDI messages can be mapped to a broad range of software — Max, Ableton, Reaper, Mad Mapper, Processing — any program with MIDI input/output.

Image result for midi logo

MIDI stands for Musical Instrument Digital Interface. It’s a protocol that was developed in the early 1980’s as a way to connect music devices, but it is fast and reliable and now works with a lot of different software environments. While MIDI is lower resolution compared to serial communication, it gets everything talking quickly and provides enough flexibility for most projects.

We are using Teensy microcontrollers instead of Arduinos and other microcontrollers because they can be easily configured as class-compliant MIDI devices. When you plug it in, your computer automatically recognizes the Teensy as a midi device, and it can immediately be mapped to whatever program you are working with.


teensy

The Teensy is a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects. All programming is done via USB.

I’ll be giving you some code to upload to the Teensy that will enable you to use it as a class compliant MIDI controller. Without changing the code, the Teensy LC will be able to accept 6 analog inputs, 12 digital inputs, and send 5 digital outputs. You can modify the code to accept up to 10 analog inputs, 23 digital inputs or outputs, and/or 9 touch/capacitance inputs — allowing you to alter/expand the code to suit your specific ideas.


getting started