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 PlaybackSettingsincludePrecountTrack- If true add the precount track, and loopStartTick will depend on the PlaybackSettingsincludeControlTrack- 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 Summary
ConstructorsConstructorDescriptionCreate a default config which includes all tracks, loopCount uses PlaybackSettings, and no endOfPlaybackAction.SessionConfig(boolean includeClickTrack, boolean includePrecountTrack, boolean includeControlTrack, int loopCount, ActionListener endOfPlaybackAction) Creates an instance of aSessionConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theendOfPlaybackActionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theincludeClickTrackrecord component.booleanReturns the value of theincludeControlTrackrecord component.booleanReturns the value of theincludePrecountTrackrecord component.intReturns the value of theloopCountrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aSessionConfigrecord class.- Parameters:
includeClickTrack- the value for theincludeClickTrackrecord componentincludePrecountTrack- the value for theincludePrecountTrackrecord componentincludeControlTrack- the value for theincludeControlTrackrecord componentloopCount- the value for theloopCountrecord componentendOfPlaybackAction- the value for theendOfPlaybackActionrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
includeClickTrack
public boolean includeClickTrack()Returns the value of theincludeClickTrackrecord component.- Returns:
- the value of the
includeClickTrackrecord component
-
includePrecountTrack
public boolean includePrecountTrack()Returns the value of theincludePrecountTrackrecord component.- Returns:
- the value of the
includePrecountTrackrecord component
-
includeControlTrack
public boolean includeControlTrack()Returns the value of theincludeControlTrackrecord component.- Returns:
- the value of the
includeControlTrackrecord component
-
loopCount
-
endOfPlaybackAction
Returns the value of theendOfPlaybackActionrecord component.- Returns:
- the value of the
endOfPlaybackActionrecord component
-