Class BaseSongSession

java.lang.Object
org.jjazz.musiccontrol.api.playbacksession.BaseSongSession
All Implemented Interfaces:
PropertyChangeListener, EventListener, ControlTrackProvider, EndOfPlaybackActionProvider, PlaybackSession, SongContextProvider
Direct Known Subclasses:
StaticSongSession, UpdateProviderSongSession

A base implementation of a PlaybackSession to render a SongContext.

Music generation uses the SongSequenceBuilder (and optionnaly ActiveSongBackgroundMusicBuilder) then adds control/click/precount tracks, taking into account drums rerouting.

Once generated the session listens to the following changes:
- Song tempo, song closing
- MidiMix channel mute changes
- PlaybackSettings Click and Loop changes

The session never makes the session dirty. Use the provided subclasses for more advanced behaviors, e.g. update the dirty state, etc.

  • Field Details

    • PLAYBACK_SETTINGS_LOOP_COUNT

      public static final int PLAYBACK_SETTINGS_LOOP_COUNT
      See Also:
  • Constructor Details

    • BaseSongSession

      public BaseSongSession(SongContext sgContext, boolean enablePlaybackTransposition, boolean enableClickTrack, boolean enablePrecountTrack, boolean enableControlTrack, int loopCount, ActionListener endOfPlaybackAction, boolean useActiveSongBackgroundMusicBuilder)
      Create a session with the specified parameters.

      Parameters:
      sgContext -
      enablePlaybackTransposition -
      enableClickTrack -
      enablePrecountTrack -
      enableControlTrack -
      loopCount -
      endOfPlaybackAction -
      useActiveSongBackgroundMusicBuilder - If true use ActiveSongBackgroundMusicBuilder when possible to speed up music generation
  • Method Details