|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsky.monome.Component
sky.monome.Container
sky.monome.AbstractGroup<LedButtonCouple>
sky.monome.MultiSequencerGroup.SpecificSequencerGroup
public class MultiSequencerGroup.SpecificSequencerGroup
Specific sequencer group. This class is a special implementation of the
Sequencer interface based on the
AbstractGroup<LedButtonCouple> class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface sky.monome.sequencer.Sequencer |
|---|
Sequencer.SequencerOrientation |
| Field Summary | |
|---|---|
protected boolean |
active
Indicates if this specific sequencer group is currently used in the multisequencer group. |
protected int |
activeStepNumber
Number of the currently active step in the sequence. |
protected int |
activeStepNumberPseudoCopyForSequencerEffect
Copy of the number of the currently active step in the sequence. |
protected SynchronizedList<OptionalRadio.OptionalRadioGroup> |
buttonManagers
List of button managers that manage each step of the enclosing sequencer. |
protected SequenceIterator<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> |
sequenceIterator
Sequence iterator. |
protected int |
stepsNumber
Number of steps in the sequence. |
protected int |
stepsNumberPseudoCopyWhenChangingRealValue
Copy of the number of steps in the sequence. |
| Fields inherited from class sky.monome.AbstractGroup |
|---|
components |
| Fields inherited from class sky.monome.Container |
|---|
height, width |
| Fields inherited from class sky.monome.Component |
|---|
container, eventListenerList, lockObject, name, x, y |
| Fields inherited from interface sky.monome.sequencer.Sequencer |
|---|
SEQUENCER_EFFECT_TIME |
| Constructor Summary | |
|---|---|
protected |
MultiSequencerGroup.SpecificSequencerGroup(java.lang.String name,
int x,
int y,
int width,
int height,
float tempo,
int divisions,
SequenceIterator<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequenceIterator)
Deprecated. Since tempo and divisions parameters are not used at all, so it is recommended to use the
SpecificSequencerGroup(String,int,int,int,int,SequenceIterator constructor instead of this one. |
protected |
MultiSequencerGroup.SpecificSequencerGroup(java.lang.String name,
int x,
int y,
int width,
int height,
float tempo,
int divisions,
SequenceIteratorFactory<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequenceIteratorFactory)
Deprecated. Since tempo and divisions parameters are not used at all, so it is recommended to use the
SpecificSequencerGroup(String,int,int,int,int,SequenceIteratorFactory constructor instead of this one. |
protected |
MultiSequencerGroup.SpecificSequencerGroup(java.lang.String name,
int x,
int y,
int width,
int height,
SequenceIterator<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequenceIterator)
Constructs a specific sequencer group with the specified name, specified coordinates and dimensions, and the specified sequence iterator. |
protected |
MultiSequencerGroup.SpecificSequencerGroup(java.lang.String name,
int x,
int y,
int width,
int height,
SequenceIteratorFactory<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequenceIteratorFactory)
Constructs a specific sequencer group with the specified name, specified coordinates and dimensions, and the specified sequence iterator factory. |
| Method Summary | ||
|---|---|---|
protected void |
addLedButtonCouple(LedButtonCouple ledButtonCouple)
Adds the specified led/button couple to the list of led/button couples. |
|
void |
addSequencerListener(SequencerListener<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequencerListener)
Adds the specified sequencer listener to the list of sequencer listeners. |
|
void |
fireStepChanged(MultiSequencerGroup.SpecificSequencerGroup sequencerComponent,
int activeStepNumber)
Invoked when a step change occurs. |
|
int |
getActiveStepNumberInSequence()
Returns the number of the active step in the sequence. |
|
|
getButtonManager(java.lang.Class<T> clazz,
int number)
Deprecated. Since this class implements an interface that is parametrized, it is recommended to use getButtonManager(int) instead. |
|
OptionalRadio.OptionalRadioGroup |
getButtonManager(int number)
Returns the button manager of this sequencer component at the specified step number. |
|
OptionalRadio.OptionalRadioGroup[] |
getButtonManagers()
Returns an array of all button managers of this sequencer component. |
|
|
getButtonManagers(java.lang.Class<T> clazz)
Deprecated. Since this class implements an interface that is parametrized, it is recommended to use getButtonManagers() instead. |
|
LedButtonCouple[] |
getLedButtonCouples()
Returns an array of all led/button couples contained by this specific sequencer group. |
|
LedButtonCouple.LedState |
getLedStateToShow(LedButtonCouple ledButtonCouple)
Returns the led state to show instead of the natural led state of the specified led/button couple. |
|
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<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> |
getSequenceIterator()
Returns the sequence iterator used by this sequencer. |
|
long |
getSequencerEffectTime()
Returns the sequencer effect time, in milliseconds. |
|
SequencerEngine<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> |
getSequencerEngine()
Returns the sequencer engine that is used by this sequencer. |
|
SequencerListener<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>[] |
getSequencerListeners()
Returns an array of all sequencer listeners. |
|
int |
getStepsNumberInSequence()
Returns the number of steps in the sequence. |
|
boolean |
isActive()
Indicates if this specific sequencer group is currently used in the multisequencer group. |
|
void |
removeSequencerListener(SequencerListener<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequencerListener)
Removes the specified sequencer listener from the list of sequencer listeners. |
|
void |
sequencingAction(SequencerEngine<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequencerEngine)
Invoked when this sequencer must iterate over the sequence. |
|
void |
setActive(boolean active)
Sets if this specific sequencer group must be used in the multisequencer group. |
|
void |
setSequenceIterator(SequenceIterator<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> 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. |
|
java.lang.String |
toString()
Returns a string representation of this specific sequencer group. |
|
| Methods inherited from class sky.monome.AbstractGroup |
|---|
canHaveParentContainer, getAbsoluteX, getAbsoluteY, getBounds, getMonome, isVisible, notify, writeOn |
| Methods inherited from class sky.monome.Container |
|---|
getHeight, getWidth |
| Methods inherited from class sky.monome.Component |
|---|
getContainer, getLockObject, getName, getX, getY |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final SynchronizedList<OptionalRadio.OptionalRadioGroup> buttonManagers
protected int activeStepNumber
protected int activeStepNumberPseudoCopyForSequencerEffect
protected int stepsNumber
protected int stepsNumberPseudoCopyWhenChangingRealValue
protected SequenceIterator<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequenceIterator
protected boolean active
| Constructor Detail |
|---|
protected MultiSequencerGroup.SpecificSequencerGroup(java.lang.String name,
int x,
int y,
int width,
int height,
SequenceIterator<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequenceIterator)
throws MonomeException
name - Name of this specific sequencer group.x - X-coordinate of this specific sequencer group in the local context of its container.y - Y-coordinate of this specific sequencer group in the local context of its container.width - Width of this specific sequencer group.height - Height of this specific sequencer group.sequenceIterator - Sequence iterator to use to iterate over the sequence.
MonomeException - When the number of steps is invalid.
@Deprecated
protected MultiSequencerGroup.SpecificSequencerGroup(java.lang.String name,
int x,
int y,
int width,
int height,
float tempo,
int divisions,
SequenceIterator<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequenceIterator)
throws MonomeException
tempo and divisions parameters are not used at all, so it is recommended to use the
SpecificSequencerGroup(String,int,int,int,int,SequenceIterator) constructor instead of this one.
name - Name of this specific sequencer group.x - X-coordinate of this specific sequencer group in the local context of its container.y - Y-coordinate of this specific sequencer group in the local context of its container.width - Width of this specific sequencer group.height - Height of this specific sequencer group.tempo - Tempo, in number of quarter notes by minute.divisions - Number of divisions by quarter note.sequenceIterator - Sequence iterator to use to iterate over the sequence.
MonomeException - When the number of steps is invalid.
protected MultiSequencerGroup.SpecificSequencerGroup(java.lang.String name,
int x,
int y,
int width,
int height,
SequenceIteratorFactory<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequenceIteratorFactory)
throws MonomeException
name - Name of this specific sequencer group.x - X-coordinate of this specific sequencer group in the local context of its container.y - Y-coordinate of this specific sequencer group in the local context of its container.width - Width of this specific sequencer group.height - Height of this specific sequencer group.sequenceIteratorFactory - Factory for sequence iterator to use to iterate over the sequence.
MonomeException - When the number of steps is invalid.
@Deprecated
protected MultiSequencerGroup.SpecificSequencerGroup(java.lang.String name,
int x,
int y,
int width,
int height,
float tempo,
int divisions,
SequenceIteratorFactory<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequenceIteratorFactory)
throws MonomeException
tempo and divisions parameters are not used at all, so it is recommended to use the
SpecificSequencerGroup(String,int,int,int,int,SequenceIteratorFactory) constructor instead of this one.
name - Name of this specific sequencer group.x - X-coordinate of this specific sequencer group in the local context of its container.y - Y-coordinate of this specific sequencer group in the local context of its container.width - Width of this specific sequencer group.height - Height of this specific sequencer group.tempo - Tempo, in number of quarter notes by minute.divisions - Number of divisions by quarter note.sequenceIteratorFactory - Factory for sequence iterator to use to iterate over the sequence.
MonomeException - When the number of steps is invalid.| Method Detail |
|---|
public void sequencingAction(SequencerEngine<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequencerEngine)
sequencingAction in interface Sequencer<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>sequencerEngine - Sequencer engine that called this method.
MonomeException - When a problem occurs in the iteration over the sequence.public long getSequencerEffectTime()
getSequencerEffectTime in interface Sequencer<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>public void setSequencerEffectTime(long sequencerEffectTime)
setSequencerEffectTime in interface Sequencer<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>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.public SequencerEngine<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> getSequencerEngine()
getSequencerEngine in interface Sequencer<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>public int getActiveStepNumberInSequence()
getActiveStepNumberInSequence in interface Sequencer<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>public int getStepsNumberInSequence()
getStepsNumberInSequence in interface Sequencer<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>public int getMaximumStepsNumberInSequence()
getMaximumStepsNumberInSequence in interface Sequencer<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>public int getNotesNumberByStep()
getNotesNumberByStep in interface Sequencer<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>
public void setStepsNumber(int stepsNumber)
throws MonomeException
setStepsNumber in interface Sequencer<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>stepsNumber - New number of steps to iterate over the sequence.
MonomeException - When the new steps number is incorrect for this sequencer.@Deprecated public <T extends ButtonManager<?>> T[] getButtonManagers(java.lang.Class<T> clazz)
getButtonManagers() instead.
getButtonManagers in interface SequencerComponent<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>T - Desired type for button managers. It should be a subclass of ButtonManager.clazz - Class object that specify the return type for button managers.
java.lang.ClassCastException - When button managers can't be typed to the specified type.public OptionalRadio.OptionalRadioGroup[] getButtonManagers()
getButtonManagers in interface SequencerComponent<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>
@Deprecated
public <T extends ButtonManager<?>> T getButtonManager(java.lang.Class<T> clazz,
int number)
getButtonManager(int) instead.
getButtonManager in interface SequencerComponent<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>T - Desired type for the button manager. It should be a subclass of ButtonManager.clazz - Class object that specify the return type for the button manager.number - Number of the button manager needed.
java.lang.ClassCastException - When the button manager can't be typed to the specified type.public OptionalRadio.OptionalRadioGroup getButtonManager(int number)
getButtonManager in interface SequencerComponent<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>number - Number of the button manager needed.
public SequenceIterator<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> getSequenceIterator()
getSequenceIterator in interface Sequencer<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>public void setSequenceIterator(SequenceIterator<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequenceIterator)
setSequenceIterator in interface Sequencer<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>sequenceIterator - New sequence iterator to use in this sequencer.public LedButtonCouple[] getLedButtonCouples()
protected void addLedButtonCouple(LedButtonCouple ledButtonCouple)
throws MonomeException
ledButtonCouple - Led/button couple to add to the list of led/button couples.
MonomeException - When a led/button couple has bounds already used by another led/button couple.public java.lang.String toString()
toString in class Componentpublic LedButtonCouple.LedState getLedStateToShow(LedButtonCouple ledButtonCouple)
getLedStateToShow in interface LedStateModificationLayerledButtonCouple - led/button couple which is the reference.
public void addSequencerListener(SequencerListener<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequencerListener)
addSequencerListener in interface SequencerComponent<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>sequencerListener - Sequencer listener to add to the list of sequencer listeners.public void removeSequencerListener(SequencerListener<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequencerListener)
removeSequencerListener in interface SequencerComponent<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>sequencerListener - Sequencer listener to remove from the list of sequencer listeners.public SequencerListener<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>[] getSequencerListeners()
getSequencerListeners in interface SequencerComponent<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>
public void fireStepChanged(MultiSequencerGroup.SpecificSequencerGroup sequencerComponent,
int activeStepNumber)
fireStepChanged in interface SequencerComponent<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>sequencerComponent - Sequencer component that triggered the sequencer event.public boolean isActive()
true if this specific sequencer group is currently used in the multisequencer group, false otherwise.public void setActive(boolean active)
active - true if it must be used, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||