Interface PlaybackListener

All Known Implementing Classes:
PlaybackListenerAdapter

public interface PlaybackListener
Listener of events occuring during song playback.

MusicController will fire the events taking into account the user-defined output synth latency. Events are fired by the MusicController on the Event Dispatching Thread. Event handling must be time-efficient.

  • Method Details

    • enabledChanged

      void enabledChanged(boolean b)
      The enable status has changed.
      Parameters:
      b - If false the MusicController is not able anymore to send events, except for the midiActivity which will continue to work.
    • beatChanged

      void beatChanged(Position oldPos, Position newPos, float newPosInBeats)
      Called on each beat change.
      Parameters:
      oldPos -
      newPos -
      newPosInBeats - Might be -1 when information is not available
    • chordSymbolChanged

      void chordSymbolChanged(CLI_ChordSymbol chordSymbol)
      Called on chord symbol change.
      Parameters:
      chordSymbol - The current chord symbol with an absolute position (position within the entire song structure).
    • songPartChanged

      void songPartChanged(SongPart spt)
      Called on SongPart change.
      Parameters:
      spt -
    • midiActivity

      void midiActivity(long tick, int channel)
      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.

      Parameters:
      tick - The approximate tick of the Midi activity. Can be -1 if no tick information available.
      channel -