API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.sound.midi. ShortMessage View Source
Author(s)
David Rivas
Kara Kytle
Florian Bomers
Since
Version
1.26, 05/11/17
Serial
Hierarchy
 Object
      MidiMessage
          ShortMessage
Implements
Subclasses
Description
public class ShortMessage
  A ShortMessage contains a MIDI message that has at most two data bytes following its status byte.
See also:    SysexMessage MetaMessage
Constructors
public ShortMessage ()
  Constructs a new ShortMessage.
protected ShortMessage (byte[] data)
  Constructs a new ShortMessage.
Methods
Hide/Show inherited methods
public Object clone () [Specified in MidiMessage]
  Creates a new object of the same class and with the same contents as this object.
public int getChannel ()
  Obtains the MIDI channel associated with this event.
public int getCommand ()
  Obtains the MIDI command associated with this event.
public int getData1 ()
  Obtains the first data byte in the message.
public int getData2 ()
  Obtains the second data byte in the message.
protectedfinal int getDataLength (int status) throws InvalidMidiDataException
  Retrieves the number of data bytes associated with a particular status byte value.
public int getLength () [Inherited From MidiMessage]
  Obtains the total length of the MIDI message in bytes.
public byte getMessage () [Inherited From MidiMessage]
  Obtains the MIDI message data.
public int getStatus () [Inherited From MidiMessage]
  Obtains the status byte for the MIDI message.
protected void setMessage (byte[] data, int length) throws InvalidMidiDataException [Inherited From MidiMessage]
  Sets the data for the MIDI message.
public void setMessage (int status) throws InvalidMidiDataException
  Sets the parameters for a MIDI message that takes no data bytes.
public void setMessage (int status, int data1, int data2) throws InvalidMidiDataException
  Sets the parameters for a MIDI message that takes one or two data bytes.
public void setMessage (int command, int channel, int data1, int data2) throws InvalidMidiDataException
  Sets the short message parameters for a channel message which takes up to two data bytes.
Fields
Hide/Show inherited fields
publicfinalstatic int ACTIVE_SENSING = "254"
  Status byte for Active Sensing message (0xFE, or 254).
publicfinalstatic int CHANNEL_PRESSURE = "208"
Command value for Channel Pressure (Aftertouch) message (0xD0, or 208)
publicfinalstatic int CONTINUE = "251"
  Status byte for Continue message (0xFB, or 251).
publicfinalstatic int CONTROL_CHANGE = "176"
Command value for Control Change message (0xB0, or 176)
protected byte data [Inherited From MidiMessage]
  The MIDI message data.
publicfinalstatic int END_OF_EXCLUSIVE = "247"
  Status byte for End of System Exclusive message (0xF7, or 247).
protected int length [Inherited From MidiMessage]
  The number of bytes in the MIDI message, including the status byte and any data bytes.
publicfinalstatic int MIDI_TIME_CODE = "241"
  Status byte for MIDI Time Code Quarter Frame message (0xF1, or 241).
publicfinalstatic int NOTE_OFF = "128"
Command value for Note Off message (0x80, or 128)
publicfinalstatic int NOTE_ON = "144"
Command value for Note On message (0x90, or 144)
publicfinalstatic int PITCH_BEND = "224"
Command value for Pitch Bend message (0xE0, or 224)
publicfinalstatic int POLY_PRESSURE = "160"
Command value for Polyphonic Key Pressure (Aftertouch) message (0xA0, or 160)
publicfinalstatic int PROGRAM_CHANGE = "192"
Command value for Program Change message (0xC0, or 192)
publicfinalstatic int SONG_POSITION_POINTER = "242"
  Status byte for Song Position Pointer message (0xF2, or 242).
publicfinalstatic int SONG_SELECT = "243"
  Status byte for MIDI Song Select message (0xF3, or 243).
publicfinalstatic int START = "250"
  Status byte for Start message (0xFA, or 250).
publicfinalstatic int STOP = "252"
  Status byte for Stop message (0xFC, or 252).
publicfinalstatic int SYSTEM_RESET = "255"
  Status byte for System Reset message (0xFF, or 255).
publicfinalstatic int TIMING_CLOCK = "248"
  Status byte for Timing Clock messagem (0xF8, or 248).
publicfinalstatic int TUNE_REQUEST = "246"
  Status byte for Tune Request message (0xF6, or 246).
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar