TracktionEngine
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
engine::AutomationCurveModifier Class Reference

An AutomationCurveModifier contains three curves to control automation: absolute, relative and scale. More...

#include <tracktion_AutomationCurveList.h>

Inherits juce::ReferenceCountedObject, EditItem, Selectable, AutomatableParameter::ModifierSource, and juce::ValueTree::Listener.

Classes

class  Assignment
 
struct  CurveInfo
 Holds the curve and limits of a curve type. More...
 
struct  CurveTiming
 Holds the timing properties of a curve. More...
 
struct  Listener
 Listener interface. More...
 

Public Types

using Ptr = juce::ReferenceCountedObjectPtr< AutomationCurveModifier >
 
using Array = juce::ReferenceCountedArray< AutomationCurveModifier >
 

Public Member Functions

 AutomationCurveModifier (Edit &, const juce::ValueTree &, AutomatableParameterID destID, std::function< CurvePosition()> getCurvePositionDelegate, std::function< ClipPositionInfo()> getClipPositionDelegate)
 Constructs an AutomationCurveModifier for a given state and destination.
 
 ~AutomationCurveModifier () override
 Destructor.
 
AutomatableParameterID getDestID () const
 The ID of the AutomatableParameter this curve is modifying.
 
bool setDestination (AutomatableEditItem &)
 Re-assigns this to a new destination.
 
CurveTiminggetCurveTiming (CurveModifierType)
 Returns the timing properties for a curve type.
 
CurveInfo getCurve (CurveModifierType)
 Returns the CurveInfo for a given curve type.
 
CurvePosition getPosition () const
 Returns the position this curve occupies.
 
ClipPositionInfo getClipPositionInfo () const
 Returns the position info of the owning clip.
 
void remove ()
 Remove/deletes this curve from its parent list.
 
std::shared_ptr< AutomationCurvePlayheadgetPlayhead (CurveModifierType)
 Returns a playhead for the automation curve.
 
void addListener (Listener &)
 Adds a listener.
 
void removeListener (Listener &)
 Removes a previously added listener.
 
juce::String getName () const override
 
juce::String getSelectableDescription () override
 
void setPositionDelegate (std::function< CurvePosition()>)
 

Public Attributes

juce::ValueTree state
 

Detailed Description

An AutomationCurveModifier contains three curves to control automation: absolute, relative and scale.

The first sets the base value of a parameter and the latter two the modifier value. Each curve has independent timing information so complex patterns can be set up with multiple curves looping at different intervals.

Member Typedef Documentation

◆ Ptr

◆ Array

Constructor & Destructor Documentation

◆ AutomationCurveModifier()

engine::AutomationCurveModifier::AutomationCurveModifier ( Edit &  ,
const juce::ValueTree &  ,
AutomatableParameterID  destID,
std::function< CurvePosition()>  getCurvePositionDelegate,
std::function< ClipPositionInfo()>  getClipPositionDelegate 
)

Constructs an AutomationCurveModifier for a given state and destination.

Don't construct one of these directly use AutomationCurveList::addCurve

See also
AutomationCurveList for a detailed description of the delegates.

◆ ~AutomationCurveModifier()

engine::AutomationCurveModifier::~AutomationCurveModifier ( )
override

Destructor.

Member Function Documentation

◆ getDestID()

AutomatableParameterID engine::AutomationCurveModifier::getDestID ( ) const

The ID of the AutomatableParameter this curve is modifying.

◆ setDestination()

bool engine::AutomationCurveModifier::setDestination ( AutomatableEditItem &  )

Re-assigns this to a new destination.

The paramID has to be the same (as curve ranges etc. won't apply otherwise). N.B. There are limitations to what parameters can be assigned to (such as if they're on the same track etc.) so this returns false if the assignment couldn't be made.

◆ getCurveTiming()

CurveTiming & engine::AutomationCurveModifier::getCurveTiming ( CurveModifierType  )

Returns the timing properties for a curve type.

◆ getCurve()

CurveInfo engine::AutomationCurveModifier::getCurve ( CurveModifierType  )

Returns the CurveInfo for a given curve type.

◆ getPosition()

CurvePosition engine::AutomationCurveModifier::getPosition ( ) const

Returns the position this curve occupies.

N.B. This is dynamic and is usually determined by an owning clip position or launched clip start time. If you're drawing the curve, you should use the raw times of the curve points.

In linked mode, this generally relates to the clip's position. In unlinked/free mode the loop and start/length and loop start/length determine the curve's position.

◆ getClipPositionInfo()

ClipPositionInfo engine::AutomationCurveModifier::getClipPositionInfo ( ) const

Returns the position info of the owning clip.

I.e. the offset and loop properties. These are used in "linked" mode to determine how the curve playhead loops.

◆ remove()

void engine::AutomationCurveModifier::remove ( )

Remove/deletes this curve from its parent list.

◆ getPlayhead()

std::shared_ptr< AutomationCurvePlayhead > engine::AutomationCurveModifier::getPlayhead ( CurveModifierType  )

Returns a playhead for the automation curve.

◆ addListener()

void engine::AutomationCurveModifier::addListener ( Listener )

Adds a listener.

◆ removeListener()

void engine::AutomationCurveModifier::removeListener ( Listener )

Removes a previously added listener.

◆ getName()

juce::String engine::AutomationCurveModifier::getName ( ) const
override

◆ getSelectableDescription()

juce::String engine::AutomationCurveModifier::getSelectableDescription ( )
override

◆ setPositionDelegate()

void engine::AutomationCurveModifier::setPositionDelegate ( std::function< CurvePosition()>  )

Member Data Documentation

◆ state

juce::ValueTree engine::AutomationCurveModifier::state

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