sky.monome
Class MultiSequencerGroup

java.lang.Object
  extended by sky.monome.Component
      extended by sky.monome.Container
          extended by sky.monome.AbstractGroup<MultiSequencerGroup.SpecificSequencerGroup>
              extended by sky.monome.MultiSequencerGroup

public class MultiSequencerGroup
extends AbstractGroup<MultiSequencerGroup.SpecificSequencerGroup>

Group of parallel sequencers.

Author:
PJ Skyman

Nested Class Summary
protected  class MultiSequencerGroup.SpecificSequencerEngine
          Specific sequencer engine.
 class MultiSequencerGroup.SpecificSequencerGroup
          Specific sequencer group.
 
Field Summary
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  Sequencer.SequencerOrientation sequencerOrientation
          Sequencer orientation.
protected  MultiSequencerGroup.SpecificSequencerEngine specificSequencerEngine
          Specific sequencer engine.
 
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
 
Constructor Summary
MultiSequencerGroup(java.lang.String name, Container container, int x, int y, int width, int height, Sequencer.SequencerOrientation sequencerOrientation, float tempo, int divisions, java.lang.Class<? extends SequenceIterator<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>> sequenceIteratorClass)
          Deprecated. Since SkyMonome v1.1, it is preferred to use the MultiSequencerGroup(String,Container,int,int,int,int,SequencerOrientation,float,int,SequenceIteratorFactory) constructor instead of this one.
MultiSequencerGroup(java.lang.String name, Container container, int x, int y, int width, int height, Sequencer.SequencerOrientation sequencerOrientation, float tempo, int divisions, SequenceIteratorFactory<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> 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.
MultiSequencerGroup(java.lang.String name, int x, int y, int width, int height, Sequencer.SequencerOrientation sequencerOrientation, float tempo, int divisions, SequenceIteratorFactory<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequenceIteratorFactory)
          Constructs a multisequencer group with the specified name, specified coordinates and dimensions, the specified orientation, specified tempo and number of divisions by quarter note and the specified sequence iterator factory.
 
Method Summary
 MultiSequencerGroup.SpecificSequencerGroup getSequencer(int index)
          Returns the sequencer at the specified index.
 long getSequencerEffectTime()
          Returns the sequencer effect time, in milliseconds.
 SequencerEngine<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> getSequencerEngine()
          Returns the sequencer engine that is used by all sequencers of this group.
 MultiSequencerGroup.SpecificSequencerGroup[] getSequencers()
          Returns an array of all sequencers.
 void setSequencerEffectTime(long sequencerEffectTime)
          Modifies the sequencer effect time, in milliseconds.
 java.lang.String toString()
          Returns a string representation of this multisequencer 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

specificSequencerEngine

protected final MultiSequencerGroup.SpecificSequencerEngine specificSequencerEngine
Specific sequencer engine.


sequencerOrientation

protected final Sequencer.SequencerOrientation sequencerOrientation
Sequencer orientation.


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). Due to optimization, all internal sequencer groups and the sequencer engine share the same value for this parameter.

Since:
SkyMonome v1.3
Constructor Detail

MultiSequencerGroup

@Deprecated
public MultiSequencerGroup(java.lang.String name,
                                      Container container,
                                      int x,
                                      int y,
                                      int width,
                                      int height,
                                      Sequencer.SequencerOrientation sequencerOrientation,
                                      float tempo,
                                      int divisions,
                                      java.lang.Class<? extends SequenceIterator<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup>> sequenceIteratorClass)
                    throws MonomeException
Deprecated. Since SkyMonome v1.1, it is preferred to use the MultiSequencerGroup(String,Container,int,int,int,int,SequencerOrientation,float,int,SequenceIteratorFactory) constructor instead of this one.

Constructs a multisequencer group with the specified name, specified coordinates and dimensions, the specified orientation, specified tempo and number of divisions by quarter note, the specified class of sequence iterator and contained by the specified container.

Parameters:
name - Name of this multisequencer group.
container - Container that will contain this multisequencer group.
x - X-coordinate of this multisequencer group in the local context of its container.
y - Y-coordinate of this multisequencer group in the local context of its container.
width - Width of this multisequencer group.
height - Height of this multisequencer group.
sequencerOrientation - Sequencer orientation to use with this multisequencer group.
tempo - Tempo, in number of quarter notes by minute.
divisions - Number of divisions by quarter note.
sequenceIteratorClass - Type of sequence iterator to use when creating internal sequencers.
Throws:
MonomeException - When internal sequence iterators can't be created.

MultiSequencerGroup

@Deprecated
public MultiSequencerGroup(java.lang.String name,
                                      Container container,
                                      int x,
                                      int y,
                                      int width,
                                      int height,
                                      Sequencer.SequencerOrientation sequencerOrientation,
                                      float tempo,
                                      int divisions,
                                      SequenceIteratorFactory<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> 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 multisequencer group with the specified name, specified coordinates and dimensions, the specified orientation, specified tempo and number of divisions by quarter note, the specified sequence iterator factory and contained by the specified container.

Parameters:
name - Name of this multisequencer group.
container - Container that will contain this multisequencer group.
x - X-coordinate of this multisequencer group in the local context of its container.
y - Y-coordinate of this multisequencer group in the local context of its container.
width - Width of this multisequencer group.
height - Height of this multisequencer group.
sequencerOrientation - Sequencer orientation to use with this multisequencer group.
tempo - Tempo, in number of quarter notes by minute.
divisions - Number of divisions by quarter note.
sequenceIteratorFactory - Factory for sequence iterators to use when creating internal sequencers.
Throws:
MonomeException - When internal sequence iterators can't be created.
Since:
SkyMonome v1.1

MultiSequencerGroup

public MultiSequencerGroup(java.lang.String name,
                           int x,
                           int y,
                           int width,
                           int height,
                           Sequencer.SequencerOrientation sequencerOrientation,
                           float tempo,
                           int divisions,
                           SequenceIteratorFactory<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> sequenceIteratorFactory)
                    throws MonomeException
Constructs a multisequencer group with the specified name, specified coordinates and dimensions, the specified orientation, specified tempo and number of divisions by quarter note and the specified sequence iterator factory.

Parameters:
name - Name of this multisequencer group.
x - X-coordinate of this multisequencer group in the local context of its container.
y - Y-coordinate of this multisequencer group in the local context of its container.
width - Width of this multisequencer group.
height - Height of this multisequencer group.
sequencerOrientation - Sequencer orientation to use with this multisequencer group.
tempo - Tempo, in number of quarter notes by minute.
divisions - Number of divisions by quarter note.
sequenceIteratorFactory - Factory for sequence iterators to use when creating internal sequencers.
Throws:
MonomeException - When internal sequence iterators can't be created.
Since:
SkyMonome v1.2
Method Detail

getSequencerEngine

public SequencerEngine<MultiSequencerGroup.SpecificSequencerGroup,OptionalRadio.OptionalRadioGroup> getSequencerEngine()
Returns the sequencer engine that is used by all sequencers of this group.

Returns:
The sequencer engine that is used by all sequencers of this group.
Since:
SkyMonome v1.3

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.

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.

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

getSequencer

public MultiSequencerGroup.SpecificSequencerGroup getSequencer(int index)
Returns the sequencer at the specified index.

Parameters:
index - Index of the sequencer needed.
Returns:
The sequencer at the specified index.

getSequencers

public MultiSequencerGroup.SpecificSequencerGroup[] getSequencers()
Returns an array of all sequencers.

Returns:
An array of all sequencers.

toString

public java.lang.String toString()
Returns a string representation of this multisequencer group.

Specified by:
toString in class Component
Returns:
A string representation of this multisequencer group.