A
ShortMessage
contains a MIDI message that has at most
two data bytes following its status byte. The types of MIDI message
that satisfy this criterion are channel voice, channel mode, system common,
and system real-time--in other words, everything except system exclusive
and meta-events. The
ShortMessage
class provides methods
for getting and setting the contents of the MIDI message.
A number of ShortMessage
methods have integer parameters by which
you specify a MIDI status or data byte. If you know the numeric value, you
can express it directly. For system common and system real-time messages,
you can often use the corresponding fields of ShortMessage
, such as
SYSTEM_RESET
. For channel messages,
the upper four bits of the status byte are specified by a command value and
the lower four bits are specified by a MIDI channel number. To
convert incoming MIDI data bytes that are in the form of Java's signed bytes,
you can use the conversion code
given in the MidiMessage
class description.