CU ATLAS Practical electronics MIDI and Arduino Wayne Seltzer – Apr 10, 2017
Learning Objectives Introduction to MIDI (Musical Instrument Digital Interface) Construct a circuit and modify an Arduino sketch to respond to MIDI from computer software Discuss how MIDI and Arduino may be used in your project(s)
MIDI – Musical Instrument Digital Interface Enables all kinds of digital instruments, controllers, and computers to be connected Serial interface Note ON, OFF, Velocity, … Industry standard: MIDI Manufacturers Association (MMA) https://www.midi.org Source: https://learn.sparkfun.com/tutorials/midi-tutorial
Computer to Arduino MIDI options Some sound/light/motion-making thing ? Computer with music software that sends MIDI MIDI commands Ableton Reaper Finale …
Arduino to Computer MIDI options Some user/machine interface used as a MIDI controller ? Computer with music software that receives MIDI MIDI commands Ableton Reaper Finale …
Example MIDI-in interface circuit (MIDI-in connector) MIDI instrument or computer with MIDI interface (opto-isolator) Source: http://acidotunismo.com/en/2013/10/arduino-trick-using-a-low-gain-opto-isolator-for-midi/
Computer to Arduino MIDI - USB only software that sends MIDI loopMIDI (virtual MIDI passthrough driver) Hairless MIDI Serial (USB to MIDI) USB cable http://www.tobias-erichsen.de/sotfware/ loopmidi.html [Needed for Windows, not for MacOS.] http://projectgus.github.io/ hairless-midiserial/ FortySevenEffects/ arduino_midi_library (Install in Arduino IDE) https://github.com/FortySevenEffects/arduino_midi_library/wiki
Arduino MIDI USB issues FortySevenEffects MIDI Library defaults to standard MIDI serial baud rate of 31250 But, Hairless MIDI Serial does not support that baud rate! Solution: Set 9600 baud rate in Hairless MIDI Serial (file…preferences) and Arduino In Arduino Sketch: void setup() { … MIDI.begin(); Serial.begin(9600); // add this!
MIDI USB Example Modify: Example…MIDI Library … SimpleSynth to turn on/off 4 LEDS corresponding to 4 incoming MIDI notes. Sketch: SimpleSynth_LED
Discussion Topics How might you use MIDI in your project(s)? Controlling and creating Music? Sounds? Lights? Motion? How could an Arduino connected via MIDI implement some aspect of your project? What are some possible designs you would consider?