|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sky.monome.event.GenericListenerWithArguments sky.monome.event.sequencer.SequencerListenerWithArguments<S,B> sky.monome.event.sequencer.NotePlayerListener<S,B>
S
- Type of sequencers that work with these note player listeners.B
- Type of button managers that are used by sequencer components that work with these note player listeners.public abstract class NotePlayerListener<S extends Sequencer<S,B>,B extends ButtonManager<B>>
Note player listener. This is a special implementation of the SequencerListener
interface that is specialized in scale playing. Implementations of this abstract class can play notes via Midi or any other medium.
Nested Class Summary | |
---|---|
static class |
NotePlayerListener.PlayerMode
Player mode used by note player listeners. |
Field Summary |
---|
Fields inherited from class sky.monome.event.GenericListenerWithArguments |
---|
arguments |
Constructor Summary | |
---|---|
NotePlayerListener(Scale scale,
MidiNote baseNote,
S sequencer,
NotePlayerListener.PlayerMode playerMode,
java.lang.Object... arguments)
Constructs a note player listener with the specified scale, the specified base note, the specified sequencer, the specified player mode, and specified arguments. |
Method Summary | |
---|---|
MidiNote |
getBaseNote()
Returns the base note of the played scale. |
NotePlayerListener.PlayerMode |
getPlayerMode()
Returns the player mode used by this note player listener. |
Scale |
getScale()
Returns the scale played by this note player listener. |
S |
getSequencer()
Returns the sequencer that triggers note playings. |
abstract void |
playNote(MidiNote midiNote)
Plays the specified note. |
void |
setBaseNote(MidiNote baseNote)
Sets the base note of the played scale. |
void |
setPlayerMode(NotePlayerListener.PlayerMode playerMode)
Sets the player mode to use in this note player listener. |
void |
setScale(Scale scale)
Sets the scale to be played by this note player listener. |
void |
setSequencer(S sequencer)
Sets the sequencer that triggers note playings. |
void |
stepChanged(SequencerEvent<S,B> sequencerEvent)
Invoked when a step changing occurs. |
Methods inherited from class sky.monome.event.GenericListenerWithArguments |
---|
getArgument, getArgument, getArguments |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NotePlayerListener(Scale scale, MidiNote baseNote, S sequencer, NotePlayerListener.PlayerMode playerMode, java.lang.Object... arguments)
scale
- Scale to be played.baseNote
- Note which is the first note of the scale.sequencer
- Sequencer which triggers note playings.playerMode
- Player mode used by this note player listener.arguments
- Arguments which can be used in the playNote(MidiNote)
method.
These arguments are optional. The presence of these arguments is due to this class which extends
SeqencerListenerWithArguments
.Method Detail |
---|
public MidiNote getBaseNote()
public void setBaseNote(MidiNote baseNote)
baseNote
- New base note for the scale to be played.public NotePlayerListener.PlayerMode getPlayerMode()
public void setPlayerMode(NotePlayerListener.PlayerMode playerMode)
playerMode
- New player mode to use.public Scale getScale()
public void setScale(Scale scale)
scale
- New scale to be played.public S getSequencer()
public void setSequencer(S sequencer)
sequencer
- New sequencer that triggers note playings.public void stepChanged(SequencerEvent<S,B> sequencerEvent)
playNote(MidiNote)
method.
sequencerEvent
- Informations about the sequencer event.public abstract void playNote(MidiNote midiNote)
midiNote
- Midi note to play.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |