Package org.jjazz.musiccontrol.api
Class PlaybackListenerAdapter
java.lang.Object
org.jjazz.musiccontrol.api.PlaybackListenerAdapter
- All Implemented Interfaces:
PlaybackListener
Convenience class.
Note that methods are called on the Swing Event Dispatching Thread. Event handling must be time-efficient.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeatChanged(Position oldPos, Position newPos, float newPosInBeats) Called on each beat change.voidchordSymbolChanged(CLI_ChordSymbol chordSymbol) Called on chord symbol change.voidenabledChanged(boolean b) The enable status has changed.voidmidiActivity(long tick, int channel) Indicates some musical activity on specified channel at specified time.voidsongPartChanged(SongPart newSpt) Called on SongPart change.
-
Constructor Details
-
PlaybackListenerAdapter
public PlaybackListenerAdapter()
-
-
Method Details
-
beatChanged
Description copied from interface:PlaybackListenerCalled on each beat change.- Specified by:
beatChangedin interfacePlaybackListenernewPosInBeats- Might be -1 when information is not available
-
midiActivity
public void midiActivity(long tick, int channel) Description copied from interface:PlaybackListenerIndicates some musical activity on specified channel at specified time.Should be used only for non-accurate "musical activity " indicators : if several notes are played in a brief period time, only one event will be fired.
- Specified by:
midiActivityin interfacePlaybackListener- Parameters:
tick- The approximate tick of the Midi activity. Can be -1 if no tick information available.
-
chordSymbolChanged
Description copied from interface:PlaybackListenerCalled on chord symbol change.- Specified by:
chordSymbolChangedin interfacePlaybackListener- Parameters:
chordSymbol- The current chord symbol with an absolute position (position within the entire song structure).
-
songPartChanged
Description copied from interface:PlaybackListenerCalled on SongPart change.- Specified by:
songPartChangedin interfacePlaybackListener
-
enabledChanged
public void enabledChanged(boolean b) Description copied from interface:PlaybackListenerThe enable status has changed.- Specified by:
enabledChangedin interfacePlaybackListener- Parameters:
b- If false the MusicController is not able anymore to send events, except for the midiActivity which will continue to work.
-