sky.monome.event.sequencer
Class SequencerEvent<S extends SequencerComponent<S,B>,B extends ButtonManager<B>>


java.lang.Object

  extended by java.util.EventObject

      extended by sky.monome.event.GenericEvent<S>

          extended by sky.monome.event.sequencer.SequencerEvent<S,B>

Type Parameters:
S - Type of sequencer components that use these sequencer events.
B - Type of button managers that are used by sequencer components that use these sequencer events.
All Implemented Interfaces:
java.io.Serializable

public class SequencerEvent<S extends SequencerComponent<S,B>,B extends ButtonManager<B>>
extends GenericEvent<S>

Sequencer event's information object. Sequencer events are triggered by SequencerComponent objects.

Author:
PJ Skyman
See Also:
Serialized Form

Field Summary
protected  int activeNote
          Note currently activated by the sequencer.
protected  int activeStepNumber
          Number of the currently active step.
 
Fields inherited from class sky.monome.event.GenericEvent
when
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SequencerEvent(long when, S source, int activeStepNumber, int activeNote)
          Constructs a sequencer event with the specified time, source, active step number and active note.
 
Method Summary
 int getActiveNote()
          Returns the note currently activated by the sequencer.
 int getActiveStepNumber()
          Returns the number of the currently active step.
 
Methods inherited from class sky.monome.event.GenericEvent
getSource2, getWhen
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

activeStepNumber


protected final int activeStepNumber
Number of the currently active step.


activeNote


protected final int activeNote
Note currently activated by the sequencer.

Constructor Detail

SequencerEvent


public SequencerEvent(long when,

                      S source,

                      int activeStepNumber,

                      int activeNote)
Constructs a sequencer event with the specified time, source, active step number and active note.

Parameters:
when - Time of this event, in milliseconds since the time zero in the Unix world.
source - Source of this event. SequencerComponent objects are sources for sequencer events.
activeStepNumber - Number of the currently active step.
activeNote - Note currently activated by the sequencer. This value is the index of the note. First is 0.
Method Detail

getActiveStepNumber


public int getActiveStepNumber()
Returns the number of the currently active step.

Returns:
The number of the currently active step.

getActiveNote


public int getActiveNote()
Returns the note currently activated by the sequencer. This value is the index of the note. First is 0.

Returns:
The note currently activated by the sequencer.