A RawMidiListener can be notified of incomming MIDI messages in raw form, usually by a MidiBus object which it is connect to.
A SimpleMidiListener can be notified of incomming NoteOn, NoteOff and ControllerChange MIDI messages, usually by a MidiBus object which it is connected to.
A StandardMidiListener can be notified of incomming MIDI messages in MidiMessage form, usually by a MidiBus object which it is connected to.
The ControlChange class represents a change in value from a controller.
The MidiBus class provides a simple way to send and receive MIDI within Processing sketches.
The Note class represents a pressed or released key.
PApplet is your processing application or sketch.
IMPORTANT: Mac users may want to install mmj, a Mac OS X universal binary java MIDI subsystem - or an equivalent third party MIDI subsystem - because the apple implementation is lacking support for a number of advanced MIDI features. Mmj is recommended because it works, it's free and it's almost open source (CC licence). Please check README.md for more information. If you do use MMJ you will want to set
MidiBus.sendTimestamps(boolean sendTimestamps) to false, otherwise messages won't be sent.
Keeping with the spirit of Processing's easy to use sketching/prototyping style, the MidiBus offers a clean and simple way to get at MIDI ressources. Getting the basic functionality of the MidiBus up and running in a sketch is a matter of only a few line. The
MidiBus class provides everything needed send and receive MIDI inside a sketch. To jump right into the Midibus, either refer to the paragraph titled "Typical Implementation, Simple" in the description for the
MidiBus class, or check out the code examples distributed with this library.
It is important to understand that the MidiBus offers little functionality that isn't available from Java's native javax.sound.midi package. Anyone interested in working with MIDI in Java should take the time to read the documentation for the javax.sound.midi. It offers a more full featured and flexible alternative to this package, although it does do so at the cost of added complexity. In addition, it may be worthwhile to skim the "official" Java Tutorial for the javax.sound.* packages.