javax.sound.midi
public interface Sequencer extends MidiDevice
Since: 1.3
Nested Class Summary | |
---|---|
static class | Sequencer.SyncMode
A SyncMode object represents the mechanism by which a MIDI sequencer
synchronizes time with a master or slave device.
|
Method Summary | |
---|---|
int[] | addControllerEventListener(ControllerEventListener listener, int[] controllers)
Add a controller event listening object to this sequencer. |
boolean | addMetaEventListener(MetaEventListener listener)
Add a meta event listening object to this sequencer. |
Sequencer.SyncMode | getMasterSyncMode()
Get the source of timing information.
|
Sequencer.SyncMode[] | getMasterSyncModes()
Get an array of timing sources supported by this sequencer.
|
long | getMicrosecondLength()
Get the length of the current sequence in microseconds.
|
long | getMicrosecondPosition()
Get the current playback position of the sequencer in microseconds.
|
Sequence | getSequence()
Get the current sequence object for this sequencer.
|
Sequencer.SyncMode | getSlaveSyncMode()
Get the current slave synchronization mode.
|
Sequencer.SyncMode[] | getSlaveSyncModes()
Get an array of slave sync modes supported by this sequencer.
|
float | getTempoFactor()
Get the current scaling factor for the playback tempo.
|
float | getTempoInBPM()
Get the current tempo in beats per minute.
|
float | getTempoInMPQ()
Get the current tempo in microseconds per quarter note.
|
long | getTickLength()
Get the length of the current sequence in MIDI ticks.
|
long | getTickPosition()
Get the current playback position of the sequencer in MIDI ticks.
|
boolean | getTrackMute(int track)
Get the mute state of a specific track.
|
boolean | getTrackSolo(int track)
Get the solo state for a specific track.
|
boolean | isRecording()
Returns true if sequence is recording.
|
boolean | isRunning()
Returns true if the sequence is playing.
|
void | recordDisable(Track track)
Disable recording for a specific track.
|
void | recordEnable(Track track, int channel)
Enable recording for a specific track using data from a specific channel.
|
int[] | removeControllerEventListener(ControllerEventListener listener, int[] controllers)
Remove a controller listener from this sequencer for the specified
controller numbers.
|
void | removeMetaEventListener(MetaEventListener listener)
Remove a meta event listener from this sequencer.
|
void | setMasterSyncMode(Sequencer.SyncMode sync)
Set the source of timing information. sync must be found in the array
returned by getMasterSyncModes().
|
void | setMicrosecondPosition(long microsecond)
Set the current playback position of the sequencer in microseconds.
|
void | setSequence(Sequence seq)
Set the Sequence object for this sequencer.
|
void | setSequence(InputStream istream)
Set the sequence for this sequencer. istream reads on a valid MIDI file.
|
void | setSlaveSyncMode(Sequencer.SyncMode sync)
Set the slave synchronization mode for this sequencer. sync must be
found in the array returned by getSlaveSyncModes().
|
void | setTempoFactor(float factor)
Set a scaling factor for the playback tempo, which is 1.0 by default.
|
void | setTempoInBPM(float bpm)
Sets the current tempo in beats per minute.
|
void | setTempoInMPQ(float mpq)
Sets the current tempo in microseconds per quarter note.
|
void | setTickPosition(long tick)
Set the current playback position of the sequencer in MIDI ticks.
|
void | setTrackMute(int track, boolean mute)
Sets the mute state for a specific track.
|
void | setTrackSolo(int track, boolean solo)
Sets the solo state for a specific track.
|
void | start()
Start playback of the current sequence. |
void | startRecording()
Start playback and record of MIDI events.
|
void | stop()
Stop playback of the current sequence. |
void | stopRecording()
Stop recording, although continue playing. |
Parameters: listener the listener to add controllers the conroller numbers to listen to
Returns: the controller numbers being listened to
Parameters: listener the listener to add
Returns: true if listener was added, false othewise
Returns: the current source of timing information
Returns: an array of timing sources supported by this sequencer
Returns: the length of the current sequence in microseconds
Returns: the current playback position of the sequencer in microseconds
Returns: the current sequence object. May be null.
Returns: the current slave synchronization mode
Returns: an array of slave sync modes supported by this sequencer
Returns: the current tempo scaling factor
Returns: the current tempo in beats per minute
Returns: the current tempo in microseconds per quarter note.
Returns: the length of the current sequence in MIDI ticks
Returns: the current playback position of the sequencer in MIDI ticks
Parameters: track the track to query
Returns: the mute state for track
Parameters: track the track to query
Returns: the solo state for track
Returns: true if the sequence is recording and false otherwise
Returns: true if the sequence is playing and false otherwise
Parameters: track the track to disable recording for
Parameters: track the track to enable for recording channel the channel from which to record
Parameters: listener the listener to remove controllers the controllers to unlisten
Returns: the controller numbers being unlistened
Parameters: listener the listener to remove
Parameters: sync the new source of timing information
Parameters: microsecond the new playback position of the sequencer in microseconds
Parameters: seq the Sequence to process
Throws: InvalidMidiDataException if the sequence is invalid for any reason
Parameters: istream an input stream for a valid MIDI file
Throws: IOException if an I/O exception happens InvalidMidiDataException if the MIDI file contains bad data
Parameters: sync the new slave sync mode for this sequencer
Parameters: factor the new tempo scaling factor
Parameters: bpm the new tempo in bears per minutes
Parameters: mpq the new tempo in microseconds per quarter note.
Parameters: tick the new playback position of the sequencer in MIDI ticks
Parameters: track the track to modify mute the new mute state
Parameters: track the track to modify solo the new solo state