< prev index next >

src/java.desktop/share/classes/javax/sound/midi/MidiMessage.java

Print this page
rev 60127 : 8249205: Remove unnecessary trademark symbols


  31  * "meta-events" that can be used by sequencer programs. There are meta-events
  32  * for such information as lyrics, copyrights, tempo indications, time and key
  33  * signatures, markers, etc. For more information, see the Standard MIDI Files
  34  * 1.0 specification, which is part of the Complete MIDI 1.0 Detailed
  35  * Specification published by the MIDI Manufacturer's Association
  36  * (<a href = http://www.midi.org>http://www.midi.org</a>).
  37  * <p>
  38  * The base {@code MidiMessage} class provides access to three types of
  39  * information about a MIDI message:
  40  * <ul>
  41  *   <li>The messages's status byte
  42  *   <li>The total length of the message in bytes (the status byte plus any data
  43  *   bytes)
  44  *   <li>A byte array containing the complete message
  45  * </ul>
  46  *
  47  * {@code MidiMessage} includes methods to get, but not set, these values.
  48  * Setting them is a subclass responsibility.
  49  * <p>
  50  * <a id="integersVsBytes"></a>The MIDI standard expresses MIDI data in bytes.
  51  * However, because Java&trade; uses signed bytes, the Java Sound API uses
  52  * integers instead of bytes when expressing MIDI data. For example, the
  53  * {@link #getStatus()} method of {@code MidiMessage} returns MIDI status bytes
  54  * as integers. If you are processing MIDI data that originated outside Java
  55  * Sound and now is encoded as signed bytes, the bytes can be converted to
  56  * integers using this conversion:
  57  * <p style="text-align:center">
  58  * {@code int i = (int)(byte & 0xFF)}
  59  * <p>
  60  * If you simply need to pass a known MIDI byte value as a method parameter, it
  61  * can be expressed directly as an integer, using (for example) decimal or
  62  * hexadecimal notation. For instance, to pass the "active sensing" status byte
  63  * as the first argument to {@code ShortMessage}'s
  64  * {@link ShortMessage#setMessage(int) setMessage(int)} method, you can express
  65  * it as 254 or 0xFE.
  66  *
  67  * @author David Rivas
  68  * @author Kara Kytle
  69  * @see Track
  70  * @see Sequence
  71  * @see Receiver




  31  * "meta-events" that can be used by sequencer programs. There are meta-events
  32  * for such information as lyrics, copyrights, tempo indications, time and key
  33  * signatures, markers, etc. For more information, see the Standard MIDI Files
  34  * 1.0 specification, which is part of the Complete MIDI 1.0 Detailed
  35  * Specification published by the MIDI Manufacturer's Association
  36  * (<a href = http://www.midi.org>http://www.midi.org</a>).
  37  * <p>
  38  * The base {@code MidiMessage} class provides access to three types of
  39  * information about a MIDI message:
  40  * <ul>
  41  *   <li>The messages's status byte
  42  *   <li>The total length of the message in bytes (the status byte plus any data
  43  *   bytes)
  44  *   <li>A byte array containing the complete message
  45  * </ul>
  46  *
  47  * {@code MidiMessage} includes methods to get, but not set, these values.
  48  * Setting them is a subclass responsibility.
  49  * <p>
  50  * <a id="integersVsBytes"></a>The MIDI standard expresses MIDI data in bytes.
  51  * However, because Java uses signed bytes, the Java Sound API uses
  52  * integers instead of bytes when expressing MIDI data. For example, the
  53  * {@link #getStatus()} method of {@code MidiMessage} returns MIDI status bytes
  54  * as integers. If you are processing MIDI data that originated outside Java
  55  * Sound and now is encoded as signed bytes, the bytes can be converted to
  56  * integers using this conversion:
  57  * <p style="text-align:center">
  58  * {@code int i = (int)(byte & 0xFF)}
  59  * <p>
  60  * If you simply need to pass a known MIDI byte value as a method parameter, it
  61  * can be expressed directly as an integer, using (for example) decimal or
  62  * hexadecimal notation. For instance, to pass the "active sensing" status byte
  63  * as the first argument to {@code ShortMessage}'s
  64  * {@link ShortMessage#setMessage(int) setMessage(int)} method, you can express
  65  * it as 254 or 0xFE.
  66  *
  67  * @author David Rivas
  68  * @author Kara Kytle
  69  * @see Track
  70  * @see Sequence
  71  * @see Receiver


< prev index next >