TracktionEngine
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tracktion::engine::AutomationCurve Class Reference

Classes

struct  AutomationPoint
 

Public Member Functions

 AutomationCurve ()
 
 AutomationCurve (const juce::ValueTree &parent, const juce::ValueTree &state)
 
 AutomationCurve (const AutomationCurve &)
 
 ~AutomationCurve ()
 
void setState (const juce::ValueTree &)
 
void setParentState (const juce::ValueTree &)
 
void setOwnerParameter (AutomatableParameter *)
 
AutomatableParametergetOwnerParameter () const noexcept
 
int getNumPoints () const noexcept
 
TimeDuration getLength () const
 
juce::Range< float > getValueLimits () const
 
AutomationPoint getPoint (int index) const noexcept
 
TimePosition getPointTime (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
 
void getBezierEnds (int index, double &x1, float &y1, double &x2, float &y2) const noexcept
 
float getValueAt (TimePosition) const
 
int indexBefore (TimePosition) const
 
int nextIndexAfter (TimePosition) const
 
int getNearestPoint (TimePosition &, float &v, double xToYRatio) const
 
int countPointsInRegion (TimeRange) const
 
void clear ()
 
int addPoint (TimePosition, float value, float curve)
 
void removePoint (int index)
 
void removePointsInRegion (TimeRange)
 
void removeRegionAndCloseGap (TimeRange)
 
void removeRedundantPoints (TimeRange)
 
juce::Array< AutomationPointgetPointsInRegion (TimeRange) const
 
int movePoint (int index, TimePosition, float newValue, bool removeInterveningPoints)
 
void setPointTime (int index, TimePosition)
 
void setPointValue (int index, float newValue)
 
void setCurveValue (int index, float newCurve)
 
void mergeOtherCurve (const AutomationCurve &source, TimeRange destRange, TimePosition sourceStartTime, TimeDuration fadeLength, bool leaveOpenAtStart, bool leaveOpenEnded)
 
void simplify (TimeRange, double minTimeDifference, float minValueDifference)
 
void rescaleAllTimes (double factor)
 
void addToAllTimes (TimeDuration delta)
 
void rescaleValues (float factor, TimeRange)
 
void addToValues (float valueDelta, TimeRange)
 

Static Public Member Functions

static double getBezierXfromT (double t, double x1, double xb, double x2)
 
static float getBezierYFromX (double t, double x1, float y1, double xb, float yb, double x2, float y2)
 
static void removeAllAutomationCurvesRecursively (const juce::ValueTree &)
 

Public Attributes

juce::ValueTree parentState
 
juce::ValueTree state
 

Constructor & Destructor Documentation

◆ AutomationCurve() [1/3]

tracktion::engine::AutomationCurve::AutomationCurve ( )

◆ AutomationCurve() [2/3]

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

◆ AutomationCurve() [3/3]

tracktion::engine::AutomationCurve::AutomationCurve ( const AutomationCurve )

◆ ~AutomationCurve()

tracktion::engine::AutomationCurve::~AutomationCurve ( )

Member Function Documentation

◆ setState()

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

◆ setParentState()

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

◆ setOwnerParameter()

void tracktion::engine::AutomationCurve::setOwnerParameter ( AutomatableParameter )

◆ getOwnerParameter()

AutomatableParameter* tracktion::engine::AutomationCurve::getOwnerParameter ( ) const
noexcept

◆ getNumPoints()

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

◆ getLength()

TimeDuration tracktion::engine::AutomationCurve::getLength ( ) const

◆ getValueLimits()

juce::Range<float> tracktion::engine::AutomationCurve::getValueLimits ( ) const

◆ getPoint()

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

◆ getPointTime()

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

◆ getPointValue()

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

◆ getPointCurve()

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

◆ getBezierHandle()

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

◆ getBezierPoint()

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

◆ getBezierEnds()

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

◆ getValueAt()

float tracktion::engine::AutomationCurve::getValueAt ( TimePosition  ) const

◆ indexBefore()

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

◆ nextIndexAfter()

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

◆ getNearestPoint()

int tracktion::engine::AutomationCurve::getNearestPoint ( TimePosition &  ,
float &  v,
double  xToYRatio 
) const

◆ countPointsInRegion()

int tracktion::engine::AutomationCurve::countPointsInRegion ( TimeRange  ) const

◆ clear()

void tracktion::engine::AutomationCurve::clear ( )

◆ addPoint()

int tracktion::engine::AutomationCurve::addPoint ( TimePosition  ,
float  value,
float  curve 
)

◆ removePoint()

void tracktion::engine::AutomationCurve::removePoint ( int  index)

◆ removePointsInRegion()

void tracktion::engine::AutomationCurve::removePointsInRegion ( TimeRange  )

◆ removeRegionAndCloseGap()

void tracktion::engine::AutomationCurve::removeRegionAndCloseGap ( TimeRange  )

◆ removeRedundantPoints()

void tracktion::engine::AutomationCurve::removeRedundantPoints ( TimeRange  )

◆ getPointsInRegion()

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

◆ movePoint()

int tracktion::engine::AutomationCurve::movePoint ( int  index,
TimePosition  ,
float  newValue,
bool  removeInterveningPoints 
)

◆ setPointTime()

void tracktion::engine::AutomationCurve::setPointTime ( int  index,
TimePosition   
)

◆ setPointValue()

void tracktion::engine::AutomationCurve::setPointValue ( int  index,
float  newValue 
)

◆ setCurveValue()

void tracktion::engine::AutomationCurve::setCurveValue ( int  index,
float  newCurve 
)

◆ mergeOtherCurve()

void tracktion::engine::AutomationCurve::mergeOtherCurve ( const AutomationCurve source,
TimeRange  destRange,
TimePosition  sourceStartTime,
TimeDuration  fadeLength,
bool  leaveOpenAtStart,
bool  leaveOpenEnded 
)

◆ simplify()

void tracktion::engine::AutomationCurve::simplify ( TimeRange  ,
double  minTimeDifference,
float  minValueDifference 
)

◆ rescaleAllTimes()

void tracktion::engine::AutomationCurve::rescaleAllTimes ( double  factor)

◆ addToAllTimes()

void tracktion::engine::AutomationCurve::addToAllTimes ( TimeDuration  delta)

◆ rescaleValues()

void tracktion::engine::AutomationCurve::rescaleValues ( float  factor,
TimeRange   
)

◆ addToValues()

void tracktion::engine::AutomationCurve::addToValues ( float  valueDelta,
TimeRange   
)

◆ getBezierXfromT()

static double tracktion::engine::AutomationCurve::getBezierXfromT ( double  t,
double  x1,
double  xb,
double  x2 
)
static

◆ getBezierYFromX()

static float tracktion::engine::AutomationCurve::getBezierYFromX ( double  t,
double  x1,
float  y1,
double  xb,
float  yb,
double  x2,
float  y2 
)
static

◆ removeAllAutomationCurvesRecursively()

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

Member Data Documentation

◆ parentState

juce::ValueTree tracktion::engine::AutomationCurve::parentState

◆ state

juce::ValueTree tracktion::engine::AutomationCurve::state

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