## Uses of Class
javax.sound.midi.MidiMessage

- Packages that use MidiMessage
  Package | Description
  --- | ---
  javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

- - ### Uses of MidiMessage in javax.sound.midi

    Subclasses of MidiMessage in javax.sound.midi
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `MetaMessage` A `MetaMessage` is a ``MidiMessage`` that is not meaningful to synthesizers, but that can be stored in a MIDI file and interpreted by a sequencer program.
    `class` | `ShortMessage` A `ShortMessage` contains a MIDI message that has at most two data bytes following its status byte.
    `class` | `SysexMessage` A `SysexMessage` object represents a MIDI system exclusive message.

    Methods in javax.sound.midi that return MidiMessage
    Modifier and Type | Method | Description
    --- | --- | ---
    `MidiMessage` | MidiEvent.`getMessage()` Obtains the MIDI message contained in the event.

    Methods in javax.sound.midi with parameters of type MidiMessage
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | Receiver.`send(MidiMessage message, long timeStamp)` Sends a MIDI message and time-stamp to this receiver.

    Constructors in javax.sound.midi with parameters of type MidiMessage
    Constructor | Description
    --- | ---
    `MidiEvent(MidiMessage message, long tick)` Constructs a new `MidiEvent`.

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.