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

#include <tracktion_AutomationCurve.h>

Classes

struct  AutomationPoint
 

Public Types

enum class  TimeBase { time , beats }
 

Public Member Functions

 AutomationCurve (Edit &, TimeBase)
 
 AutomationCurve (Edit &, TimeBase, const juce::ValueTree &parent, const juce::ValueTree &state)
 
 AutomationCurve (const AutomationCurve &)
 
void setState (const juce::ValueTree &)
 
void setParentState (const juce::ValueTree &)
 
void setParameterID (juce::String)
 Sets the paramID to store in the state.
 
juce::String getParameterID () const
 Returns the parameter ID set or an empty string.
 
int getNumPoints () const noexcept
 
EditDuration getDuration () const noexcept
 
AutomationPoint getPoint (int index) const noexcept
 
EditPosition getPointPosition (int index) const noexcept
 
float getPointValue (int index) const noexcept
 
float getPointCurve (int index) const noexcept
 
CurvePoint getBezierHandle (int index) const noexcept
 
CurvePoint getBezierPoint (int index) const noexcept
 
std::pair< CurvePoint, CurvePoint > getBezierEnds (int index) const
 
void getBezierEnds (int index, double &x1, float &y1, double &x2, float &y2) const noexcept
 
float getValueAt (EditPosition, float defaultValue) const
 
int indexBefore (EditPosition) const
 
int nextIndexAfter (EditPosition) const
 
void clear (juce::UndoManager *)
 
int addPoint (EditPosition, float value, float curve, juce::UndoManager *)
 
void removePoint (int index, juce::UndoManager *)
 
void removePoints (EditTimeRange, juce::UndoManager *)
 
void removePointsAndCloseGap (AutomatableParameter &, EditTimeRange, juce::UndoManager *)
 
void removeRedundantPoints (EditTimeRange, juce::UndoManager *)
 
juce::Array< AutomationPointgetPointsInRegion (EditTimeRange) const
 
int movePoint (int index, EditPosition, float newValue, std::optional< juce::Range< float > > valueLimits, bool removeInterveningPoints, juce::UndoManager *)
 
void setPointValue (int index, float newValue, juce::UndoManager *)
 
void setCurveValue (int index, float newCurve, juce::UndoManager *)
 
void rescaleAllPositions (double factor, juce::UndoManager *)
 
void rescaleValues (float factor, EditTimeRange, juce::Range< float > valueRange, juce::UndoManager *)
 
void addToValues (float valueDelta, EditTimeRange, juce::Range< float > valueRange, juce::UndoManager *)
 
void simplify (EditTimeRange, EditDuration minTimeDifference, float minValueDifference, juce::UndoManager *)
 
TimePosition getPointTime (int index) const noexcept
 
float getValueAt (TimePosition, float defaultValue) const
 
int indexBefore (TimePosition) const
 
TimeDuration getLength () const
 
int nextIndexAfter (TimePosition) const
 
int countPointsInRegion (EditTimeRange) const
 
int addPoint (TimePosition, float value, float curve, juce::UndoManager *)
 
void removePointsInRegion (TimeRange, juce::UndoManager *)
 
void removeRegionAndCloseGap (AutomatableParameter &, TimeRange, juce::UndoManager *)
 
void removeRedundantPoints (TimeRange, juce::UndoManager *)
 
juce::Array< AutomationPointgetPointsInRegion (TimeRange) const
 
void rescaleValues (float factor, TimeRange, juce::Range< float > valueRange, juce::UndoManager *)
 
void addToValues (float valueDelta, TimeRange, juce::Range< float > valueRange, juce::UndoManager *)
 
int movePoint (AutomatableParameter &, int index, TimePosition, float newValue, bool removeInterveningPoints, juce::UndoManager *)
 
void simplify (TimeRange, double minTimeDifference, float minValueDifference, juce::UndoManager *)
 
void setPointPosition (int index, EditPosition, juce::UndoManager *)
 

Static Public Member Functions

static void removeAllAutomationCurvesRecursively (const juce::ValueTree &)
 

Public Attributes

juce::CachedValue< AtomicWrapper< bool > > bypass
 If set to true, this curve is disabled, having no effect on the AutomatableParameter.
 
Edit & edit
 
const TimeBase timeBase
 
juce::ValueTree parentState
 
juce::ValueTree state
 

Member Enumeration Documentation

◆ TimeBase

Enumerator
time 
beats 

Constructor & Destructor Documentation

◆ AutomationCurve() [1/3]

engine::AutomationCurve::AutomationCurve ( Edit &  ,
TimeBase   
)

◆ AutomationCurve() [2/3]

engine::AutomationCurve::AutomationCurve ( Edit &  ,
TimeBase  ,
const juce::ValueTree &  parent,
const juce::ValueTree &  state 
)

◆ AutomationCurve() [3/3]

engine::AutomationCurve::AutomationCurve ( const AutomationCurve )

Member Function Documentation

◆ setState()

void engine::AutomationCurve::setState ( const juce::ValueTree &  )

◆ setParentState()

void engine::AutomationCurve::setParentState ( const juce::ValueTree &  )

◆ setParameterID()

void engine::AutomationCurve::setParameterID ( juce::String  )

Sets the paramID to store in the state.

◆ getParameterID()

juce::String engine::AutomationCurve::getParameterID ( ) const

Returns the parameter ID set or an empty string.

◆ getNumPoints()

int engine::AutomationCurve::getNumPoints ( ) const
noexcept

◆ getDuration()

EditDuration engine::AutomationCurve::getDuration ( ) const
noexcept

◆ getPoint()

AutomationPoint engine::AutomationCurve::getPoint ( int  index) const
noexcept

◆ getPointPosition()

EditPosition engine::AutomationCurve::getPointPosition ( int  index) const
noexcept

◆ getPointValue()

float engine::AutomationCurve::getPointValue ( int  index) const
noexcept

◆ getPointCurve()

float engine::AutomationCurve::getPointCurve ( int  index) const
noexcept

◆ getBezierHandle()

CurvePoint engine::AutomationCurve::getBezierHandle ( int  index) const
noexcept

◆ getBezierPoint()

CurvePoint engine::AutomationCurve::getBezierPoint ( int  index) const
noexcept

◆ getBezierEnds() [1/2]

std::pair< CurvePoint, CurvePoint > engine::AutomationCurve::getBezierEnds ( int  index) const

◆ getBezierEnds() [2/2]

void engine::AutomationCurve::getBezierEnds ( int  index,
double &  x1,
float &  y1,
double &  x2,
float &  y2 
) const
noexcept

◆ getValueAt() [1/2]

float engine::AutomationCurve::getValueAt ( EditPosition  ,
float  defaultValue 
) const

◆ indexBefore() [1/2]

int engine::AutomationCurve::indexBefore ( EditPosition  ) const

◆ nextIndexAfter() [1/2]

int engine::AutomationCurve::nextIndexAfter ( EditPosition  ) const

◆ clear()

void engine::AutomationCurve::clear ( juce::UndoManager *  )

◆ addPoint() [1/2]

int engine::AutomationCurve::addPoint ( EditPosition  ,
float  value,
float  curve,
juce::UndoManager *   
)

◆ removePoint()

void engine::AutomationCurve::removePoint ( int  index,
juce::UndoManager *   
)

◆ removePoints()

void engine::AutomationCurve::removePoints ( EditTimeRange  ,
juce::UndoManager *   
)

◆ removePointsAndCloseGap()

void engine::AutomationCurve::removePointsAndCloseGap ( AutomatableParameter &  ,
EditTimeRange  ,
juce::UndoManager *   
)

◆ removeRedundantPoints() [1/2]

void engine::AutomationCurve::removeRedundantPoints ( EditTimeRange  ,
juce::UndoManager *   
)

◆ getPointsInRegion() [1/2]

juce::Array< AutomationPoint > engine::AutomationCurve::getPointsInRegion ( EditTimeRange  ) const

◆ movePoint() [1/2]

int engine::AutomationCurve::movePoint ( int  index,
EditPosition  ,
float  newValue,
std::optional< juce::Range< float > >  valueLimits,
bool  removeInterveningPoints,
juce::UndoManager *   
)

◆ setPointValue()

void engine::AutomationCurve::setPointValue ( int  index,
float  newValue,
juce::UndoManager *   
)

◆ setCurveValue()

void engine::AutomationCurve::setCurveValue ( int  index,
float  newCurve,
juce::UndoManager *   
)

◆ rescaleAllPositions()

void engine::AutomationCurve::rescaleAllPositions ( double  factor,
juce::UndoManager *   
)

◆ rescaleValues() [1/2]

void engine::AutomationCurve::rescaleValues ( float  factor,
EditTimeRange  ,
juce::Range< float >  valueRange,
juce::UndoManager *   
)

◆ addToValues() [1/2]

void engine::AutomationCurve::addToValues ( float  valueDelta,
EditTimeRange  ,
juce::Range< float >  valueRange,
juce::UndoManager *   
)

◆ simplify() [1/2]

void engine::AutomationCurve::simplify ( EditTimeRange  ,
EditDuration  minTimeDifference,
float  minValueDifference,
juce::UndoManager *   
)

◆ removeAllAutomationCurvesRecursively()

static void engine::AutomationCurve::removeAllAutomationCurvesRecursively ( const juce::ValueTree &  )
static

◆ getPointTime()

TimePosition engine::AutomationCurve::getPointTime ( int  index) const
noexcept

◆ getValueAt() [2/2]

float engine::AutomationCurve::getValueAt ( TimePosition  ,
float  defaultValue 
) const

◆ indexBefore() [2/2]

int engine::AutomationCurve::indexBefore ( TimePosition  ) const

◆ getLength()

TimeDuration engine::AutomationCurve::getLength ( ) const

◆ nextIndexAfter() [2/2]

int engine::AutomationCurve::nextIndexAfter ( TimePosition  ) const

◆ countPointsInRegion()

int engine::AutomationCurve::countPointsInRegion ( EditTimeRange  ) const

◆ addPoint() [2/2]

int engine::AutomationCurve::addPoint ( TimePosition  ,
float  value,
float  curve,
juce::UndoManager *   
)

◆ removePointsInRegion()

void engine::AutomationCurve::removePointsInRegion ( TimeRange  ,
juce::UndoManager *   
)

◆ removeRegionAndCloseGap()

void engine::AutomationCurve::removeRegionAndCloseGap ( AutomatableParameter &  ,
TimeRange  ,
juce::UndoManager *   
)

◆ removeRedundantPoints() [2/2]

void engine::AutomationCurve::removeRedundantPoints ( TimeRange  ,
juce::UndoManager *   
)

◆ getPointsInRegion() [2/2]

juce::Array< AutomationPoint > engine::AutomationCurve::getPointsInRegion ( TimeRange  ) const

◆ rescaleValues() [2/2]

void engine::AutomationCurve::rescaleValues ( float  factor,
TimeRange  ,
juce::Range< float >  valueRange,
juce::UndoManager *   
)

◆ addToValues() [2/2]

void engine::AutomationCurve::addToValues ( float  valueDelta,
TimeRange  ,
juce::Range< float >  valueRange,
juce::UndoManager *   
)

◆ movePoint() [2/2]

int engine::AutomationCurve::movePoint ( AutomatableParameter &  ,
int  index,
TimePosition  ,
float  newValue,
bool  removeInterveningPoints,
juce::UndoManager *   
)

◆ simplify() [2/2]

void engine::AutomationCurve::simplify ( TimeRange  ,
double  minTimeDifference,
float  minValueDifference,
juce::UndoManager *   
)

◆ setPointPosition()

void engine::AutomationCurve::setPointPosition ( int  index,
EditPosition  ,
juce::UndoManager *   
)

Member Data Documentation

◆ bypass

juce::CachedValue<AtomicWrapper<bool> > engine::AutomationCurve::bypass

If set to true, this curve is disabled, having no effect on the AutomatableParameter.

◆ edit

Edit& engine::AutomationCurve::edit

◆ timeBase

const TimeBase engine::AutomationCurve::timeBase

◆ parentState

juce::ValueTree engine::AutomationCurve::parentState

◆ state

juce::ValueTree engine::AutomationCurve::state

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