sky.monome
Class SequencerPageSwitcher


java.lang.Object

  extended by sky.monome.Component

      extended by sky.monome.Container

          extended by sky.monome.AbstractGroup<SequencerPageSwitcher.SequencerPage>

              extended by sky.monome.SequencerPageSwitcher

All Implemented Interfaces:
SequencerComponent<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>, Sequencer<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>

public class SequencerPageSwitcher
extends AbstractGroup<SequencerPageSwitcher.SequencerPage>
implements Sequencer<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>

Single sequencer which works with multiple pages. You can control multiple parameters in parallel by activating one page or another.

Author:
PJ Skyman

Nested Class Summary
 class SequencerPageSwitcher.SequencerPage
          Page of sequencer.
 
Nested classes/interfaces inherited from interface sky.monome.sequencer.Sequencer
Sequencer.SequencerOrientation
 
Field Summary
protected  SequencerPageSwitcher.SequencerPage activePage
          Active sequencer page in this sequencer page switcher.
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  boolean optional
          Indicates if a Radio.RadioGroup or a OptionalRadio.OptionalRadioGroup is used to control the steps buttons.
protected  SequenceIterator<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequenceIterator
          Sequence iterator.
protected  long sequencerEffectTime
          Time duration of the sequencer effect, in milliseconds (short lightning that symbolizes the activation of a new step in the sequence).
protected  SequencerEngine<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequencerEngine
          Sequencer engine.
protected  Sequencer.SequencerOrientation sequencerOrientation
          Orientation of this sequencer page switcher.
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
SequencerPageSwitcher(java.lang.String name, Container container, int x, int y, int width, int height, Sequencer.SequencerOrientation sequencerOrientation, float tempo, int divisions, int stepsNumber, boolean optional, int pagesNumber)
          Deprecated. Since SkyMonome v1.2, all components register themselves inside their container, so you don't need to specify the container by calling this constructor.
SequencerPageSwitcher(java.lang.String name, Container container, int x, int y, int width, int height, Sequencer.SequencerOrientation sequencerOrientation, float tempo, int divisions, int stepsNumber, boolean optional, int pagesNumber, SequenceIterator<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequenceIterator)
          Deprecated. Since SkyMonome v1.2, all components register themselves inside their container, so you don't need to specify the container by calling this constructor.
SequencerPageSwitcher(java.lang.String name, Container container, int x, int y, int width, int height, Sequencer.SequencerOrientation sequencerOrientation, float tempo, int divisions, int stepsNumber, boolean optional, int pagesNumber, SequenceIteratorFactory<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequenceIteratorFactory)
          Deprecated. Since SkyMonome v1.2, all components register themselves inside their container, so you don't need to specify the container by calling this constructor.
SequencerPageSwitcher(java.lang.String name, int x, int y, int width, int height, Sequencer.SequencerOrientation sequencerOrientation, float tempo, int divisions, int stepsNumber, boolean optional, int pagesNumber)
          Constructs a sequencer page switcher with the specified name, specified coordinates and dimensions, the specified orientation, specified tempo and number of divisions by quarter note, the specified steps number, the specified mode for radio groups and the specified pages number.
SequencerPageSwitcher(java.lang.String name, int x, int y, int width, int height, Sequencer.SequencerOrientation sequencerOrientation, float tempo, int divisions, int stepsNumber, boolean optional, int pagesNumber, SequenceIterator<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequenceIterator)
          Constructs a sequencer page switcher with the specified name, specified coordinates and dimensions, the specified orientation, specified tempo and number of divisions by quarter note, the specified steps number, the specified mode for radio groups, the specified pages number and the specified sequence iterator.
SequencerPageSwitcher(java.lang.String name, int x, int y, int width, int height, Sequencer.SequencerOrientation sequencerOrientation, float tempo, int divisions, int stepsNumber, boolean optional, int pagesNumber, SequenceIteratorFactory<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequenceIteratorFactory)
          Constructs a sequencer page switcher with the specified name, specified coordinates and dimensions, the specified orientation, specified tempo and number of divisions by quarter note, the specified steps number, the specified mode for radio groups, the specified pages number and the specified sequence iterator factory.
 
Method Summary
 void addSequencerListener(SequencerListener<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequencerListener)
          Adds the specified sequencer listener to the list of sequencer listeners.
 void fireStepChanged(SequencerPageSwitcher sequencerPageSwitcher, int activeStepNumber)
          Invoked when a step change occurs.
 SequencerPageSwitcher.SequencerPage getActivePage()
          Returns the currently active page.
 int getActiveStepNumberInSequence()
          Returns the number of the active step in the sequence.
<T extends ButtonManager<?>>
T
getButtonManager(java.lang.Class<T> clazz, int number)
          Deprecated. Since it is more logical to use getButtonManagerForPage(Class,SequencerPage,int) to specify the page on which you want the button manager.
 SequencerRadio.SequencerRadioGroup getButtonManager(int number)
          Deprecated. Since it is more logical to use getButtonManagerForPage(SequencerPage,int) to specify the page on which you want the button manager.
<T extends ButtonManager<?>>
T
getButtonManagerForPage(java.lang.Class<T> clazz, SequencerPageSwitcher.SequencerPage page, int number)
          Deprecated. Since this class implements an interface that is parametrized, it is recommended to use getButtonManagerForPage(SequencerPage,int) instead.
 SequencerRadio.SequencerRadioGroup getButtonManagerForPage(SequencerPageSwitcher.SequencerPage page, int number)
          Returns the button manager of this sequencer page switcher at the specified step number and which is contained by the specified page.
 SequencerRadio.SequencerRadioGroup[] getButtonManagers()
          Deprecated. Since it is more logical to use getButtonManagersForPage(SequencerPage) to specify the page on which you want button managers.
<T extends ButtonManager<?>>
T[]
getButtonManagers(java.lang.Class<T> clazz)
          Deprecated. Since it is more logical to use getButtonManagersForPage(Class,SequencerPage) to specify the page on which you want button managers.
<T extends ButtonManager<?>>
T[]
getButtonManagersForPage(java.lang.Class<T> clazz, SequencerPageSwitcher.SequencerPage page)
          Deprecated. Since this class implements an interface that is parametrized, it is recommended to use getButtonManagerForPage(SequencerPage,int) instead.
 SequencerRadio.SequencerRadioGroup[] getButtonManagersForPage(SequencerPageSwitcher.SequencerPage page)
          Returns an array of all button managers of this sequencer page switcher which are contained by the specified page.
 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.
 SequencerPageSwitcher.SequencerPage[] getPages()
          Returns an array of all pages.
 SequenceIterator<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> getSequenceIterator()
          Returns the sequence iterator used by this sequencer.
 long getSequencerEffectTime()
          Returns the sequencer effect time, in milliseconds.
 SequencerEngine<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> getSequencerEngine()
          Returns the sequencer engine that is used by this sequencer.
 SequencerListener<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>[] getSequencerListeners()
          Returns an array of all sequencer listeners.
 int getStepsNumberInSequence()
          Returns the number of steps in the sequence.
 void notify(OSCMessageDigester messageDigester)
          Notifies this sequencer page switcher that a message comes from the Monome device.
 void removeSequencerListener(SequencerListener<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequencerListener)
          Removes the specified sequencer listener from the list of sequencer listeners.
 void sequencingAction(SequencerEngine<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequencerEngine)
          Invoked when this sequencer must iterate over the sequence.
 void setSequenceIterator(SequenceIterator<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> 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.
 void showPage(SequencerPageSwitcher.SequencerPage sequencerPage)
          Sets as active the specified page.
 java.lang.String toString()
          Returns a string representation of this sequencer page switcher.
 void writeOn(Frame frame)
          Writes this sequencer page switcher on the specified frame in order to refresh the Monome device.
 
Methods inherited from class sky.monome.AbstractGroup
canHaveParentContainer, getAbsoluteX, getAbsoluteY, getBounds, getMonome, isVisible
 
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

activePage


protected SequencerPageSwitcher.SequencerPage activePage
Active sequencer page in this sequencer page switcher.


activeStepNumber


protected int activeStepNumber
Number of the currently active step in the sequence.


activeStepNumberPseudoCopyForSequencerEffect


protected int activeStepNumberPseudoCopyForSequencerEffect
Copy of the number of the currently active step in the sequence. This copy is used for the sequencer lightning effect.


sequencerOrientation


protected final Sequencer.SequencerOrientation sequencerOrientation
Orientation of this sequencer page switcher.


stepsNumber


protected int stepsNumber
Number of steps in the sequence.


stepsNumberPseudoCopyWhenChangingRealValue


protected int stepsNumberPseudoCopyWhenChangingRealValue
Copy of the number of steps in the sequence. This copy is used when the user change the real value in live.


sequenceIterator


protected SequenceIterator<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequenceIterator
Sequence iterator.


sequencerEngine


protected final SequencerEngine<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequencerEngine
Sequencer engine.


optional


protected final boolean optional
Indicates if a Radio.RadioGroup or a OptionalRadio.OptionalRadioGroup is used to control the steps buttons.


sequencerEffectTime


protected long sequencerEffectTime
Time duration of the sequencer effect, in milliseconds (short lightning that symbolizes the activation of a new step in the sequence).

Since:
SkyMonome v1.3
Constructor Detail

SequencerPageSwitcher


@Deprecated

public SequencerPageSwitcher(java.lang.String name,

                                        Container container,

                                        int x,

                                        int y,

                                        int width,

                                        int height,

                                        Sequencer.SequencerOrientation sequencerOrientation,

                                        float tempo,

                                        int divisions,

                                        int stepsNumber,

                                        boolean optional,

                                        int pagesNumber)

                      throws MonomeException
Deprecated. Since SkyMonome v1.2, all components register themselves inside their container, so you don't need to specify the container by calling this constructor.

Constructs a sequencer page switcher with the specified name, specified coordinates and dimensions, the specified orientation, specified tempo and number of divisions by quarter note, the specified steps number, the specified mode for radio groups, the specified pages number and contained by the specified container. A default UpwardSequenceIterator is used to iterate over the sequence.

Parameters:
name - Name of this sequencer page switcher.
container - Container that will contain this sequencer page switcher.
x - X-coordinate of this sequencer page switcher in the local context of its container.
y - Y-coordinate of this sequencer page switcher in the local context of its container.
width - Width of this sequencer page switcher.
height - Height of this sequencer page switcher.
sequencerOrientation - Sequencer orientation to use with this sequencer page switcher.
tempo - Tempo, in number of quarter notes by minute.
divisions - Number of divisions by quarter note.
stepsNumber - Number of steps to use in this sequencer page switcher.
optional - Boolean that indicates if a Radio.RadioGroup or a OptionalRadio.OptionalRadioGroup is used to control the steps buttons.
pagesNumber - Number of pages to use in this sequencer page switcher.
Throws:
MonomeException - When the specified steps number is invalid, or when the specified pages number is invalid, or when a led state can't be initialized.

SequencerPageSwitcher


public SequencerPageSwitcher(java.lang.String name,

                             int x,

                             int y,

                             int width,

                             int height,

                             Sequencer.SequencerOrientation sequencerOrientation,

                             float tempo,

                             int divisions,

                             int stepsNumber,

                             boolean optional,

                             int pagesNumber)

                      throws MonomeException
Constructs a sequencer page switcher with the specified name, specified coordinates and dimensions, the specified orientation, specified tempo and number of divisions by quarter note, the specified steps number, the specified mode for radio groups and the specified pages number. A default UpwardSequenceIterator is used to iterate over the sequence.

Parameters:
name - Name of this sequencer page switcher.
x - X-coordinate of this sequencer page switcher in the local context of its container.
y - Y-coordinate of this sequencer page switcher in the local context of its container.
width - Width of this sequencer page switcher.
height - Height of this sequencer page switcher.
sequencerOrientation - Sequencer orientation to use with this sequencer page switcher.
tempo - Tempo, in number of quarter notes by minute.
divisions - Number of divisions by quarter note.
stepsNumber - Number of steps to use in this sequencer page switcher.
optional - Boolean that indicates if a Radio.RadioGroup or a OptionalRadio.OptionalRadioGroup is used to control the steps buttons.
pagesNumber - Number of pages to use in this sequencer page switcher.
Throws:
MonomeException - When the specified steps number is invalid, or when the specified pages number is invalid, or when a led state can't be initialized.
Since:
SkyMonome v1.2

SequencerPageSwitcher


@Deprecated

public SequencerPageSwitcher(java.lang.String name,

                                        Container container,

                                        int x,

                                        int y,

                                        int width,

                                        int height,

                                        Sequencer.SequencerOrientation sequencerOrientation,

                                        float tempo,

                                        int divisions,

                                        int stepsNumber,

                                        boolean optional,

                                        int pagesNumber,

                                        SequenceIterator<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequenceIterator)

                      throws MonomeException
Deprecated. Since SkyMonome v1.2, all components register themselves inside their container, so you don't need to specify the container by calling this constructor.

Constructs a sequencer page switcher with the specified name, specified coordinates and dimensions, the specified orientation, specified tempo and number of divisions by quarter note, the specified steps number, the specified mode for radio groups, the specified pages number, the specified sequence iterator and contained by the specified container.

Parameters:
name - Name of this sequencer page switcher.
container - Container that will contain this sequencer page switcher.
x - X-coordinate of this sequencer page switcher in the local context of its container.
y - Y-coordinate of this sequencer page switcher in the local context of its container.
width - Width of this sequencer page switcher.
height - Height of this sequencer page switcher.
sequencerOrientation - Sequencer orientation to use with this sequencer page switcher.
tempo - Tempo, in number of quarter notes by minute.
divisions - Number of divisions by quarter note.
stepsNumber - Number of steps to use in this sequencer page switcher.
optional - Boolean that indicates if a Radio.RadioGroup or a OptionalRadio.OptionalRadioGroup is used to control the steps buttons.
pagesNumber - Number of pages to use in this sequencer page switcher.
sequenceIterator - Sequence iterator to use to iterate over the sequence.
Throws:
MonomeException - When the specified steps number is invalid, or when the specified pages number is invalid, or when a led state can't be initialized.

SequencerPageSwitcher


public SequencerPageSwitcher(java.lang.String name,

                             int x,

                             int y,

                             int width,

                             int height,

                             Sequencer.SequencerOrientation sequencerOrientation,

                             float tempo,

                             int divisions,

                             int stepsNumber,

                             boolean optional,

                             int pagesNumber,

                             SequenceIterator<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequenceIterator)

                      throws MonomeException
Constructs a sequencer page switcher with the specified name, specified coordinates and dimensions, the specified orientation, specified tempo and number of divisions by quarter note, the specified steps number, the specified mode for radio groups, the specified pages number and the specified sequence iterator.

Parameters:
name - Name of this sequencer page switcher.
x - X-coordinate of this sequencer page switcher in the local context of its container.
y - Y-coordinate of this sequencer page switcher in the local context of its container.
width - Width of this sequencer page switcher.
height - Height of this sequencer page switcher.
sequencerOrientation - Sequencer orientation to use with this sequencer page switcher.
tempo - Tempo, in number of quarter notes by minute.
divisions - Number of divisions by quarter note.
stepsNumber - Number of steps to use in this sequencer page switcher.
optional - Boolean that indicates if a Radio.RadioGroup or a OptionalRadio.OptionalRadioGroup is used to control the steps buttons.
pagesNumber - Number of pages to use in this sequencer page switcher.
sequenceIterator - Sequence iterator to use to iterate over the sequence.
Throws:
MonomeException - When the specified steps number is invalid, or when the specified pages number is invalid, or when a led state can't be initialized.
Since:
SkyMonome v1.2

SequencerPageSwitcher


@Deprecated

public SequencerPageSwitcher(java.lang.String name,

                                        Container container,

                                        int x,

                                        int y,

                                        int width,

                                        int height,

                                        Sequencer.SequencerOrientation sequencerOrientation,

                                        float tempo,

                                        int divisions,

                                        int stepsNumber,

                                        boolean optional,

                                        int pagesNumber,

                                        SequenceIteratorFactory<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequenceIteratorFactory)

                      throws MonomeException
Deprecated. Since SkyMonome v1.2, all components register themselves inside their container, so you don't need to specify the container by calling this constructor.

Constructs a sequencer page switcher with the specified name, specified coordinates and dimensions, the specified orientation, specified tempo and number of divisions by quarter note, the specified steps number, the specified mode for radio groups, the specified pages number, the specified sequence iterator factory and contained by the specified container.

Parameters:
name - Name of this sequencer page switcher.
container - Container that will contain this sequencer page switcher.
x - X-coordinate of this sequencer page switcher in the local context of its container.
y - Y-coordinate of this sequencer page switcher in the local context of its container.
width - Width of this sequencer page switcher.
height - Height of this sequencer page switcher.
sequencerOrientation - Sequencer orientation to use with this sequencer page switcher.
tempo - Tempo, in number of quarter notes by minute.
divisions - Number of divisions by quarter note.
stepsNumber - Number of steps to use in this sequencer page switcher.
optional - Boolean that indicates if a Radio.RadioGroup or a OptionalRadio.OptionalRadioGroup is used to control the steps buttons.
pagesNumber - Number of pages to use in this sequencer page switcher.
sequenceIteratorFactory - Factory for sequence iterator to use to iterate over the sequence.
Throws:
MonomeException - When the specified steps number is invalid, or when the specified pages number is invalid, or when a led state can't be initialized.
Since:
SkyMonome v1.1

SequencerPageSwitcher


public SequencerPageSwitcher(java.lang.String name,

                             int x,

                             int y,

                             int width,

                             int height,

                             Sequencer.SequencerOrientation sequencerOrientation,

                             float tempo,

                             int divisions,

                             int stepsNumber,

                             boolean optional,

                             int pagesNumber,

                             SequenceIteratorFactory<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequenceIteratorFactory)

                      throws MonomeException
Constructs a sequencer page switcher with the specified name, specified coordinates and dimensions, the specified orientation, specified tempo and number of divisions by quarter note, the specified steps number, the specified mode for radio groups, the specified pages number and the specified sequence iterator factory.

Parameters:
name - Name of this sequencer page switcher.
x - X-coordinate of this sequencer page switcher in the local context of its container.
y - Y-coordinate of this sequencer page switcher in the local context of its container.
width - Width of this sequencer page switcher.
height - Height of this sequencer page switcher.
sequencerOrientation - Sequencer orientation to use with this sequencer page switcher.
tempo - Tempo, in number of quarter notes by minute.
divisions - Number of divisions by quarter note.
stepsNumber - Number of steps to use in this sequencer page switcher.
optional - Boolean that indicates if a Radio.RadioGroup or a OptionalRadio.OptionalRadioGroup is used to control the steps buttons.
pagesNumber - Number of pages to use in this sequencer page switcher.
sequenceIteratorFactory - Factory for sequence iterator to use to iterate over the sequence.
Throws:
MonomeException - When the specified steps number is invalid, or when the specified pages number is invalid, or when a led state can't be initialized.
Since:
SkyMonome v1.2
Method Detail

getPages


public SequencerPageSwitcher.SequencerPage[] getPages()
Returns an array of all pages.

Returns:
An array of all pages.

getActivePage


public SequencerPageSwitcher.SequencerPage getActivePage()
Returns the currently active page.

Returns:
The currently active page.

showPage


public void showPage(SequencerPageSwitcher.SequencerPage sequencerPage)

              throws MonomeException
Sets as active the specified page. If the specified object is not contained by this sequencer page switcher, or is null, this method does nothing.

Parameters:
sequencerPage - New active page.
Throws:
MonomeException - When a led state can't be modified.

getSequencerEffectTime


public 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.

Specified by:
getSequencerEffectTime in interface Sequencer<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Returns:
The sequencer effect time, in milliseconds.
Since:
SkyMonome v1.3

setSequencerEffectTime


public 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.

Specified by:
setSequencerEffectTime in interface Sequencer<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
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


public SequencerEngine<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> getSequencerEngine()
Returns the sequencer engine that is used by this sequencer.

Specified by:
getSequencerEngine in interface Sequencer<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Returns:
The sequencer engine that is used by this sequencer.
Since:
SkyMonome v1.3

sequencingAction


public void sequencingAction(SequencerEngine<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequencerEngine)

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

Specified by:
sequencingAction in interface Sequencer<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Parameters:
sequencerEngine - Sequencer engine that called this method.
Throws:
MonomeException - When a problem occurs in the iteration over the sequence.

getActiveStepNumberInSequence


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

Specified by:
getActiveStepNumberInSequence in interface Sequencer<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Returns:
The number of the active step in the sequence.

getStepsNumberInSequence


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

Specified by:
getStepsNumberInSequence in interface Sequencer<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Returns:
The number of steps in the sequence.

getMaximumStepsNumberInSequence


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

Specified by:
getMaximumStepsNumberInSequence in interface Sequencer<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Returns:
The maximum possible number of steps in the sequence.
Since:
SkyMonome v1.1

getNotesNumberByStep


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

Specified by:
getNotesNumberByStep in interface Sequencer<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Returns:
The number of available notes by step in the sequence.
Since:
SkyMonome v1.1

setStepsNumber


public void setStepsNumber(int stepsNumber)

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

Specified by:
setStepsNumber in interface Sequencer<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Parameters:
stepsNumber - New number of steps to iterate over the sequence.
Throws:
MonomeException - When the new steps number is incorrect for this sequencer.

notify


public void notify(OSCMessageDigester messageDigester)

            throws MonomeException
Notifies this sequencer page switcher that a message comes from the Monome device.

Overrides:
notify in class AbstractGroup<SequencerPageSwitcher.SequencerPage>
Parameters:
messageDigester - Message digester that prepares and encapsulates the message for an easy access of informations contained in the message.
Throws:
MonomeException - When a problem has occured when treating the message.

writeOn


public void writeOn(Frame frame)

             throws MonomeException
Writes this sequencer page switcher on the specified frame in order to refresh the Monome device. Once this frame is completed, it is sent to the Monome device.

Overrides:
writeOn in class AbstractGroup<SequencerPageSwitcher.SequencerPage>
Parameters:
frame - Frame in which this sequencer page switcher must write its led state.
Throws:
MonomeException - When a problem has occured while getting the led state of a page inside this sequencer page switcher.
See Also:
Monome.refresh()

toString


public java.lang.String toString()
Returns a string representation of this sequencer page switcher.

Specified by:
toString in class Component
Returns:
A string representation of this sequencer page switcher.

addSequencerListener


public void addSequencerListener(SequencerListener<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequencerListener)
Adds the specified sequencer listener to the list of sequencer listeners.

Specified by:
addSequencerListener in interface SequencerComponent<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Parameters:
sequencerListener - Sequencer listener to add to the list of sequencer listeners.

removeSequencerListener


public void removeSequencerListener(SequencerListener<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequencerListener)
Removes the specified sequencer listener from the list of sequencer listeners.

Specified by:
removeSequencerListener in interface SequencerComponent<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Parameters:
sequencerListener - Sequencer listener to remove from the list of sequencer listeners.

getSequencerListeners


public SequencerListener<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>[] getSequencerListeners()
Returns an array of all sequencer listeners.

Specified by:
getSequencerListeners in interface SequencerComponent<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Returns:
An array of all sequencer listeners.

fireStepChanged


public void fireStepChanged(SequencerPageSwitcher sequencerPageSwitcher,

                            int activeStepNumber)
Invoked when a step change occurs.

Specified by:
fireStepChanged in interface SequencerComponent<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Parameters:
sequencerPageSwitcher - Sequencer page switcher that triggered the sequencer event.

getButtonManagers


@Deprecated

public <T extends ButtonManager<?>> T[] getButtonManagers(java.lang.Class<T> clazz)
Deprecated. Since it is more logical to use getButtonManagersForPage(Class,SequencerPage) to specify the page on which you want button managers.

Returns an array of all button managers of this sequencer page switcher which are contained by the currently activated page. Returned button managers are typed to the specified type.

Specified by:
getButtonManagers in interface SequencerComponent<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Type Parameters:
T - Desired type for button managers. It should be a subclass of ButtonManager.
Parameters:
clazz - Class object that specify the return type for button managers.
Returns:
An array of all button managers of this sequencer page switcher which are contained by the currently activated page.
Throws:
java.lang.ClassCastException - When button managers can't be typed to the specified type.

getButtonManagers


@Deprecated

public SequencerRadio.SequencerRadioGroup[] getButtonManagers()
Deprecated. Since it is more logical to use getButtonManagersForPage(SequencerPage) to specify the page on which you want button managers.

Returns an array of all button managers of this sequencer component. Returned button managers are typed to the type defined by the parametrization of this class.

Specified by:
getButtonManagers in interface SequencerComponent<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Returns:
An array of all button managers of this sequencer component.
Since:
SkyMonome v1.1

getButtonManagersForPage


@Deprecated

public <T extends ButtonManager<?>> T[] getButtonManagersForPage(java.lang.Class<T> clazz,

                                                                            SequencerPageSwitcher.SequencerPage page)
Deprecated. Since this class implements an interface that is parametrized, it is recommended to use getButtonManagerForPage(SequencerPage,int) instead.

Returns an array of all button managers of this sequencer page switcher which are contained by the specified page.

Type Parameters:
T - Desired type for button managers. It should be a subclass of ButtonManager.
Parameters:
clazz - Class object that specify the return type for button managers.
page - Page of interest.
Returns:
An array of all button managers of this sequencer page switcher which are contained by the specified page.
Throws:
java.lang.ClassCastException - When button managers can't be typed to the specified type.

getButtonManagersForPage


public SequencerRadio.SequencerRadioGroup[] getButtonManagersForPage(SequencerPageSwitcher.SequencerPage page)
Returns an array of all button managers of this sequencer page switcher which are contained by the specified page.

Parameters:
page - Page of interest.
Returns:
An array of all button managers of this sequencer page switcher which are contained by the specified page.
Throws:
java.lang.ClassCastException - When button managers can't be typed to the specified type.
Since:
SkyMonome v1.1

getButtonManager


@Deprecated

public <T extends ButtonManager<?>> T getButtonManager(java.lang.Class<T> clazz,

                                                                  int number)
Deprecated. Since it is more logical to use getButtonManagerForPage(Class,SequencerPage,int) to specify the page on which you want the button manager.

Returns the button manager of this sequencer page switcher at the specified step number and which is contained by the currently activated page.

Specified by:
getButtonManager in interface SequencerComponent<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Type Parameters:
T - Desired type for the button manager. It should be a subclass of ButtonManager.
Parameters:
clazz - Class object that specify the return type for the button manager.
number - Number of the button manager needed.
Returns:
The button manager of this sequencer page switcher at the specified step number which is contained by the currently activated page.
Throws:
java.lang.ClassCastException - When the button manager can't be typed to the specified type.

getButtonManager


@Deprecated

public SequencerRadio.SequencerRadioGroup getButtonManager(int number)
Deprecated. Since it is more logical to use getButtonManagerForPage(SequencerPage,int) to specify the page on which you want the button manager.

Returns the button manager of this sequencer component at the specified step number. The returned button manager is typed to the type defined by the parametrization of this class.

Specified by:
getButtonManager in interface SequencerComponent<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Parameters:
number - Number of the button manager needed.
Returns:
The button manager of this sequencer component at the specified step number.
Since:
SkyMonome v1.1

getButtonManagerForPage


@Deprecated

public <T extends ButtonManager<?>> T getButtonManagerForPage(java.lang.Class<T> clazz,

                                                                         SequencerPageSwitcher.SequencerPage page,

                                                                         int number)
Deprecated. Since this class implements an interface that is parametrized, it is recommended to use getButtonManagerForPage(SequencerPage,int) instead.

Returns the button manager of this sequencer page switcher at the specified step number and which is contained by the specified page.

Type Parameters:
T - Desired type for the button manager. It should be a subclass of ButtonManager.
Parameters:
clazz - Class object that specify the return type for the button manager.
page - Page of interest.
number - Number of the button manager needed.
Returns:
The button manager of this sequencer page switcher at the specified step number and which is contained by the specified page.
Throws:
java.lang.ClassCastException - When the button manager can't be typed to the specified type.

getButtonManagerForPage


public SequencerRadio.SequencerRadioGroup getButtonManagerForPage(SequencerPageSwitcher.SequencerPage page,

                                                                  int number)
Returns the button manager of this sequencer page switcher at the specified step number and which is contained by the specified page.

Parameters:
page - Page of interest.
number - Number of the button manager needed.
Returns:
The button manager of this sequencer page switcher at the specified step number and which is contained by the specified page.
Throws:
java.lang.ClassCastException - When the button manager can't be typed to the specified type.
Since:
SkyMonome v1.1

getSequenceIterator


public SequenceIterator<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> getSequenceIterator()
Returns the sequence iterator used by this sequencer.

Specified by:
getSequenceIterator in interface Sequencer<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Returns:
The sequence iterator used by this sequencer.
Since:
SkyMonome v1.1

setSequenceIterator


public void setSequenceIterator(SequenceIterator<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup> sequenceIterator)
Sets the sequence iterator used by this sequencer.

Specified by:
setSequenceIterator in interface Sequencer<SequencerPageSwitcher,SequencerRadio.SequencerRadioGroup>
Parameters:
sequenceIterator - New sequence iterator to use in this sequencer.
Since:
SkyMonome v1.1