|
TracktionEngine
|
An AutomationCurveModifier contains three curves to control automation: absolute, relative and scale. More...
#include <tracktion_AutomationCurveList.h>
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 Types inherited from engine::Selectable | |
| using | WeakRef = juce::WeakReference< Selectable > |
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. | |
| CurveTiming & | getCurveTiming (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< AutomationCurvePlayhead > | getPlayhead (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 Member Functions inherited from engine::EditItem | |
| EditItem (EditItemID, Edit &) | |
| EditItem (Edit &, const juce::ValueTree &) | |
| virtual | ~EditItem ()=default |
Public Member Functions inherited from engine::Selectable | |
| Selectable () | |
| virtual | ~Selectable () |
| virtual void | selectionStatusChanged (bool isNowSelected) |
| Can be overridden to tell this object that it has just been selected or deselected. | |
| virtual void | changed () |
| This should be called to send a change notification to any SelectableListeners that are registered with this object. | |
| virtual void | selectableAboutToBeDeleted () |
| Called just before the selectable is about to be deleted so any subclasses should still be valid at this point. | |
| void | addListener (SelectableListener *) |
| void | removeListener (SelectableListener *) |
| void | addSelectableListener (SelectableListener *) |
| void | removeSelectableListener (SelectableListener *) |
| void | cancelAnyPendingUpdates () |
| If changed() has been called, this will cancel any pending async change notificaions. | |
| void | deselect () |
| void | propertiesChanged () |
| void | notifyListenersOfDeletion () |
| WeakRef | getWeakRef () |
Public Member Functions inherited from engine::AutomatableParameter::ModifierSource | |
| ModifierSource ()=default | |
| virtual | ~ModifierSource () |
Public Attributes | |
| juce::ValueTree | state |
Public Attributes inherited from engine::EditItem | |
| Edit & | edit |
| const EditItemID | itemID |
| Every EditItem has an ID which is unique within the edit. | |
Public Attributes inherited from engine::Selectable | |
| WeakRef::Master | masterReference |
Additional Inherited Members | |
Static Public Member Functions inherited from engine::Selectable | |
| static void | initialise () |
| static bool | isSelectableValid (const Selectable *) noexcept |
| checks whether this object has been deleted. | |
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.
| using engine::AutomationCurveModifier::Ptr = juce::ReferenceCountedObjectPtr<AutomationCurveModifier> |
| using engine::AutomationCurveModifier::Array = juce::ReferenceCountedArray<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
|
override |
Destructor.
| AutomatableParameterID engine::AutomationCurveModifier::getDestID | ( | ) | const |
The ID of the AutomatableParameter this curve is modifying.
| 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.
| CurveTiming & engine::AutomationCurveModifier::getCurveTiming | ( | CurveModifierType | ) |
Returns the timing properties for a curve type.
| CurveInfo engine::AutomationCurveModifier::getCurve | ( | CurveModifierType | ) |
Returns the CurveInfo for a given curve type.
| 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.
| 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.
| void engine::AutomationCurveModifier::remove | ( | ) |
Remove/deletes this curve from its parent list.
| std::shared_ptr< AutomationCurvePlayhead > engine::AutomationCurveModifier::getPlayhead | ( | CurveModifierType | ) |
Returns a playhead for the automation curve.
Removes a previously added listener.
|
overridevirtual |
Implements engine::EditItem.
|
overridevirtual |
Implements engine::Selectable.
| void engine::AutomationCurveModifier::setPositionDelegate | ( | std::function< CurvePosition()> | ) |
| juce::ValueTree engine::AutomationCurveModifier::state |