TracktionEngine
Loading...
Searching...
No Matches
Namespaces | Classes | Enumerations | Functions

Namespaces

namespace  detail
 
namespace  render_utils
 

Classes

struct  AutomatableParameterID
 Contains the ID of an AutomatableEditItem and the paramID. More...
 
class  AutomationCurve
 
class  AutomationCurveList
 Manages a list of AutomationCurveModifiers which can be used to control the values and modifiers of AutomatableParameters. More...
 
class  AutomationCurveModifier
 An AutomationCurveModifier contains three curves to control automation: absolute, relative and scale. More...
 
struct  AutomationCurvePlayhead
 Holds a playhead for an AutomationCurveModifier type. More...
 
class  AutomationRecordManager
 Stores automation data as it's being read in, and writes it back to the edit when recording finishes. More...
 
struct  BaseAndModValue
 Contains the base and modifier values if they are active. More...
 
struct  ClipPositionInfo
 Holds information about the position of a clip. More...
 
struct  CurvePosition
 A position of a curve in an Edit. More...
 
struct  DiscreteLabelledParameter
 
class  EditLoader
 Some useful utility functions for asyncronously loading Edits on background threads. More...
 
class  EditRenderer
 Some useful utility functions for asyncronously rendering Edits on background threads. More...
 
class  FollowActions
 
class  LaunchHandle
 A handle used to control the launching of a clip. More...
 
struct  MinBeatConstrainer
 
struct  ParameterWithStateValue
 A helper class that creates an AutomatableParameter and links it to a CachedValue, to make it easier to create and manage parameters whose values are stored as a property in a plugin's ValueTree state. More...
 
class  ReadAheadTimeStretcher
 Wraps a TimeStretcher but keeps a larger internal input and output buffer and uses a background thread to try and process frames, reducing CPU cost on real-time threads. More...
 
class  Renderer
 Lowest level render operation. More...
 
struct  ScopedThreadExitStatusEnabler
 Enables the calling thread to be cancelled from another thread and the calling thread to be able to query this. More...
 
struct  SuffixedParameter
 

Enumerations

enum class  CurveModifierType { absolute , relative , scale }
 Determines the behaviour of a curve. More...
 
enum class  AutomationMode { read , touch , latch , write }
 Determines the behaviour of writing automation. More...
 
enum class  AutomationTrigger { touch , value }
 
enum class  FollowAction {
  none , globalStop , globalReturnToArrangement , globalPlayAgain ,
  trackPrevious , trackNext , trackFirst , trackLast ,
  trackAny , trackOther , trackRoundRobin , currentGroupPrevious ,
  currentGroupNext , currentGroupFirst , currentGroupLast , currentGroupAny ,
  currentGroupOther , currentGroupRoundRobin , previousGroupFirst , previousGroupLast ,
  previousGroupAny , nextGroupFirst , nextGroupLast , nextGroupAny ,
  otherGroupFirst , otherGroupLast , otherGroupAny
}
 Determines the type of action to perform after a Clip has played for a set period. More...
 

Functions

int simplify (AutomationCurve &, int strength, EditTimeRange, juce::Range< float > valueRange, juce::UndoManager *)
 Removes points from the curve to simplify it and returns the number of points removed.
 
void mergeCurve (AutomationCurve &dest, EditTimeRange destRange, const AutomationCurve &source, EditPosition sourceStartTime, float defaultValue, EditDuration fadeLength, bool leaveOpenAtStart, bool leaveOpenEnded)
 
float getValueAt (AutomatableParameter &, EditPosition)
 Returns the value of a parameter's curve at the given position.
 
float getValueAt (AutomatableParameter &, TimePosition)
 Returns the value of a parameter's curve at the given position.
 
EditTimeRange getFullRange (const AutomationCurve &)
 Returns the range the curve occupies.
 
juce::String toString (CurveModifierType)
 Converts a CurveModifierType to a string if possible.
 
std::optional< CurveModifierTypecurveModifierTypeFromString (juce::String)
 Converts a string to a CurveModifierType if possible.
 
BaseAndModValue getValuesAtEditPosition (AutomationCurveModifier &, AutomatableParameter &, EditPosition)
 Returns the base and modifier values this AutomationCurveModifier will apply at the given position.
 
BaseAndModValue getValuesAtCurvePosition (AutomationCurveModifier &, AutomatableParameter &, EditPosition)
 Returns the base and modifier values this AutomationCurveModifier will apply at the given position.
 
BaseAndModValue getValuesAtCurvePositionUnlooped (AutomationCurveModifier &, AutomatableParameter &, EditPosition)
 Similar to getValuesAtCurvePosition but doesn't apply the looping which can be useful when drawing the curves.
 
std::optional< EditPosition > applyTimingToCurvePosition (AutomationCurveModifier &, CurveModifierType, EditPosition)
 Takes a position relative to the AutomationCurveModifier and applies the CurveTiming to it, giving a final position relative to the AutomationCurve.
 
std::optional< EditPosition > editPositionToCurvePosition (AutomationCurveModifier &, CurveModifierType, EditPosition)
 Converts a position relative to the Edit and applies the CurvePosition and CurveTiming to it, giving a final position relative to the AutomationCurve.
 
float getDefaultValue (AutomatableParameter &, CurveModifierType)
 Returns the default value used if there is no curve for the given type.
 
bool hasAnyPoints (AutomationCurveModifier &)
 Returns true if any of the curves have any points.
 
AutomatableParameter::Ptr getParameter (const AutomationCurveModifier &)
 Returns the destination parameter this curve is controlling.
 
AutomationCurveModifier::Ptr getAutomationCurveModifierForID (Edit &, EditItemID)
 Returns the AutomationCurveModifier with the given EditItemID.
 
void updateRelativeDestinationOrRemove (AutomationCurveList &, AutomationCurveModifier &, Clip &newParent)
 Looks at the destinations on the given AutomationCurveModifier and tries to re-assign parameters to corresponding parameters via the newParent Clip.
 
void assignNewIDsToAutomationCurveModifiers (Edit &, juce::ValueTree &)
 Iterates over the given tree and gives new IDs to any AutomationCurveModifier states.
 
void removeInvalidAutomationCurveModifiers (juce::ValueTree &, const AutomatableParameter &)
 Removes any assignments in the given state if they don't have the given parameter as the destination.
 
std::optional< AutomationModeautomationModeFromString (juce::String)
 Converts an AutomationMode from a string.
 
juce::String toString (AutomationMode)
 Converts an AutomationMode to string.
 
std::optional< FollowActionfollowActionFromString (juce::String)
 Converts a string to a FollowAction if possible.
 
juce::String toString (FollowAction)
 Converts a FollowAction to a string if possible.
 
std::function< void(MonotonicBeat)> createFollowAction (Clip &)
 Creates a follow action for a Clip.
 
juce::StringPairArray createAcidInfo (Edit &, TimeRange)
 Creates ACID metadata info from the Edit.
 
bool isCurrentThreadSupplyingExitStatus ()
 Returns true if the current thread has an active ScopedThreadExitStatusEnabler.
 
void signalThreadShouldExit (std::thread::id)
 Can be used to signal that the current thread is waiting to exit.
 
bool shouldCurrentThreadExit ()
 Returns true if the current thread is waiting to exit.
 

Detailed Description

Enumeration Type Documentation

◆ CurveModifierType

enum class engine::CurveModifierType
strong

Determines the behaviour of a curve.

Enumerator
absolute 
relative 
scale 

◆ AutomationMode

enum class engine::AutomationMode
strong

Determines the behaviour of writing automation.

Enumerator
read 

No writing.

touch 

Start writing on first event, punch out on gesture end.

latch 

Start writing on first event, punch out on play stop.

write 

Start writing on play start, punch out on gesture end.

◆ AutomationTrigger

enum class engine::AutomationTrigger
strong
Enumerator
touch 
value 

◆ FollowAction

enum class engine::FollowAction
strong

Determines the type of action to perform after a Clip has played for a set period.

Enumerator
none 
globalStop 
globalReturnToArrangement 
globalPlayAgain 
trackPrevious 
trackNext 
trackFirst 
trackLast 
trackAny 
trackOther 
trackRoundRobin 
currentGroupPrevious 
currentGroupNext 
currentGroupFirst 
currentGroupLast 
currentGroupAny 
currentGroupOther 
currentGroupRoundRobin 
previousGroupFirst 
previousGroupLast 
previousGroupAny 
nextGroupFirst 
nextGroupLast 
nextGroupAny 
otherGroupFirst 
otherGroupLast 
otherGroupAny 

Function Documentation

◆ simplify()

int engine::simplify ( AutomationCurve ,
int  strength,
EditTimeRange  ,
juce::Range< float >  valueRange,
juce::UndoManager *   
)

Removes points from the curve to simplify it and returns the number of points removed.

◆ mergeCurve()

void engine::mergeCurve ( AutomationCurve dest,
EditTimeRange  destRange,
const AutomationCurve source,
EditPosition  sourceStartTime,
float  defaultValue,
EditDuration  fadeLength,
bool  leaveOpenAtStart,
bool  leaveOpenEnded 
)

◆ getValueAt() [1/2]

float engine::getValueAt ( AutomatableParameter &  ,
EditPosition   
)

Returns the value of a parameter's curve at the given position.

◆ getValueAt() [2/2]

float engine::getValueAt ( AutomatableParameter &  ,
TimePosition   
)

Returns the value of a parameter's curve at the given position.

◆ getFullRange()

EditTimeRange engine::getFullRange ( const AutomationCurve )

Returns the range the curve occupies.

◆ toString() [1/3]

juce::String engine::toString ( CurveModifierType  )

Converts a CurveModifierType to a string if possible.

References toString().

Referenced by toString(), toString(), and toString().

◆ curveModifierTypeFromString()

std::optional< CurveModifierType > engine::curveModifierTypeFromString ( juce::String  )

Converts a string to a CurveModifierType if possible.

References curveModifierTypeFromString().

Referenced by curveModifierTypeFromString().

◆ getValuesAtEditPosition()

BaseAndModValue engine::getValuesAtEditPosition ( AutomationCurveModifier ,
AutomatableParameter &  ,
EditPosition   
)

Returns the base and modifier values this AutomationCurveModifier will apply at the given position.

N.B. The position is relative to the the Edit, this internally applies any CurvePosition/CurveTiming.

See also
AutomationCurveModifier::getPosition() [[ message_thread ]]

References getValuesAtEditPosition().

Referenced by getValuesAtEditPosition().

◆ getValuesAtCurvePosition()

BaseAndModValue engine::getValuesAtCurvePosition ( AutomationCurveModifier ,
AutomatableParameter &  ,
EditPosition   
)

Returns the base and modifier values this AutomationCurveModifier will apply at the given position.

N.B. The position is relative to the the AutomationCurveModifier, this internally applies any curve timing such as start/end and looping. [[ message_thread ]]

References getValuesAtCurvePosition().

Referenced by getValuesAtCurvePosition().

◆ getValuesAtCurvePositionUnlooped()

BaseAndModValue engine::getValuesAtCurvePositionUnlooped ( AutomationCurveModifier ,
AutomatableParameter &  ,
EditPosition   
)

Similar to getValuesAtCurvePosition but doesn't apply the looping which can be useful when drawing the curves.

[[ message_thread ]]

References getValuesAtCurvePositionUnlooped().

Referenced by getValuesAtCurvePositionUnlooped().

◆ applyTimingToCurvePosition()

std::optional< EditPosition > engine::applyTimingToCurvePosition ( AutomationCurveModifier ,
CurveModifierType  ,
EditPosition   
)

Takes a position relative to the AutomationCurveModifier and applies the CurveTiming to it, giving a final position relative to the AutomationCurve.

This effectively applies either the looping or start/length clipping. If the curve is in linked mode, this just returns the position unchanged.

You shouldn't normally need to use this, it's mainly for the playback graph. [[thread_safe]]

References applyTimingToCurvePosition().

Referenced by applyTimingToCurvePosition().

◆ editPositionToCurvePosition()

std::optional< EditPosition > engine::editPositionToCurvePosition ( AutomationCurveModifier ,
CurveModifierType  ,
EditPosition   
)

Converts a position relative to the Edit and applies the CurvePosition and CurveTiming to it, giving a final position relative to the AutomationCurve.

You shouldn't normally need to use this, it's mainly for the playback graph. [[thread_safe]]

References editPositionToCurvePosition().

Referenced by editPositionToCurvePosition().

◆ getDefaultValue()

float engine::getDefaultValue ( AutomatableParameter &  ,
CurveModifierType   
)

Returns the default value used if there is no curve for the given type.

References getDefaultValue().

Referenced by getDefaultValue().

◆ hasAnyPoints()

bool engine::hasAnyPoints ( AutomationCurveModifier )

Returns true if any of the curves have any points.

References hasAnyPoints().

Referenced by hasAnyPoints().

◆ getParameter()

AutomatableParameter::Ptr engine::getParameter ( const AutomationCurveModifier )

Returns the destination parameter this curve is controlling.

◆ getAutomationCurveModifierForID()

AutomationCurveModifier::Ptr engine::getAutomationCurveModifierForID ( Edit &  ,
EditItemID   
)

Returns the AutomationCurveModifier with the given EditItemID.

References getAutomationCurveModifierForID().

Referenced by getAutomationCurveModifierForID().

◆ updateRelativeDestinationOrRemove()

void engine::updateRelativeDestinationOrRemove ( AutomationCurveList ,
AutomationCurveModifier ,
Clip &  newParent 
)

Looks at the destinations on the given AutomationCurveModifier and tries to re-assign parameters to corresponding parameters via the newParent Clip.

You shouldn't need to call this manually, it's done in several key places internally.

References updateRelativeDestinationOrRemove().

Referenced by updateRelativeDestinationOrRemove().

◆ assignNewIDsToAutomationCurveModifiers()

void engine::assignNewIDsToAutomationCurveModifiers ( Edit &  ,
juce::ValueTree &   
)

Iterates over the given tree and gives new IDs to any AutomationCurveModifier states.

You shouldn't need to call this manually, it's done automatically when clips are split.

See also
split

References assignNewIDsToAutomationCurveModifiers().

Referenced by assignNewIDsToAutomationCurveModifiers().

◆ removeInvalidAutomationCurveModifiers()

void engine::removeInvalidAutomationCurveModifiers ( juce::ValueTree &  ,
const AutomatableParameter &   
)

Removes any assignments in the given state if they don't have the given parameter as the destination.

You shouldn't need to call this manually, it's used internally to clean up after copy/paste operations etc..

References removeInvalidAutomationCurveModifiers().

Referenced by removeInvalidAutomationCurveModifiers().

◆ automationModeFromString()

std::optional< AutomationMode > engine::automationModeFromString ( juce::String  )

Converts an AutomationMode from a string.

References automationModeFromString().

Referenced by automationModeFromString().

◆ toString() [2/3]

juce::String engine::toString ( AutomationMode  )

Converts an AutomationMode to string.

References toString().

◆ followActionFromString()

std::optional< FollowAction > engine::followActionFromString ( juce::String  )

Converts a string to a FollowAction if possible.

References followActionFromString().

Referenced by followActionFromString().

◆ toString() [3/3]

juce::String engine::toString ( FollowAction  )

Converts a FollowAction to a string if possible.

References toString().

◆ createFollowAction()

std::function< void(MonotonicBeat)> engine::createFollowAction ( Clip &  )

Creates a follow action for a Clip.

References createFollowAction().

Referenced by createFollowAction().

◆ createAcidInfo()

juce::StringPairArray engine::createAcidInfo ( Edit &  ,
TimeRange   
)

Creates ACID metadata info from the Edit.

References createAcidInfo().

Referenced by createAcidInfo().

◆ isCurrentThreadSupplyingExitStatus()

bool engine::isCurrentThreadSupplyingExitStatus ( )

Returns true if the current thread has an active ScopedThreadExitStatusEnabler.

References isCurrentThreadSupplyingExitStatus().

Referenced by isCurrentThreadSupplyingExitStatus().

◆ signalThreadShouldExit()

void engine::signalThreadShouldExit ( std::thread::id  )

Can be used to signal that the current thread is waiting to exit.

Only to be used in conjunction with a ScopedThreadExitStatusEnabler.

References signalThreadShouldExit().

Referenced by signalThreadShouldExit().

◆ shouldCurrentThreadExit()

bool engine::shouldCurrentThreadExit ( )

Returns true if the current thread is waiting to exit.

Only to be used in conjunction with a ScopedThreadExitStatusEnabler.

References shouldCurrentThreadExit().

Referenced by shouldCurrentThreadExit().