Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.
javax.sound.midi

Class MidiFileFormat


  • public class MidiFileFormat
    extends Object
    A MidiFileFormat object encapsulates a MIDI file's type, as well as its length and timing information.

    A MidiFileFormat object can include a set of properties. A property is a pair of key and value: the key is of type String, the associated property value is an arbitrary object. Properties specify additional informational meta data (like a author, or copyright). Properties are optional information, and file reader and file writer implementations are not required to provide or recognize properties.

    The following table lists some common properties that should be used in implementations:

    Property key Value type Description
    "author" String name of the author of this file
    "title" String title of this file
    "copyright" String copyright message
    "date" Date date of the recording or release
    "comment" String an arbitrary text

    Eerste pagina van API Java Inhoudsopgave Haut

    See Also:
    MidiSystem.getMidiFileFormat(java.io.File), Sequencer.setSequence(java.io.InputStream stream)
    • Constructor Detail

      • MidiFileFormat

        public MidiFileFormat(int type,
                      float divisionType,
                      int resolution,
                      int bytes,
                      long microseconds)
        Constructs a MidiFileFormat.
        Parameters:
        type - the MIDI file type (0, 1, or 2)
        divisionType - the timing division type (PPQ or one of the SMPTE types)
        resolution - the timing resolution
        bytes - the length of the MIDI file in bytes, or UNKNOWN_LENGTH if not known
        microseconds - the duration of the file in microseconds, or UNKNOWN_LENGTH if not known
        See Also:
        UNKNOWN_LENGTH, Sequence.PPQ, Sequence.SMPTE_24, Sequence.SMPTE_25, Sequence.SMPTE_30DROP, Sequence.SMPTE_30
      • MidiFileFormat

        public MidiFileFormat(int type,
                      float divisionType,
                      int resolution,
                      int bytes,
                      long microseconds,
                      Map<String,Object> properties)
        Construct a MidiFileFormat with a set of properties.
        Parameters:
        type - the MIDI file type (0, 1, or 2)
        divisionType - the timing division type (PPQ or one of the SMPTE types)
        resolution - the timing resolution
        bytes - the length of the MIDI file in bytes, or UNKNOWN_LENGTH if not known
        microseconds - the duration of the file in microseconds, or UNKNOWN_LENGTH if not known
        properties - a Map<String,Object> object with properties
        Since:
        1.5
        See Also:
        UNKNOWN_LENGTH, Sequence.PPQ, Sequence.SMPTE_24, Sequence.SMPTE_25, Sequence.SMPTE_30DROP, Sequence.SMPTE_30
    • Method Detail

      • getType

        public int getType()
        Obtains the MIDI file type.
        Returns:
        the file's type (0, 1, or 2)
      • getResolution

        public int getResolution()
        Obtains the timing resolution for the MIDI file. If the division type is PPQ, the resolution is specified in ticks per beat. For SMTPE timing, the resolution is specified in ticks per frame.
        Returns:
        the number of ticks per beat (PPQ) or per frame (SMPTE)
        See Also:
        getDivisionType(), Sequence.getResolution()
      • getByteLength

        public int getByteLength()
        Obtains the length of the MIDI file, expressed in 8-bit bytes.
        Returns:
        the number of bytes in the file, or UNKNOWN_LENGTH if not known
        See Also:
        UNKNOWN_LENGTH
      • properties

        public Map<String,Object> properties()
        Obtain an unmodifiable map of properties. The concept of properties is further explained in the class description.
        Returns:
        a Map<String,Object> object containing all properties. If no properties are recognized, an empty map is returned.
        Since:
        1.5
        See Also:
        getProperty(String)
      • getProperty

        public Object getProperty(String key)
        Obtain the property value specified by the key. The concept of properties is further explained in the class description.

        If the specified property is not defined for a particular file format, this method returns null.

        Parameters:
        key - the key of the desired property
        Returns:
        the value of the property with the specified key, or null if the property does not exist.
        Since:
        1.5
        See Also:
        properties()

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/sound/midi/midifileformat.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut