A MIDI controller allows us to change values by turning knobs, moving sliders or pressing buttons on a hardware device. This is a great way to explore visual effects without having to modify programs and re-start them multiple times.
In this episode we use the MidiBus library to receive Control Change messages from a MIDI device. Each message contains three numbers: the channel, which lets you distinguish between devices when you use more than one device, the number of the knob or slider (you probably want different things to happen depending on which knob or slider you touch), and the value, which indicates how much a knob is rotated, how far a slider is moved, or if a button is up or down.
In part 1 we do a simple program that draws either lines or circles depending on which knob we turn.