A
Sequence is a data structure containing musical information (often an entire song or composition) that can be played back by a
{@link Sequencer} object. Specifically, the
Sequence contains timing information and one or more tracks. Each
{@link Track track} consists of a series of MIDI events (such as note-ons, note-offs, program changes, and meta-events). The sequence's timing information specifies the type of unit that is used to time-stamp the events in the sequence.
A Sequence can be created from a MIDI file by reading the file into an input stream and invoking one of the getSequence methods of {@link MidiSystem}. A sequence can also be built from scratch by adding new Tracks to an empty Sequence, and adding {@link MidiEvent} objects to these Tracks.
@see Sequencer#setSequence(java.io.InputStream stream)
@see Sequencer#setSequence(Sequence sequence)
@see Track#add(MidiEvent)
@see MidiFileFormat
@author Kara Kytle