TracktionEngine
Loading...
Searching...
No Matches
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< AutomationPoint > getPointsInRegion (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 *)
void insertSpace (AutomatableParameter &, TimePosition, TimeDuration)
 Inserts space at the given time, moving all points at or after that time.
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< AutomationPoint > getPointsInRegion (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 )

References state.

◆ AutomationCurve() [3/3]

engine::AutomationCurve::AutomationCurve ( const AutomationCurve & )

References 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

References getDuration().

Referenced by getDuration().

◆ getPoint()

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

References getPoint().

Referenced by getPoint().

◆ getPointPosition()

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

References getPointPosition().

Referenced by getPointPosition().

◆ getPointValue()

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

References getPointValue().

Referenced by getPointValue().

◆ getPointCurve()

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

References getPointCurve().

Referenced by getPointCurve().

◆ getBezierHandle()

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

References getBezierHandle().

Referenced by getBezierHandle().

◆ getBezierPoint()

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

References getBezierPoint().

Referenced by getBezierPoint().

◆ getBezierEnds() [1/2]

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

References getBezierEnds().

Referenced by getBezierEnds(), and getBezierEnds().

◆ getBezierEnds() [2/2]

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

References getBezierEnds().

◆ getValueAt() [1/2]

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

References getValueAt().

Referenced by getValueAt(), and getValueAt().

◆ indexBefore() [1/2]

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

References indexBefore().

Referenced by indexBefore(), and indexBefore().

◆ nextIndexAfter() [1/2]

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

References nextIndexAfter().

Referenced by nextIndexAfter(), and nextIndexAfter().

◆ clear()

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

References clear().

Referenced by clear().

◆ addPoint() [1/2]

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

References addPoint().

Referenced by addPoint(), and addPoint().

◆ removePoint()

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

References removePoint().

Referenced by removePoint().

◆ removePoints()

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

References removePoints().

Referenced by removePoints().

◆ 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 *  )

References movePoint().

Referenced by movePoint(), and movePoint().

◆ setPointValue()

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

References setPointValue().

Referenced by setPointValue().

◆ setCurveValue()

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

References setCurveValue().

Referenced by setCurveValue().

◆ rescaleAllPositions()

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

References rescaleAllPositions().

Referenced by rescaleAllPositions().

◆ rescaleValues() [1/2]

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

References rescaleValues().

Referenced by rescaleValues(), and rescaleValues().

◆ addToValues() [1/2]

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

References addToValues().

Referenced by addToValues(), and addToValues().

◆ simplify() [1/2]

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

References simplify().

Referenced by simplify(), and simplify().

◆ insertSpace()

void engine::AutomationCurve::insertSpace ( AutomatableParameter & ,
TimePosition ,
TimeDuration  )

Inserts space at the given time, moving all points at or after that time.

References insertSpace().

Referenced by insertSpace().

◆ removeAllAutomationCurvesRecursively()

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

◆ getPointTime()

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

References getPointTime().

Referenced by getPointTime().

◆ getValueAt() [2/2]

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

References getValueAt().

◆ indexBefore() [2/2]

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

References indexBefore().

◆ getLength()

TimeDuration engine::AutomationCurve::getLength ( ) const

References getLength().

Referenced by getLength().

◆ nextIndexAfter() [2/2]

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

References nextIndexAfter().

◆ countPointsInRegion()

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

References countPointsInRegion().

Referenced by countPointsInRegion().

◆ addPoint() [2/2]

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

References addPoint().

◆ removePointsInRegion()

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

References removePointsInRegion().

Referenced by removePointsInRegion().

◆ 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

References getPointsInRegion().

◆ rescaleValues() [2/2]

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

References rescaleValues().

◆ addToValues() [2/2]

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

References addToValues().

◆ movePoint() [2/2]

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

References movePoint().

◆ simplify() [2/2]

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

References simplify().

◆ setPointPosition()

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

References AutomationCurve(), and setPointPosition().

Referenced by setPointPosition().

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

Referenced by AutomationCurve().


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