Video display and composing engine for JUCE
Loading...
Searching...
No Matches
AudioParameterAutomation Class Reference

Controls the AudioProcessorParameters of an AudioProcessor. More...

#include <foleys_ParameterAutomation.h>

+ Inheritance diagram for AudioParameterAutomation:

Public Member Functions

 AudioParameterAutomation (ProcessorController &controller, juce::AudioProcessorParameter &parameter, const juce::ValueTree &state, juce::UndoManager *)
 
 ~AudioParameterAutomation () override
 
juce::String getName () const override
 
int getParameterIndex () const override
 
juce::NamedValueSet & getParameterProperties () override
 
int getNumSteps () const override
 
juce::StringArray getAllValueStrings () const override
 
void updateProcessor (double pts) override
 This updates the parameter to match the state at a certain timepoint.
 
double getRealValueForTime (double pts) const override
 Returns the unnormalised value at a certain time.
 
void setRealValue (double value) override
 Set the value from an unnormalised value.
 
void setRealValue (double pts, double value) override
 Set the value from an unnormalised value at a certain timepoint.
 
void addRealKeyframe (double pts, double value) override
 This will add a keyframe with an unnormalised value at the given position.
 
void setKeyframesWithRealValues (std::map< double, double > keys) override
 Replace all keyframes specifying the value in unnormalised values.
 
void parameterValueChanged (int parameterIndex, float newValue) override
 
void parameterGestureChanged (int parameterIndex, bool gestureIsStarting) override
 
juce::String getText (float normalisedValue, int numDigits=0) const override
 
double getValueForText (const juce::String &text) const override
 
bool isAudioParameter () override
 
- Public Member Functions inherited from ParameterAutomation
 ParameterAutomation (ControllableBase &, double defaultValue, const juce::ValueTree &state, juce::UndoManager *)
 The ParameterAutomation holds the information about keyframes / automation points and takes care of updating the processor values.
 
void setValue (double value)
 This sets the value of the parameter.
 
void setValue (double pts, double value)
 Set the value at a certain timepoint.
 
void addKeyframe (double pts, double value)
 This will add a keyframe at the given position.
 
void setKeyframe (int index, double pts, double value)
 
void deleteKeyframe (int index)
 
double getValueForTime (double pts) const
 Returns the normalised value at a certain time.
 
double getValue () const
 
double getPreviousKeyframeTime (double time) const
 
double getNextKeyframeTime (double time) const
 
void startAutomationGesture ()
 Call this before calling setValue commands (e.g.
 
void finishAutomationGesture ()
 Call this to finish user interaction to give back controll to the playing automation.
 
const std::map< double, double > & getKeyframes () const
 Give reading access to the keyframes.
 
void setKeyframes (std::map< double, double > keys)
 Replace all keyframes.
 
virtual bool isVideoParameter ()
 
ControllableBasegetControllable ()
 

Additional Inherited Members

- Protected Attributes inherited from ParameterAutomation
ControllableBasecontrollable
 
bool gestureInProgress = false
 

Detailed Description

Controls the AudioProcessorParameters of an AudioProcessor.

Constructor & Destructor Documentation

◆ AudioParameterAutomation()

AudioParameterAutomation ( ProcessorController controller,
juce::AudioProcessorParameter &  parameter,
const juce::ValueTree &  state,
juce::UndoManager *  undo 
)

◆ ~AudioParameterAutomation()

~AudioParameterAutomation ( )
override

Member Function Documentation

◆ getName()

juce::String getName ( ) const
overridevirtual

Implements ParameterAutomation.

◆ getParameterIndex()

int getParameterIndex ( ) const
overridevirtual

Implements ParameterAutomation.

◆ getParameterProperties()

juce::NamedValueSet & getParameterProperties ( )
overridevirtual

Implements ParameterAutomation.

◆ getNumSteps()

int getNumSteps ( ) const
overridevirtual

Implements ParameterAutomation.

◆ getAllValueStrings()

juce::StringArray getAllValueStrings ( ) const
overridevirtual

Implements ParameterAutomation.

◆ updateProcessor()

void updateProcessor ( double  pts)
overridevirtual

This updates the parameter to match the state at a certain timepoint.

Call this before you process a block.

Implements ParameterAutomation.

References ParameterAutomation::gestureInProgress, and ParameterAutomation::getValueForTime().

◆ getRealValueForTime()

double getRealValueForTime ( double  pts) const
overridevirtual

Returns the unnormalised value at a certain time.

Implements ParameterAutomation.

References ParameterAutomation::getValueForTime().

◆ setRealValue() [1/2]

void setRealValue ( double  value)
overridevirtual

Set the value from an unnormalised value.

Implements ParameterAutomation.

References ParameterAutomation::setValue().

◆ setRealValue() [2/2]

void setRealValue ( double  pts,
double  value 
)
overridevirtual

Set the value from an unnormalised value at a certain timepoint.

If there was no keyframe recorded yet, this will just call setValue. If there was a keyframe anywhere on the automation, this will add a keyframe at this position.

Implements ParameterAutomation.

References ParameterAutomation::setValue().

◆ addRealKeyframe()

void addRealKeyframe ( double  pts,
double  value 
)
overridevirtual

This will add a keyframe with an unnormalised value at the given position.

Implements ParameterAutomation.

References ParameterAutomation::addKeyframe().

◆ setKeyframesWithRealValues()

void setKeyframesWithRealValues ( std::map< double, double >  keys)
overridevirtual

Replace all keyframes specifying the value in unnormalised values.

Implements ParameterAutomation.

References ParameterAutomation::setKeyframes().

◆ parameterValueChanged()

void parameterValueChanged ( int  parameterIndex,
float  newValue 
)
override

◆ parameterGestureChanged()

void parameterGestureChanged ( int  parameterIndex,
bool  gestureIsStarting 
)
override

◆ getText()

juce::String getText ( float  normalisedValue,
int  numDigits = 0 
) const
overridevirtual

Implements ParameterAutomation.

◆ getValueForText()

double getValueForText ( const juce::String &  text) const
overridevirtual

Implements ParameterAutomation.

◆ isAudioParameter()

bool isAudioParameter ( )
overridevirtual

Reimplemented from ParameterAutomation.


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