|
Préférences
Moteurs de recherche
|
||||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.4.2
javax.sound.midi
|
Field Summary | |
static int |
META
Status byte for MetaMessage (0xFF, or 255), which is used
in MIDI files. |
Fields inherited from class javax.sound.midi.MidiMessage |
data, length |
Constructor Summary | |
|
MetaMessage()
Constructs a new MetaMessage . |
protected |
MetaMessage(byte[] data)
Constructs a new MetaMessage . |
Method Summary | |
Object |
clone()
Creates a new object of the same class and with the same contents as this object. |
byte[] |
getData()
Obtains a copy of the data for the meta message. |
int |
getType()
Obtains the type of the MetaMessage . |
void |
setMessage(int type,
byte[] data,
int length)
Sets the message parameters for a MetaMessage . |
Methods inherited from class javax.sound.midi.MidiMessage |
getLength, getMessage, getStatus, setMessage |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int META
MetaMessage
(0xFF, or 255), which is used
in MIDI files. It has the same value as SYSTEM_RESET, which
is used in the real-time "MIDI wire" protocol.
MidiMessage.getStatus()
,
Constant Field ValuesConstructor Detail |
public MetaMessage()
MetaMessage
. The contents of
the message are not set here; use
setMessage
to set them subsequently.
protected MetaMessage(byte[] data)
MetaMessage
.
data
- an array of bytes containing the complete message.
The message data may be changed using the setMessage
method.setMessage(int, byte[], int)
Method Detail |
public void setMessage(int type, byte[] data, int length) throws InvalidMidiDataException
MetaMessage
.
Since only one status byte value, 0xFF
, is allowed for meta-messages,
it does not need to be specified here. Calls to getStatus
return
0xFF
for all meta-messages.
The type
argument should be a valid value for the byte that
follows the status byte in the MetaMessage
. The data
argument
should contain all the subsequent bytes of the MetaMessage
. In other words,
the byte that specifies the type of MetaMessage
is not considered a data byte.
type
- meta-message type (must be less than 128)data
- the data bytes in the MIDI messagelength
- the number of bytes in the data
byte array
InvalidMidiDataException
- if the
parameter values do not specify a valid MIDI meta message
InvalidMidiDataException
public int getType()
MetaMessage
.
MetaMessage
typepublic byte[] getData()
MidiMessage.getLength()
public Object clone()
clone
in class MidiMessage