Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
javax.sound.midi

Class MetaMessage

  • All Implemented Interfaces:
    Cloneable

    public class MetaMessage
    extends MidiMessage
    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. (See the discussion in the MidiMessage class description.) The Standard MIDI Files specification defines various types of meta-events, such as sequence number, lyric, cue point, and set tempo. There are also meta-events for such information as lyrics, copyrights, tempo indications, time and key signatures, markers, etc. For more information, see the Standard MIDI Files 1.0 specification, which is part of the Complete MIDI 1.0 Detailed Specification published by the MIDI Manufacturer's Association (http://www.midi.org).

    When data is being transported using MIDI wire protocol, a ShortMessage with the status value 0xFF represents a system reset message. In MIDI files, this same status value denotes a MetaMessage. The types of meta-message are distinguished from each other by the first byte that follows the status byte 0xFF. The subsequent bytes are data bytes. As with system exclusive messages, there are an arbitrary number of data bytes, depending on the type of MetaMessage.

    See Also:
    MetaEventListener
    • Field Detail

      • META

        public static final int META
        Status byte for 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.
        See Also:
        MidiMessage.getStatus(), Constant Field Values
    • Constructor Detail

      • MetaMessage

        public MetaMessage()
        Constructs a new MetaMessage. The contents of the message are not set here; use setMessage to set them subsequently.
      • MetaMessage

        public MetaMessage(int type,
                   byte[] data,
                   int length)
                    throws InvalidMidiDataException
        Constructs a new MetaMessage and sets the message parameters. The contents of the message can be changed by using the setMessage method.
        Parameters:
        type - meta-message type (must be less than 128)
        data - the data bytes in the MIDI message
        length - an amount of bytes in the data byte array; it should be non-negative and less than or equal to data.length
        Throws:
        InvalidMidiDataException - if the parameter values do not specify a valid MIDI meta message
        Since:
        1.7
        See Also:
        setMessage(int, byte[], int), getType(), getData()
      • MetaMessage

        protected MetaMessage(byte[] data)
        Constructs a new MetaMessage.
        Parameters:
        data - an array of bytes containing the complete message. The message data may be changed using the setMessage method.
        See Also:
        setMessage(int, byte[], int)
    • Method Detail

      • setMessage

        public void setMessage(int type,
                      byte[] data,
                      int length)
                        throws InvalidMidiDataException
        Sets the message parameters for a 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.

        Parameters:
        type - meta-message type (must be less than 128)
        data - the data bytes in the MIDI message
        length - the number of bytes in the data byte array
        Throws:
        InvalidMidiDataException - if the parameter values do not specify a valid MIDI meta message
        InvalidMidiDataException
      • getType

        public int getType()
        Obtains the type of the MetaMessage.
        Returns:
        an integer representing the MetaMessage type
      • getData

        public byte[] getData()
        Obtains a copy of the data for the meta message. The returned array of bytes does not include the status byte or the message length data. The length of the data for the meta message is the length of the array. Note that the length of the entire message includes the status byte and the meta message type byte, and therefore may be longer than the returned array.
        Returns:
        array containing the meta message data.
        See Also:
        MidiMessage.getLength()
      • clone

        public Object clone()
        Creates a new object of the same class and with the same contents as this object.
        Specified by:
        clone in class MidiMessage
        Returns:
        a clone of this instance
        See Also:
        Cloneable

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/sound/midi/metamessage.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut