javax.sound.midi
Modifier and Type | Field and Description |
---|---|
protected float |
divisionType
The timing division type for this sequence (PPQ or SMPTE*)
|
static float |
PPQ
Tempo-based timing.
|
protected int |
resolution
The timing resolution in ticks/beat or ticks/frame, depending on the
division type.
|
static float |
SMPTE_24
24 frames/second timing.
|
static float |
SMPTE_25
25 frames/second timing.
|
static float |
SMPTE_30
30 frames/second timing.
|
static float |
SMPTE_30DROP
29.97 frames/second timing.
|
protected Vector<Track> |
tracks
The MIDI tracks used by this sequence.
|
Constructor and Description |
---|
Sequence(float divisionType,
int resolution)
Create a MIDI sequence object with no initial tracks.
|
Sequence(float divisionType,
int resolution,
int numTracks)
Create a MIDI seqence object.
|
Modifier and Type | Method and Description |
---|---|
Track |
createTrack()
Create a new empty MIDI track and add it to this sequence.
|
boolean |
deleteTrack(Track track)
Remove the specified MIDI track from this sequence.
|
float |
getDivisionType()
The division type of this sequence.
|
long |
getMicrosecondLength()
The length of this sequence in microseconds.
|
Patch[] |
getPatchList()
Get an array of patches used in this sequence.
|
int |
getResolution()
The timing resolution for this sequence, relative to the division type.
|
long |
getTickLength()
The length of this sequence in MIDI ticks.
|
Track[] |
getTracks()
Get an array of MIDI tracks used in this sequence.
|
protected float divisionType
protected int resolution
public static final float PPQ
public static final float SMPTE_24
public static final float SMPTE_25
public static final float SMPTE_30
public static final float SMPTE_30DROP
public Sequence(float divisionType, int resolution) throws InvalidMidiDataException
divisionType
- the division type (must be one of PPQ or SMPTE_*)resolution
- the timing resolutionInvalidMidiDataException
- if the division type is invalidpublic Sequence(float divisionType, int resolution, int numTracks) throws InvalidMidiDataException
divisionType
- the division type (must be one of PPQ or SMPTE_*)resolution
- the timing resolutionnumTracks
- the number of initial tracksInvalidMidiDataException
- if the division type is invalidpublic float getDivisionType()
public int getResolution()
public Track createTrack()
public boolean deleteTrack(Track track)
track
- the track to removepublic Track[] getTracks()
public long getMicrosecondLength()
public long getTickLength()
public Patch[] getPatchList()