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 SysexMessage

  • All Implemented Interfaces:
    Cloneable

    public class SysexMessage
    extends MidiMessage
    A SysexMessage object represents a MIDI system exclusive message.

    When a system exclusive message is read from a MIDI file, it always has a defined length. Data from a system exclusive message from a MIDI file should be stored in the data array of a SysexMessage as follows: the system exclusive message status byte (0xF0 or 0xF7), all message data bytes, and finally the end-of-exclusive flag (0xF7). The length reported by the SysexMessage object is therefore the length of the system exclusive data plus two: one byte for the status byte and one for the end-of-exclusive flag.

    As dictated by the Standard MIDI Files specification, two status byte values are legal for a SysexMessage read from a MIDI file:

    • 0xF0: System Exclusive message (same as in MIDI wire protocol)
    • 0xF7: Special System Exclusive message

    When Java Sound is used to handle system exclusive data that is being received using MIDI wire protocol, it should place the data in one or more SysexMessages. In this case, the length of the system exclusive data is not known in advance; the end of the system exclusive data is marked by an end-of-exclusive flag (0xF7) in the MIDI wire byte stream.

    • 0xF0: System Exclusive message (same as in MIDI wire protocol)
    • 0xF7: End of Exclusive (EOX)
    The first SysexMessage object containing data for a particular system exclusive message should have the status value 0xF0. If this message contains all the system exclusive data for the message, it should end with the status byte 0xF7 (EOX). Otherwise, additional system exclusive data should be sent in one or more SysexMessages with a status value of 0xF7. The SysexMessage containing the last of the data for the system exclusive message should end with the value 0xF7 (EOX) to mark the end of the system exclusive message.

    If system exclusive data from SysexMessages objects is being transmitted using MIDI wire protocol, only the initial 0xF0 status byte, the system exclusive data itself, and the final 0xF7 (EOX) byte should be propagated; any 0xF7 status bytes used to indicate that a SysexMessage contains continuing system exclusive data should not be propagated via MIDI wire protocol.

    • Field Detail

      • SPECIAL_SYSTEM_EXCLUSIVE

        public static final int SPECIAL_SYSTEM_EXCLUSIVE
        Status byte for Special System Exclusive message (0xF7, or 247), which is used in MIDI files. It has the same value as END_OF_EXCLUSIVE, which is used in the real-time "MIDI wire" protocol.
        See Also:
        MidiMessage.getStatus(), Constant Field Values
    • Constructor Detail

      • SysexMessage

        public SysexMessage()
        Constructs a new SysexMessage. The contents of the new message are guaranteed to specify a valid MIDI message. Subsequently, you may set the contents of the message using one of the setMessage methods.
        See Also:
        setMessage(byte[], int)
      • SysexMessage

        public SysexMessage(byte[] data,
                    int length)
                     throws InvalidMidiDataException
        Constructs a new SysexMessage and sets the data for the message. The first byte of the data array must be a valid system exclusive status byte (0xF0 or 0xF7). The contents of the message can be changed by using one of the setMessage methods.
        Parameters:
        data - the system exclusive message data including the status byte
        length - the length of the valid message data in the array, including the status byte; 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(byte[], int), setMessage(int, byte[], int), getData()
      • SysexMessage

        public SysexMessage(int status,
                    byte[] data,
                    int length)
                     throws InvalidMidiDataException
        Constructs a new SysexMessage and sets the data for the message. The contents of the message can be changed by using one of the setMessage methods.
        Parameters:
        status - the status byte for the message; it must be a valid system exclusive status byte (0xF0 or 0xF7)
        data - the system exclusive message data (without the status byte)
        length - the length of the valid message data in the 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(byte[], int), setMessage(int, byte[], int), getData()
      • SysexMessage

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

      • setMessage

        public void setMessage(byte[] data,
                      int length)
                        throws InvalidMidiDataException
        Sets the data for the system exclusive message. The first byte of the data array must be a valid system exclusive status byte (0xF0 or 0xF7).
        Overrides:
        setMessage in class MidiMessage
        Parameters:
        data - the system exclusive message data
        length - the length of the valid message data in the array, including the status byte.
        Throws:
        InvalidMidiDataException
      • setMessage

        public void setMessage(int status,
                      byte[] data,
                      int length)
                        throws InvalidMidiDataException
        Sets the data for the system exclusive message.
        Parameters:
        status - the status byte for the message (0xF0 or 0xF7)
        data - the system exclusive message data
        length - the length of the valid message data in the array
        Throws:
        InvalidMidiDataException
      • getData

        public byte[] getData()
        Obtains a copy of the data for the system exclusive message. The returned array of bytes does not include the status byte.
        Returns:
        array containing the system exclusive message data.
      • 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/sysexmessage.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