MIDI for OpenFrameworks
Workshop by David Stein, July 25, 2020
What is MIDI?
Source: https://www.musicrepo.com/how-to-connect-midi-keyboard-to-computer/
Old method of connecting MIDI devices
Communication Protocol originally intended to connect musical instruments together (based on a published paper in 1981)
Originally limited to sets of unique cables connected between input and output ports. Today it is most commonly over USB cables.
Version 2.0 was just released (almost 40 years later!)
What is MIDI?
Source: https://www.musicrepo.com/how-to-connect-midi-keyboard-to-computer/
Old method of connecting MIDI devices.
Modern method is usually just a USB from a keyboard/controller to the computer
Limits of MIDI 1.0
Midi 2.0 was first researched in 2005 and was just released this year in 2020!
Why MIDI for Creative Technology?
Create Music / Sounds
Create Visuals that interact with musical instruments
Take advantage of MIDI Controllers for interactive visuals
Midi Messages
https://www.midi.org/specifications-old/item/table-1-summary-of-midi-message
Code from Class:
https://gist.github.com/dstein-art/a61ab326deed95e03f3b38e87fbe2aa7
Messages we will use today
Note On, pitch, velocity
Note Off, pitch
Control Change, control, value
Midi Interfaces
Windows & Mac have a concept of Midi Busses. Each Midi Bus can handle 16 seperate channels of Midi, generally each channel comes from a single hardware interface.
Music Software has the ability to connect into multiple busses
May need to setup a Midi Interface / Bus on your computer
Mac: Audio Midi Setup -> Window Menu -> Show Midi Studio
PC: Midi Setup in Control Panel?
Opening a connection to Midi Interface with Open Frameworks
Similar for Input
Sending Midi Messages
Receiving Midi Messages
Resources
Reasonably easy to hack Hardware controllers:
Akai APC Key 25 - especially if you want to play music
Novation Launch XL - great for controlling visuals
Resources
If you want your code to play sound