MIDI

What’s MIDI??

It stands for Musical Instrument Digital .

It’s a standardized way of making electronic devices talk to each other.

Any MIDI device that can send MIDI messages is called a MIDI controller.

Any device that can receive messages from a MIDI controller is a MIDI instrument or MIDI-compatible device or something like that.

The way all MIDI controllers and instruments talk and listen to each other in standardized to the point pretty much and MIDI controller can talk to any MIDI instrument. What’s MIDI??

MIDI is standard of sending and receiving instructions between digital controllers and digital or digitally controlled instruments. It doesn’t send audio.

It looks like this on an oscilloscope. What’s MIDI??

Created in 1981-83 hardware synth and drum machine titans Ikutaro Kakehashi (Roland founder), Tom Oberheim, Sequential Circuits’ Dave Smith and others.

A way of standardizing communication between the increasing number of electronic instruments with microprocessors* created by an increasing number of different companies.

*microprocessors = predecessor to and the non-micro processors on your computer. What’s MIDI??

There’s two types of MIDI you want to know how to work with: hardware MIDI and USB MIDI. USB Midi

Hardware MIDI What’s MIDI??

There’s two types of MIDI you want to know how to work with: hardware MIDI and USB MIDI.

Arduino and Teensy, and probably any other common , can send and receive hardware MIDI messages.

So they can all be made into a MIDI controller or MIDI instrument, working with any commercially available hardware MIDI devices.

Teensy can send and receive USB MIDI messages over its USB cable.

So if you click the USB Type > MIDI option in Arduino, your laptop will recognize it as any other MIDI controller or instrument.

And you can send and receive MIDI messages to and from your DAW, just like any commercially available USB MIDI devices. What’s MIDI??

There’s two types of MIDI you want to know how to work with: hardware MIDI and USB MIDI.

Hardware MIDI: Uses standard 5-pin DIN connectors and cables.

Breadboard friendly Another common MIDI cable MIDI connector MIDI connector What’s hardware MIDI??

There’s two types of MIDI you want to know how to work with: hardware MIDI and USB MIDI.

Hardware MIDI: Uses the same standardized circuits as the original, first official MIDI specs from 1983*!!

https://www.midi.org/ specifications/item/midi-din- electrical-specification

*With the minor caveat you have to be sure you still put 5v in the right places even if using a 3.3v device like Teensy. What’s hardware MIDI??

Hardware MIDI

MIDI IN: circuit on MIDI instrument for reading messages in.

MIDI OUT: circuit on MIDI controller sending messages out.

MIDI THRU: circuit on MIDI instruments sending messages to daisy- chained MIDI instruments. What’s hardware MIDI??

MIDI IN always goes through an optoisolator IC. This is a vactrol (LED + light sensor facing each other) which allows MIDI devices to communicate without being electrically connected in any way.

Why?? Safety. Otherwise if one had a big voltage spike it could probably kill all the interconnected devices. What’s hardware MIDI??

Hardware MIDI messages are sent out of one digital pin, and in through another digital pin. These are the RX (receive) and TX (transmit) pins. What’s hardware MIDI??

So MIDI is a form of serial communication, as opposed to .

Serial = One at a time. Just one communication pin sending one bit at a time, or one pin receiving one bit at a time. What’s hardware MIDI??

So MIDI is a form of serial communication, as opposed to parallel communication.

Serial = One at a time. Just one communication pin sending one bit at a time, or one pin receiving one bit at a time. What’s hardware MIDI??

What a MIDI noteOn message looks like on an oscilloscope. >>

What some other MIDI messages look like on a scope. >> What’s Hardware MIDI?? One byte = one 8 bit number.

A byte can be 0 to 255. What’s hardware MIDI??

List of MIDI messages from the official MIDI organization: https://www.midi.org/specifications/item/table-1- summary-of-midi-message

Some messages have been added since the original list created in the early 80s but its generally the same as its been since then. Hardware MIDI OUT

How to send a MIDI note to a hardware synth or other instrument with MIDI out.

1) Wire up a MIDI OUT circuit with a MIDI connector and the correct resistors to your TX (transmit) pin.

(just pretend one end of the cable is plugged into the Arduino and the other into the MIDI instrument) Hardware MIDI OUT 2) Write code to send the bits and bytes out. Hardware MIDI OUT 2) Write code to send the bits and bytes out. Hardware MIDI IN

How to get MIDI in from a MIDI keyboard.

1) Wire up a MIDI IN circuit with a MIDI connector and the correct resistors to your RX (transmit) pin.

(just pretend one end of the cable is plugged into the MIDI keyboard and the other into the circuit to Arduino) Hardware MIDI IN 2) Write code to check for MIDI messages. Hardware MIDI IN 2) Write code to check for MIDI messages. What’s hardware MIDI?? Or use a MIDI library.

https://www.pjrc.com/ teensy/td_libs_MIDI.html What’s hardware MIDI?? What’s USB MIDI?? What’s USB MIDI??

The parts of the communication protocol (notes, control changes, pitch bends, etc) that you need to understand work the same.

There’s some additional digital communication between your computer and your USB MIDI device:

When you send info back and forth, both devices send some other bytes just confirm to each other what they are.

You don’t ever need to worry about this.

Just like there’s a hardware MIDI specification, there’s a USB one. What’s USB MIDI?? There’s a USB MIDI library that looks and can be used just like the hardware MIDI library. To use it just set Tools > USB Type to MIDI in Arduino. What’s USB MIDI??

There’s a USB MIDI library that looks and can be used just like the hardware MIDI library. To use it just set Tools > USB Type to MIDI in Arduino. https://www.pjrc.com/teensy/td_midi.html USBMIDI OUT USBMIDI IN Break More useful programming skills for music and controllers More C++

This from the previous examples is effing useless. No one wants a MIDI keyboard that works like this. More C++ This is what you want: More code examples on the class blog