javax.sound.midi
public class ShortMessage extends MidiMessage
Since: 1.3
| Field Summary | |
|---|---|
| static int | ACTIVE_SENSING 
 Status byte for Active Sensing message.  | 
| static int | CHANNEL_PRESSURE 
 Statue nibble for Channel Pressure message.  | 
| static int | CONTINUE 
 Status byte for Continue message.  | 
| static int | CONTROL_CHANGE 
 Status nibble for Control Change message.  | 
| static int | END_OF_EXCLUSIVE 
 Status byte for End Of Exclusive message.  | 
| static int | MIDI_TIME_CODE 
 Status byte for Time Code message.  | 
| static int | NOTE_OFF 
 Status nibble for Note Off message.  | 
| static int | NOTE_ON 
 Status nibble for Note On message.  | 
| static int | PITCH_BEND 
 Status nibble for Pitch Bend message.  | 
| static int | POLY_PRESSURE 
 Status nibble for Poly Pressure message.  | 
| static int | PROGRAM_CHANGE 
 Status nibble for Program Change message.  | 
| static int | SONG_POSITION_POINTER 
 Status byte for Song Position Pointer message.  | 
| static int | SONG_SELECT 
 Status byte for Song Select message.  | 
| static int | START 
 Status byte for Start message.  | 
| static int | STOP 
 Status byte for Stop message.  | 
| static int | SYSTEM_RESET 
 Status byte for System Reset message.  | 
| static int | TIMING_CLOCK 
 Status byte for Timing Clock message.  | 
| static int | TUNE_REQUEST 
 Status byte for Tune Request message.  | 
| Constructor Summary | |
|---|---|
| ShortMessage() 
 Create a short MIDI message.
 
   | |
| protected | ShortMessage(byte[] data) 
 Create a short MIDI message.
 
   | 
| Method Summary | |
|---|---|
| Object | clone() | 
| int | getChannel() 
 Get the channel information from this MIDI message, assuming it is a 
 MIDI channel message.
  | 
| int | getCommand() 
 Get the command nibble from this MIDI message, assuming it is a MIDI
 channel message.
  | 
| int | getData1() 
 Get the first data byte from this message, assuming it exists, and 
 zero otherwise.
  | 
| int | getData2() 
 Get the second data byte from this message, assuming it exists, and 
 zero otherwise.
  | 
| protected int | getDataLength(int status) 
 Return the number of data bytes needed for a given MIDI status byte.
  | 
| void | setMessage(int status, int data1, int data2) 
 Set the MIDI message. 
  | 
| void | setMessage(int command, int channel, int data1, int data2) | 
| void | setMessage(int status) 
 Set the MIDI message to one that requires no data bytes.
  | 
Parameters: data the message data
Returns: the MIDI channel for this message
Returns: the MIDI command for this message
Returns: the first data byte or zero if none exists.
Returns: the second date byte or zero if none exists.
Parameters: status the status byte for a short MIDI message
Returns: the number of data bytes needed for this status byte
Throws: InvalidMidiDataException if status is an invalid status byte
Parameters: status the status byte for this message data1 the first data byte for this message data2 the second data byte for this message
Throws: InvalidMidiDataException if status is bad, or data is out of range
Parameters: status the status byte for this message
Throws: InvalidMidiDataException if status is bad, or requires data