java.lang.Objectjavax.sound.midi.Sequence
public class Sequence
A Sequence is a data structure containing musical
information (often an entire song or composition) that can be played
back by a object. Specifically, the
SequencerSequence contains timing
information and one or more tracks. Each consists of a
series of MIDI events (such as note-ons, note-offs, program changes, and meta-events).
The sequence's timing information specifies the type of unit that is used
to time-stamp the events in the sequence.
track
A Sequence can be created from a MIDI file by reading the file
into an input stream and invoking one of the getSequence methods of
MidiSystem. A sequence can also be built from scratch by adding new
Tracks to an empty Sequence, and adding
objects to these MidiEventTracks.
Sequencer.setSequence(java.io.InputStream stream),
Sequencer.setSequence(Sequence sequence),
Track.add(MidiEvent),
MidiFileFormat| Field Summary | |
|---|---|
protected float |
divisionType
The timing division type of the sequence. |
static float |
PPQ
The tempo-based timing type, for which the resolution is expressed in pulses (ticks) per quarter note. |
protected int |
resolution
The timing resolution of the sequence. |
static float |
SMPTE_24
The SMPTE-based timing type with 24 frames per second (resolution is expressed in ticks per frame). |
static float |
SMPTE_25
The SMPTE-based timing type with 25 frames per second (resolution is expressed in ticks per frame). |
static float |
SMPTE_30
The SMPTE-based timing type with 30 frames per second (resolution is expressed in ticks per frame). |
static float |
SMPTE_30DROP
The SMPTE-based timing type with 29.97 frames per second (resolution is expressed in ticks per frame). |
protected Vector<Track> |
tracks
The MIDI tracks in this sequence. |
| Constructor Summary | |
|---|---|
Sequence(float divisionType,
int resolution)
Constructs a new MIDI sequence with the specified timing division type and timing resolution. |
|
Sequence(float divisionType,
int resolution,
int numTracks)
Constructs a new MIDI sequence with the specified timing division type, timing resolution, and number of tracks. |
|
| Method Summary | |
|---|---|
Track |
createTrack()
Creates a new, initially empty track as part of this sequence. |
boolean |
deleteTrack(Track track)
Removes the specified track from the sequence. |
float |
getDivisionType()
Obtains the timing division type for this sequence. |
long |
getMicrosecondLength()
Obtains the duration of this sequence, expressed in microseconds. |
Patch[] |
getPatchList()
Obtains a list of patches referenced in this sequence. |
int |
getResolution()
Obtains the timing resolution for this sequence. |
long |
getTickLength()
Obtains the duration of this sequence, expressed in MIDI ticks. |
Track[] |
getTracks()
Obtains an array containing all the tracks in this sequence. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final float PPQ
Sequence(float, int),
Constant Field Valuespublic static final float SMPTE_24
Sequence(float, int),
Constant Field Valuespublic static final float SMPTE_25
Sequence(float, int),
Constant Field Valuespublic static final float SMPTE_30DROP
Sequence(float, int),
Constant Field Valuespublic static final float SMPTE_30
Sequence(float, int),
Constant Field Valuesprotected float divisionType
PPQ,
SMPTE_24,
SMPTE_25,
SMPTE_30DROP,
SMPTE_30,
getDivisionType()protected int resolution
getResolution()protected Vector<Track> tracks
getTracks()| Constructor Detail |
|---|
public Sequence(float divisionType,
int resolution)
throws InvalidMidiDataException
divisionType is PPQ (pulses per quarter note) and
the resolution is specified in ticks per beat. For SMTPE timing,
divisionType specifies the number of frames per
second and the resolution is specified in ticks per frame.
The sequence will contain no initial tracks. Tracks may be
added to or removed from the sequence using createTrack()
and deleteTrack(javax.sound.midi.Track).
divisionType - the timing division type (PPQ or one of the SMPTE types)resolution - the timing resolution
InvalidMidiDataException - if divisionType is not validPPQ,
SMPTE_24,
SMPTE_25,
SMPTE_30DROP,
SMPTE_30,
getDivisionType(),
getResolution(),
getTracks()
public Sequence(float divisionType,
int resolution,
int numTracks)
throws InvalidMidiDataException
divisionType is PPQ (pulses per quarter note) and
the resolution is specified in ticks per beat. For SMTPE timing,
divisionType specifies the number of frames per
second and the resolution is specified in ticks per frame.
The sequence will be initialized with the number of tracks specified by
numTracks. These tracks are initially empty (i.e.
they contain only the meta-event End of Track).
The tracks may be retrieved for editing using the getTracks()
method. Additional tracks may be added, or existing tracks removed,
using createTrack() and deleteTrack(javax.sound.midi.Track).
divisionType - the timing division type (PPQ or one of the SMPTE types)resolution - the timing resolutionnumTracks - the initial number of tracks in the sequence.
InvalidMidiDataException - if divisionType is not validPPQ,
SMPTE_24,
SMPTE_25,
SMPTE_30DROP,
SMPTE_30,
getDivisionType(),
getResolution()| Method Detail |
|---|
public float getDivisionType()
PPQ,
SMPTE_24,
SMPTE_25,
SMPTE_30DROP,
SMPTE_30,
Sequence(float, int),
MidiFileFormat.getDivisionType()public int getResolution()
getDivisionType(),
Sequence(float, int),
MidiFileFormat.getResolution()public Track createTrack()
getTracks(). Tracks may be
removed from the sequence using deleteTrack(javax.sound.midi.Track).
public boolean deleteTrack(Track track)
track - the track to remove
true if the track existed in the track and was removed,
otherwise false.createTrack(),
getTracks()public Track[] getTracks()
createTrack(),
deleteTrack(javax.sound.midi.Track)public long getMicrosecondLength()
public long getTickLength()
getMicrosecondLength()public Patch[] getPatchList()
Instrument objects
into a Synthesizer.
Patch objects used in this sequenceSynthesizer.loadInstruments(Soundbank, Patch[])Ces 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)