Package themidibus

The MidiBus provides a simple way to access and interact with installed MIDI system resources, although it's especially designed to be used with Processing, it could easily be adapted for use in any java program.

See:
          Description

Interface Summary
MidiListener This is a placeholder interface which makes it easier to program and manipulate objects which implement subinterfaces of MidiListener like RawMidiListener, SimpleMidiListener or StandardMidiListener.
RawMidiListener A RawMidiListener can be notified of incomming MIDI messages in raw form, usually by a MidiBus object which it is connect to.
SimpleMidiListener A SimpleMidiListener can be notified of incomming NoteOn, NoteOff and ControllerChange MIDI messages, usually by a MidiBus object which it is connected to.
StandardMidiListener A StandardMidiListener can be notified of incomming MIDI messages in MidiMessage form, usually by a MidiBus object which it is connected to.
 

Class Summary
MidiBus The MidiBus class provides a simple way to send and receive MIDI within Processing sketches.
PApplet PApplet is your processing application or sketch.
 

Package themidibus Description

The MidiBus provides a simple way to access and interact with installed MIDI system resources, although it's especially designed to be used with Processing, it could easily be adapted for use in any java program.

IMPORTANT: Mac users must install mmj, a Mac OS X universal binary java MIDI subsystem - or an equivalent third party MIDI subsystem - because apple does not provide build-in MIDI support for java. Mmj is recommended because it works, it's free and it's almost open source (CC licence), although there is no 64 bit version yet (donate on their website and there will be!).

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.

Note to Processing users: The current version of Processing (Processing 1.0) doesn't allows java 1.5.0 (Java SE5) syntax when compiling within the IDE, but it does do the actual compiling using java 1.5.0 (Java SE5) meaning that many interfaces from the javax.sound.midi package cannot be implemented in Processing sketches. [see Processing Bug 598]


Related Documentation

Version:
005
Author:
Severin Smith