Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
Session Class Referencefinal
Inheritance diagram for Session:
Collaboration diagram for Session:

Public Member Functions

void armAllClipsToStop (int32_t afterNumRepeats)
 
void armNextSection (int32_t oldSection, int32_t numRepetitions=-1)
 
void doLaunch (bool isFillLaunch)
 
void scheduleLaunchTiming (int64_t atTickCount, int32_t numRepeatsUntil, int32_t armedLaunchLengthForOneRepeat)
 
int32_t getNumSixteenthNotesRemainingTilLaunch ()
 
void scheduleFillEvent (Clip *clip, int64_t atTickCount)
 
void cancelAllLaunchScheduling ()
 
void launchSchedulingMightNeedCancelling ()
 
void reSyncClipToSongTicks (Clip *clip)
 
void reSyncClip (ModelStackWithTimelineCounter *modelStack, bool mustSetPosToSomething=false, bool mayResumeClip=true) override
 
void userWantsToUnsoloClip (Clip *clip, bool forceLateStart, int32_t buttonPressLatency)
 
void toggleClipStatus (Clip *clip, int32_t *clipIndex, bool doInstant, int32_t buttonPressLatency)
 
void soloClipAction (Clip *clip, int32_t buttonPressLatency)
 
void armSection (uint8_t section, int32_t buttonPressLatency)
 
void armingChanged ()
 
void userWantsToArmClipsToStartOrSolo (uint8_t section, Clip *clip, bool stopAllOtherClips, bool forceLateStart=false, bool allowLateStart=true, int32_t numRepeatsTilLaunch=1, bool allowSubdividedQuantization=true, ArmState armState=ArmState::ON_NORMAL)
 
LaunchStatus investigateSyncedLaunch (Clip *waitForClip, uint32_t *currentPosWithinQuantization, uint32_t *quantization, uint32_t longestStartingClipLength, bool allowSubdividedQuantization)
 
bool armForSongSwap ()
 
bool armForSwitchToArrangement ()
 
void armClipsToStartOrSoloWithQuantization (uint32_t pos, uint32_t quantization, uint8_t section, bool stopAllOtherClips, Clip *clip, bool forceLateStart, bool allowLateStart, int32_t numRepeatsTilLaunch, ArmState armState=ArmState::ON_NORMAL)
 
void armClipToStartOrSoloUsingQuantization (Clip *thisClip, bool doLateStart, uint32_t pos, ArmState armState=ArmState::ON_NORMAL, bool mustUnarmOtherClipsWithSameOutput=true)
 
void cancelAllArming ()
 
void armClipLowLevel (Clip *loopableToArm, ArmState armState, bool mustUnarmOtherClipsWithSameOutput=true)
 
int32_t userWantsToArmNextSection (int32_t numRepetitions=-1)
 
int32_t getCurrentSection ()
 
bool areAnyClipsArmed ()
 
void unsoloClip (Clip *clip)
 
void soloClipRightNow (ModelStackWithTimelineCounter *modelStack)
 
bool deletingClipWhichCouldBeAbandonedOverdub (Clip *clip)
 
void scheduleOverdubToStartRecording (Clip *overdub, Clip *clipAbove)
 
void justAbortedSomeLinearRecording ()
 
void setupPlayback () override
 
bool endPlayback () override
 
void doTickForward (int32_t posIncrement) override
 
void resetPlayPos (int32_t newPos, bool doingComplete=true, int32_t buttonPressLatency=0) override
 
void resyncToSongTicks (Song *song) override
 
void reversionDone () override
 
bool isOutputAvailable (Output *output) override
 
bool considerLaunchEvent (int32_t numTicksBeingIncremented) override
 
void stopOutputRecordingAtLoopEnd () override
 
int32_t getPosAtWhichClipWillCut (ModelStackWithTimelineCounter const *modelStack) override
 
bool willClipContinuePlayingAtEnd (ModelStackWithTimelineCounter const *modelStack) override
 
bool willClipLoopAtSomePoint (ModelStackWithTimelineCounter const *modelStack) override
 
bool wantsToDoTempolessRecord (int32_t newPos) override
 
- Public Member Functions inherited from PlaybackMode
bool hasPlaybackActive ()
 

Public Attributes

uint8_t lastSectionArmed
 
uint32_t timeLastSectionPlayed
 
int64_t launchEventAtSwungTickCount
 
int16_t numRepeatsTilLaunch
 
int32_t currentArmedLaunchLengthForOneRepeat
 
bool switchToArrangementAtLaunchEvent
 

Private Member Functions

bool giveClipOpportunityToBeginLinearRecording (Clip *clip, int32_t clipIndex, int32_t buttonPressLatency)
 
void armClipToStopAction (Clip *clip)
 
void cancelArmingForClip (Clip *clip, int32_t *clipIndex)
 
void armSectionWhenNeitherClockActive (ModelStack *modelStack, int32_t section, bool stopAllOtherClips)
 
void armClipsAlongWithExistingLaunching (ArmState armState, uint8_t section, Clip *clip)
 
void armClipsWithNothingToSyncTo (uint8_t section, Clip *clip)
 
void scheduleFillClip (Clip *clip)
 
void scheduleFillClips (uint8_t section)
 

Member Function Documentation

◆ considerLaunchEvent()

bool Session::considerLaunchEvent ( int32_t numTicksBeingIncremented)
overridevirtual

Reimplemented from PlaybackMode.

◆ doLaunch()

void Session::doLaunch ( bool isFillLaunch)

doLaunch

Launches / stops clips at a 'launch event'. This occurs at the end of the current loop in song mode, and additionally to launch fill clips.

Parameters
isFillLaunch- A non-fill launch acts on the arm states of all clips:
  • Regular clips that are:
    • stopping or starting
    • stopping or starting soloing
  • becoming active or inactive due to some other clip soloing
  • finishing recording

Fill clips that are still active and are armed to stop. After a regular launch, no regular clips should be armed. Fill clips can remain armed across such a launch, since if the section repeat count is > 1, or a single clip has had its repeat count incread with the select knob, the fill waits until the last repeat, whereas doLaunch is called at the end of every repeat.

A fill launch starts fill clips at the correct time, such that they finish at the next launch event. A fill launch should leave non-fill clips unaffected. Fills that launch may override other fills if they need the same synth/kit/audio output, but must not override a non-fill.

◆ doTickForward()

void Session::doTickForward ( int32_t posIncrement)
overridevirtual

Implements PlaybackMode.

◆ endPlayback()

bool Session::endPlayback ( )
overridevirtual

Implements PlaybackMode.

◆ getPosAtWhichClipWillCut()

int32_t Session::getPosAtWhichClipWillCut ( ModelStackWithTimelineCounter const * modelStack)
overridevirtual

Implements PlaybackMode.

◆ isOutputAvailable()

bool Session::isOutputAvailable ( Output * output)
overridevirtual

Implements PlaybackMode.

◆ resetPlayPos()

void Session::resetPlayPos ( int32_t newPos,
bool doingComplete = true,
int32_t buttonPressLatency = 0 )
overridevirtual

Implements PlaybackMode.

◆ reSyncClip()

void Session::reSyncClip ( ModelStackWithTimelineCounter * modelStack,
bool mustSetPosToSomething = false,
bool mayResumeClip = true )
overridevirtual

Implements PlaybackMode.

◆ resyncToSongTicks()

void Session::resyncToSongTicks ( Song * song)
overridevirtual

Implements PlaybackMode.

◆ reversionDone()

void Session::reversionDone ( )
overridevirtual

Implements PlaybackMode.

◆ scheduleFillClip()

void Session::scheduleFillClip ( Clip * clip)
private

scheduleFillClip - schedules a fill clip. It must reach its endpoint at the next launch event, ie right aligned to the usual song mode loop. If there is less time until then than the clip is long, start right now mid way through. Otherwise schedule for the correct time.

Parameters
clip- the clip to launch.

◆ scheduleFillClips()

void Session::scheduleFillClips ( uint8_t section)
private

scheduleFillClips - schedules all fill clips in a section. If a non-fill clip is already playing on the same output that we want to use, we prevent the fill from starting.

Parameters
section- the section number to launch fill clips for.

◆ setupPlayback()

void Session::setupPlayback ( )
overridevirtual

Implements PlaybackMode.

◆ stopOutputRecordingAtLoopEnd()

void Session::stopOutputRecordingAtLoopEnd ( )
overridevirtual

Implements PlaybackMode.

◆ wantsToDoTempolessRecord()

bool Session::wantsToDoTempolessRecord ( int32_t newPos)
overridevirtual

Reimplemented from PlaybackMode.

◆ willClipContinuePlayingAtEnd()

bool Session::willClipContinuePlayingAtEnd ( ModelStackWithTimelineCounter const * modelStack)
overridevirtual

Implements PlaybackMode.

◆ willClipLoopAtSomePoint()

bool Session::willClipLoopAtSomePoint ( ModelStackWithTimelineCounter const * modelStack)
overridevirtual

Implements PlaybackMode.


The documentation for this class was generated from the following files: