sky.monome.sequencer
Interface Sequencer<S extends Sequencer<S,B>,B extends ButtonManager<B>>

Type Parameters:
S - Type of sequencers that implement this interface.
B - Type of button managers used by the sequencers that implement this interface.
All Superinterfaces:
SequencerComponent<S,B>
All Known Implementing Classes:
MultiSequencerGroup.SpecificSequencerGroup, SequencerGroup, SequencerPageSwitcher

public interface Sequencer<S extends Sequencer<S,B>,B extends ButtonManager<B>>
extends SequencerComponent<S,B>

Complete sequencer that can run sequences.

Author:
PJ Skyman

Nested Class Summary
static class Sequencer.SequencerOrientation
          Orientation of the sequencer.
 
Field Summary
static long SEQUENCER_EFFECT_TIME
          Time duration of the sequencer effect (short lightning that symbolizes the activation of a new step in the sequence), in milliseconds.
 
Method Summary
 int getActiveStepNumberInSequence()
          Returns the number of the active step in the sequence.
 int getMaximumStepsNumberInSequence()
          Returns the maximum possible number of steps in the sequence.
 int getNotesNumberByStep()
          Returns the number of available notes by step in the sequence.
 SequenceIterator<S,B> getSequenceIterator()
          Returns the sequence iterator used by this sequencer.
 long getSequencerEffectTime()
          Returns the sequencer effect time, in milliseconds.
 SequencerEngine<S,B> getSequencerEngine()
          Returns the sequencer engine that is used by this sequencer.
 int getStepsNumberInSequence()
          Returns the number of steps in the sequence.
 void sequencingAction(SequencerEngine<S,B> sequencerEngine)
          Invoked when this sequencer must iterate over the sequence.
 void setSequenceIterator(SequenceIterator<S,B> sequenceIterator)
          Sets the sequence iterator used by this sequencer.
 void setSequencerEffectTime(long sequencerEffectTime)
          Modifies the sequencer effect time, in milliseconds.
 void setStepsNumber(int stepsNumber)
          Modifies the number of steps to iterate over the sequence.
 
Methods inherited from interface sky.monome.event.sequencer.SequencerComponent
addSequencerListener, fireStepChanged, getButtonManager, getButtonManager, getButtonManagers, getButtonManagers, getSequencerListeners, removeSequencerListener
 

Field Detail

SEQUENCER_EFFECT_TIME


static final long SEQUENCER_EFFECT_TIME
Time duration of the sequencer effect (short lightning that symbolizes the activation of a new step in the sequence), in milliseconds. Since SkyMonome v1.3, sequencers should use this value by default, but the user can change it by calling setSequencerEffectTime(long) method.

See Also:
Constant Field Values
Method Detail

getSequencerEffectTime


long getSequencerEffectTime()
Returns the sequencer effect time, in milliseconds. The sequencer effect is the short lightning that symbolizes the activation of a new step in the sequence.

Returns:
The sequencer effect time, in milliseconds.
Since:
SkyMonome v1.3

setSequencerEffectTime


void setSequencerEffectTime(long sequencerEffectTime)
Modifies the sequencer effect time, in milliseconds. The sequencer effect is the short lightning that symbolizes the activation of a new step in the sequence.

Parameters:
sequencerEffectTime - New sequencer effect time, in milliseconds. Please note that if this new time exceeds the time between two consecutive steps, so you may meet erratic behaviors.
Since:
SkyMonome v1.3

getSequencerEngine


SequencerEngine<S,B> getSequencerEngine()
Returns the sequencer engine that is used by this sequencer.

Returns:
The sequencer engine that is used by this sequencer.
Since:
SkyMonome v1.3

getStepsNumberInSequence


int getStepsNumberInSequence()
Returns the number of steps in the sequence.

Returns:
The number of steps in the sequence.

getMaximumStepsNumberInSequence


int getMaximumStepsNumberInSequence()
Returns the maximum possible number of steps in the sequence.

Returns:
The maximum possible number of steps in the sequence.
Since:
SkyMonome v1.1

getActiveStepNumberInSequence


int getActiveStepNumberInSequence()
Returns the number of the active step in the sequence.

Returns:
The number of the active step in the sequence.

getNotesNumberByStep


int getNotesNumberByStep()
Returns the number of available notes by step in the sequence.

Returns:
The number of available notes by step in the sequence.
Since:
SkyMonome v1.1

setStepsNumber


void setStepsNumber(int stepsNumber)

                    throws MonomeException
Modifies the number of steps to iterate over the sequence.

Parameters:
stepsNumber - New number of steps to iterate over the sequence.
Throws:
MonomeException - When the new steps number is incorrect for this sequencer.

sequencingAction


void sequencingAction(SequencerEngine<S,B> sequencerEngine)

                      throws MonomeException
Invoked when this sequencer must iterate over the sequence.

Parameters:
sequencerEngine - Sequencer engine that called this method.
Throws:
MonomeException - When a problem occurs in the iteration over the sequence.

getSequenceIterator


SequenceIterator<S,B> getSequenceIterator()
Returns the sequence iterator used by this sequencer.

Returns:
The sequence iterator used by this sequencer.
Since:
SkyMonome v1.1

setSequenceIterator


void setSequenceIterator(SequenceIterator<S,B> sequenceIterator)
Sets the sequence iterator used by this sequencer.

Parameters:
sequenceIterator - New sequence iterator to use in this sequencer.
Since:
SkyMonome v1.1