Interface ActiveSongBackgroundMusicBuilder


public interface ActiveSongBackgroundMusicBuilder
A service provider which provides the musical phrases of the active song, which are built in a background task.

  • Method Details

    • getDefault

      static ActiveSongBackgroundMusicBuilder getDefault()
      Get the default implementation.
      Returns:
      Can't be null
    • addChangeListener

      void addChangeListener(ChangeListener listener)
      Register a listener to be notified each time a new result is available.
      Parameters:
      listener -
      See Also:
    • getLastResult

      Get the last music generation result available.

      Returns:
      Can be null.
    • getSong

      Song getSong()
      Get the active song for this ActiveSongMusicBuilder.
      Returns:
      Can be null
    • isDirectlyGeneratingMusic

      boolean isDirectlyGeneratingMusic()
      Check if ActiveSongMusicBuilder is directly being generating music that will produce a new Result.
      Returns:
      True if song is not playing and music is being generated because there was a song change.
    • isEnabled

      boolean isEnabled()
      Get state (true by default).
      Returns:
    • removeChangeListener

      void removeChangeListener(ChangeListener listener)
    • setEnabled

      void setEnabled(boolean b)
      Change the ActiveSongMusicBuilder state.

      When disabled the ActiveSongMusicBuilder does nothing. Convenient for debugging in specific cases.

      Parameters:
      b -