Class PlaybackListenerAdapter

java.lang.Object
org.jjazz.musiccontrol.api.PlaybackListenerAdapter
All Implemented Interfaces:
PlaybackListener

public class PlaybackListenerAdapter extends Object implements PlaybackListener
Convenience class.

Note that methods are called on the Swing Event Dispatching Thread. Event handling must be time-efficient.

  • Constructor Details

    • PlaybackListenerAdapter

      public PlaybackListenerAdapter()
  • Method Details

    • beatChanged

      public void beatChanged(Position oldPos, Position newPos, float newPosInBeats)
      Description copied from interface: PlaybackListener
      Called on each beat change.
      Specified by:
      beatChanged in interface PlaybackListener
      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 interface PlaybackListener
      Parameters:
      tick - The approximate tick of the Midi activity. Can be -1 if no tick information available.
    • chordSymbolChanged

      public void chordSymbolChanged(CLI_ChordSymbol chordSymbol)
      Description copied from interface: PlaybackListener
      Called on chord symbol change.
      Specified by:
      chordSymbolChanged in interface PlaybackListener
      Parameters:
      chordSymbol - The current chord symbol with an absolute position (position within the entire song structure).
    • songPartChanged

      public void songPartChanged(SongPart newSpt)
      Description copied from interface: PlaybackListener
      Called on SongPart change.
      Specified by:
      songPartChanged in interface PlaybackListener
    • enabledChanged

      public void enabledChanged(boolean b)
      Description copied from interface: PlaybackListener
      The enable status has changed.
      Specified by:
      enabledChanged in interface PlaybackListener
      Parameters:
      b - If false the MusicController is not able anymore to send events, except for the midiActivity which will continue to work.