org.tritonus.midi.device.alsa
Class AlsaSequencer
java.lang.Object
org.tritonus.share.midi.TMidiDevice
org.tritonus.share.midi.TSequencer
org.tritonus.midi.device.alsa.AlsaSequencer
- All Implemented Interfaces:
- MidiDevice, Sequencer
public class AlsaSequencer
- extends TSequencer
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, removeControllerEventListener, removeMetaEventListener, setLatency, setLoopCount, setLoopEndPoint, setLoopStartPoint, setMasterSyncMode, setSequence, setSequence, setSlaveSyncMode, setTempoFactor, setTempoInBPM, setTempoInMPQ, setTrackMute, setTrackSolo, start, stop |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AlsaSequencer
public AlsaSequencer(MidiDevice.Info info)
isRunning
public boolean isRunning()
- Specified by:
isRunning
in interface Sequencer
- Overrides:
isRunning
in class TSequencer
startRecording
public void startRecording()
stopRecording
public void stopRecording()
isRecording
public boolean isRecording()
recordEnable
public void recordEnable(Track track,
int nChannel)
recordDisable
public void recordDisable(Track track)
getTickPosition
public long getTickPosition()
setTickPosition
public void setTickPosition(long lTick)
getMicrosecondPosition
public long getMicrosecondPosition()
- Description copied from class:
TMidiDevice
- Returns the device time in microseconds.
This is a default implementation, telling the application
program that the device doesn't track time. If a device wants
to give timing information, it has to override this method.
- Specified by:
getMicrosecondPosition
in interface MidiDevice
- Specified by:
getMicrosecondPosition
in interface Sequencer
- Overrides:
getMicrosecondPosition
in class TMidiDevice
setMicrosecondPosition
public void setMicrosecondPosition(long lMicroseconds)
sendMessageTick
public void sendMessageTick(MidiMessage message,
long lTick)
- Put a message into the queue.
This is Claus-Dieter's special method: it puts the message to
the ALSA queue for delivery at the specified time.
The time has to be given in ticks according to the resolution
of the currently active Sequence. For this method to work,
the Sequencer has to be started. The message is delivered
the same way as messages from a Sequence, i.e. to all
registered Transmitters. If the current queue position (as
returned by getTickPosition()) is
already behind the desired schedule time, the message is
ignored.
- Parameters:
message
- the MidiMessage to put into the queue.lTick
- the desired schedule time in ticks.
getReceiver
public Receiver getReceiver()
throws MidiUnavailableException
- Description copied from class:
TMidiDevice
- Creates a new Receiver object associated with this instance.
In this implementation, an unlimited number of Receivers
per MidiDevice can be created.
- Specified by:
getReceiver
in interface MidiDevice
- Overrides:
getReceiver
in class TMidiDevice
- Throws:
MidiUnavailableException
getTransmitter
public Transmitter getTransmitter()
throws MidiUnavailableException
- Description copied from class:
TMidiDevice
- Creates a new Transmitter object associated with this instance.
In this implementation, an unlimited number of Transmitters
per MidiDevice can be created.
- Specified by:
getTransmitter
in interface MidiDevice
- Overrides:
getTransmitter
in class TMidiDevice
- Throws:
MidiUnavailableException