org.tritonus.midi.device.java
Class JavaSequencer
java.lang.Object
org.tritonus.share.midi.TMidiDevice
org.tritonus.share.midi.TSequencer
org.tritonus.midi.device.java.JavaSequencer
- All Implemented Interfaces:
- java.lang.Runnable, MidiDevice, Sequencer
public class JavaSequencer
- extends TSequencer
- implements java.lang.Runnable
Sequencer implementation in pure Java.
| Methods inherited from class org.tritonus.share.midi.TSequencer |
addControllerEventListener, addMetaEventListener, getLatency, getLoopCount, getLoopEndPoint, getLoopStartPoint, getMasterSyncMode, getMasterSyncModes, getMicrosecondLength, getSequence, getSlaveSyncMode, getSlaveSyncModes, getTempoFactor, getTempoInBPM, getTempoInMPQ, getTickLength, getTrackMute, getTrackSolo, isRunning, removeControllerEventListener, removeMetaEventListener, setLatency, setLoopCount, setLoopEndPoint, setLoopStartPoint, setMasterSyncMode, setSequence, setSlaveSyncMode, setTempoFactor, setTempoInBPM, setTempoInMPQ, setTrackMute, setTrackSolo, start, stop |
| Methods inherited from class org.tritonus.share.midi.TMidiDevice |
close, getDeviceInfo, getMaxReceivers, getMaxTransmitters, getMicrosecondPosition, getReceiver, getReceivers, getTransmitter, getTransmitters, isOpen, open |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaSequencer
public JavaSequencer(MidiDevice.Info info)
run
public void run()
- Specified by:
run in interface java.lang.Runnable
setSequence
public void setSequence(Sequence sequence)
throws InvalidMidiDataException
- Specified by:
setSequence in interface Sequencer- Overrides:
setSequence in class TSequencer
- Throws:
InvalidMidiDataException
setMicrosecondPosition
public void setMicrosecondPosition(long lPosition)
- Specified by:
setMicrosecondPosition in interface Sequencer
setTickPosition
public void setTickPosition(long lPosition)
- Specified by:
setTickPosition in interface Sequencer
getTickPosition
public long getTickPosition()
- Specified by:
getTickPosition in interface Sequencer
recordDisable
public void recordDisable(Track track)
- Specified by:
recordDisable in interface Sequencer
recordEnable
public void recordEnable(Track track)
recordEnable
public void recordEnable(Track track,
int nChannel)
- Specified by:
recordEnable in interface Sequencer
isRecording
public boolean isRecording()
- Specified by:
isRecording in interface Sequencer
stopRecording
public void stopRecording()
- Specified by:
stopRecording in interface Sequencer
startRecording
public void startRecording()
- Specified by:
startRecording in interface Sequencer
setClock
public void setClock(JavaSequencer.Clock clock)
- Set the clock this sequencer should use.
- Parameters:
clock - the Clock to be used
- Throws:
java.lang.IllegalStateException - if the sequencer is not closed
getClock
public JavaSequencer.Clock getClock()
- Obtain the clock used by this sequencer.
- Returns:
- the clock currently set for this sequencer