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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
beatChanged
(Position oldPos, Position newPos, float newPosInBeats) Called on each beat change.void
chordSymbolChanged
(CLI_ChordSymbol chordSymbol) Called on chord symbol change.void
enabledChanged
(boolean b) The enable status has changed.void
midiActivity
(long tick, int channel) Indicates some musical activity on specified channel at specified time.void
songPartChanged
(SongPart newSpt) Called on SongPart change.
-
Constructor Details
-
PlaybackListenerAdapter
public PlaybackListenerAdapter()
-
-
Method Details
-
beatChanged
Description copied from interface:PlaybackListener
Called on each beat change.- Specified by:
beatChanged
in interfacePlaybackListener
newPosInBeats
- Might be -1 when information is not available
-
midiActivity
public void midiActivity(long tick, int channel) Description copied from interface:PlaybackListener
Indicates 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:
midiActivity
in interfacePlaybackListener
- Parameters:
tick
- The approximate tick of the Midi activity. Can be -1 if no tick information available.
-
chordSymbolChanged
Description copied from interface:PlaybackListener
Called on chord symbol change.- Specified by:
chordSymbolChanged
in interfacePlaybackListener
- Parameters:
chordSymbol
- The current chord symbol with an absolute position (position within the entire song structure).
-
songPartChanged
Description copied from interface:PlaybackListener
Called on SongPart change.- Specified by:
songPartChanged
in interfacePlaybackListener
-
enabledChanged
public void enabledChanged(boolean b) Description copied from interface:PlaybackListener
The enable status has changed.- Specified by:
enabledChanged
in interfacePlaybackListener
- Parameters:
b
- If false the MusicController is not able anymore to send events, except for the midiActivity which will continue to work.
-