Record Class SessionConfig

java.lang.Object
java.lang.Record
org.jjazz.musiccontrol.api.playbacksession.SessionConfig
Record Components:
includeClickTrack - If true add the click track, and its muted/unmuted state will depend on the PlaybackSettings
includePrecountTrack - If true add the precount track, and loopStartTick will depend on the PlaybackSettings
includeControlTrack - if true add a control track (beat positions + chord symbol markers)
loopCount - See Sequencer.setLoopCount(). Use PLAYBACK_SETTINGS_LOOP_COUNT to rely on the PlaybackSettings instance value.
endOfPlaybackAction - Action executed when playback is stopped. Can be null.

public record SessionConfig(boolean includeClickTrack, boolean includePrecountTrack, boolean includeControlTrack, int loopCount, ActionListener endOfPlaybackAction) extends Record
Base configuration parameters of PlaybackSession implementations.
  • Constructor Details

    • SessionConfig

      public SessionConfig()
      Create a default config which includes all tracks, loopCount uses PlaybackSettings, and no endOfPlaybackAction.
    • SessionConfig

      public SessionConfig(boolean includeClickTrack, boolean includePrecountTrack, boolean includeControlTrack, int loopCount, ActionListener endOfPlaybackAction)
      Creates an instance of a SessionConfig record class.
      Parameters:
      includeClickTrack - the value for the includeClickTrack record component
      includePrecountTrack - the value for the includePrecountTrack record component
      includeControlTrack - the value for the includeControlTrack record component
      loopCount - the value for the loopCount record component
      endOfPlaybackAction - the value for the endOfPlaybackAction record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • includeClickTrack

      public boolean includeClickTrack()
      Returns the value of the includeClickTrack record component.
      Returns:
      the value of the includeClickTrack record component
    • includePrecountTrack

      public boolean includePrecountTrack()
      Returns the value of the includePrecountTrack record component.
      Returns:
      the value of the includePrecountTrack record component
    • includeControlTrack

      public boolean includeControlTrack()
      Returns the value of the includeControlTrack record component.
      Returns:
      the value of the includeControlTrack record component
    • loopCount

      public int loopCount()
      Returns the value of the loopCount record component.
      Returns:
      the value of the loopCount record component
    • endOfPlaybackAction

      public ActionListener endOfPlaybackAction()
      Returns the value of the endOfPlaybackAction record component.
      Returns:
      the value of the endOfPlaybackAction record component