uk.org.toot.midi.sequencer
Interface SequencerTrack

All Superinterfaces:
TrackControls

public interface SequencerTrack
extends TrackControls


Method Summary
 boolean addMetaEventListener(javax.sound.midi.MetaEventListener listener)
           
 void chaseEvents(long startTick, long endTick, boolean doReindex, byte[][] tempArray)
          go through all events from startTick to endTick chase the controller state and program change state and then set the end-states at once.
 void clearNoteOnCache()
           
 void close()
           
 boolean isEnabled()
           
 boolean isFinished()
          Return whether no more messages can be pumped because track contents known a priori are completely finished.
 void notesOff(boolean doControllers)
          send note off for notes that are on
 boolean pump(long targetTick, boolean masterTrack)
          Pump all messages occuring from the previous to the current targetTick, exclusive of the previous and inclusive of the current targetTick.
 void reindex(long tick)
          Called when there has been a discontinuity in sequencer time due to setting a sequence, starting it, changing its position.
 void removeMetaEventListener(javax.sound.midi.MetaEventListener listener)
           
 void updateEnable(boolean hasSolo, byte[][] tempArray)
          Update the enabled state based on mute/solo and hasSolo
 
Methods inherited from interface uk.org.toot.midi.sequencer.TrackControls
isMute, isSolo, setMute, setSolo
 

Method Detail

close

void close()

isFinished

boolean isFinished()
Return whether no more messages can be pumped because track contents known a priori are completely finished. Just not having anything to pump for now does not mean it has finished if more pumping may arise, perhaps due to just-in-time composition.

Returns:
true if pumping has completely finished

isEnabled

boolean isEnabled()
Returns:
whether mute/solo cause track to be enabled

clearNoteOnCache

void clearNoteOnCache()

updateEnable

void updateEnable(boolean hasSolo,
                  byte[][] tempArray)
Update the enabled state based on mute/solo and hasSolo

Parameters:
hasSolo -
tempArray -

notesOff

void notesOff(boolean doControllers)
send note off for notes that are on


chaseEvents

void chaseEvents(long startTick,
                 long endTick,
                 boolean doReindex,
                 byte[][] tempArray)
go through all events from startTick to endTick chase the controller state and program change state and then set the end-states at once. needs to be called in synchronized state

Parameters:
tempArray - an byte[128][16] to hold controller messages

reindex

void reindex(long tick)
Called when there has been a discontinuity in sequencer time due to setting a sequence, starting it, changing its position. Also called on recoverable pumping errors.

Parameters:
tick - the tick to continue from

pump

boolean pump(long targetTick,
             boolean masterTrack)
Pump all messages occuring from the previous to the current targetTick, exclusive of the previous and inclusive of the current targetTick. We are passed disabled because we need to carry on reading but not sending events when disabled. So that we are in the correct position when we are reenabled and so that we can detect finishing. We are passed masterTrack so that we can decode tempo changes if appropriate.

Parameters:
targetTick - the tick to pump until
masterTrack - whether this sequencer track is the master track
Returns:
true if changes are pending

addMetaEventListener

boolean addMetaEventListener(javax.sound.midi.MetaEventListener listener)

removeMetaEventListener

void removeMetaEventListener(javax.sound.midi.MetaEventListener listener)


Copyright © 2004, 2005, 2006, 2007 Steve Taylor. All Rights Reserved.