java.lang.Objectjavax.sound.midi.MidiFileFormat
public class MidiFileFormat
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 |
MidiSystem.getMidiFileFormat(java.io.File),
Sequencer.setSequence(java.io.InputStream stream)| Field Summary | |
|---|---|
protected int |
byteLength
The length of the MIDI file in bytes. |
protected float |
divisionType
The division type of the MIDI file. |
protected long |
microsecondLength
The duration of the MIDI file in microseconds. |
protected int |
resolution
The timing resolution of the MIDI file. |
protected int |
type
The type of MIDI file. |
static int |
UNKNOWN_LENGTH
Represents unknown length. |
| Constructor Summary | |
|---|---|
MidiFileFormat(int type,
float divisionType,
int resolution,
int bytes,
long microseconds)
Constructs a MidiFileFormat. |
|
MidiFileFormat(int type,
float divisionType,
int resolution,
int bytes,
long microseconds,
Map<String,Object> properties)
Construct a MidiFileFormat with a set of properties. |
|
| Method Summary | |
|---|---|
int |
getByteLength()
Obtains the length of the MIDI file, expressed in 8-bit bytes. |
float |
getDivisionType()
Obtains the timing division type for the MIDI file. |
long |
getMicrosecondLength()
Obtains the length of the MIDI file, expressed in microseconds. |
Object |
getProperty(String key)
Obtain the property value specified by the key. |
int |
getResolution()
Obtains the timing resolution for the MIDI file. |
int |
getType()
Obtains the MIDI file type. |
Map<String,Object> |
properties()
Obtain an unmodifiable map of properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int UNKNOWN_LENGTH
protected int type
protected float divisionType
protected int resolution
protected int byteLength
protected long microsecondLength
| Constructor Detail |
|---|
public MidiFileFormat(int type,
float divisionType,
int resolution,
int bytes,
long microseconds)
MidiFileFormat.
type - the MIDI file type (0, 1, or 2)divisionType - the timing division type (PPQ or one of the SMPTE types)resolution - the timing resolutionbytes - the length of the MIDI file in bytes, or UNKNOWN_LENGTH if not knownmicroseconds - the duration of the file in microseconds, or UNKNOWN_LENGTH if not knownUNKNOWN_LENGTH,
Sequence.PPQ,
Sequence.SMPTE_24,
Sequence.SMPTE_25,
Sequence.SMPTE_30DROP,
Sequence.SMPTE_30
public MidiFileFormat(int type,
float divisionType,
int resolution,
int bytes,
long microseconds,
Map<String,Object> properties)
MidiFileFormat with a set of properties.
type - the MIDI file type (0, 1, or 2)divisionType - the timing division type
(PPQ or one of the SMPTE types)resolution - the timing resolutionbytes - the length of the MIDI file in bytes,
or UNKNOWN_LENGTH if not knownmicroseconds - the duration of the file in microseconds,
or UNKNOWN_LENGTH if not knownproperties - a Map<String,Object> object
with propertiesUNKNOWN_LENGTH,
Sequence.PPQ,
Sequence.SMPTE_24,
Sequence.SMPTE_25,
Sequence.SMPTE_30DROP,
Sequence.SMPTE_30| Method Detail |
|---|
public int getType()
public float getDivisionType()
Sequence.Sequence(float, int),
Sequence.PPQ,
Sequence.SMPTE_24,
Sequence.SMPTE_25,
Sequence.SMPTE_30DROP,
Sequence.SMPTE_30,
Sequence.getDivisionType()public int getResolution()
getDivisionType(),
Sequence.getResolution()public int getByteLength()
UNKNOWN_LENGTHpublic long getMicrosecondLength()
Sequence.getMicrosecondLength(),
getByteLength(),
UNKNOWN_LENGTHpublic Map<String,Object> properties()
class description.
Map<String,Object> object containing
all properties. If no properties are recognized, an empty map is
returned.getProperty(String)public Object getProperty(String key)
class description.
If the specified property is not defined for a
particular file format, this method returns
null.
key - the key of the desired property
null if the property does not exist.propertiesCes informations proviennent du site de http://java.sun.com
Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :
Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.
Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.
Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.
Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.
Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
7 mots clés dont 0 définis manuellement (plus d'information...).
Avertissement
Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.
Recherche (afficher)
Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)