Video display and composing engine for JUCE
Loading...
Searching...
No Matches
ControllableBase Class Referenceabstract

The ControllableBase acts as counterpart to ParameterAutomation. More...

#include <foleys_ControllableBase.h>

+ Inheritance diagram for ControllableBase:

Classes

class  Listener
 The Listener can subscribe to automation changes, e.g. More...
 

Public Member Functions

 ControllableBase (TimeCodeAware &reference)
 
virtual ~ControllableBase ()=default
 
virtual double getCurrentPTS () const =0
 Since the automation values are time dependent, every instance, that inherits ControllableBase needs a way to tell the local time (presentation time stamp).
 
virtual AutomationMapgetParameters ()=0
 Grant access to the individual parameters.
 
virtual int getNumParameters () const =0
 
virtual double getValueAtTime (juce::Identifier paramID, double pts, double defaultValue)=0
 Return the value of the parameter at a certain time point.
 
void addListener (Listener *)
 
void removeListener (Listener *)
 
void notifyParameterAutomationChange (const ParameterAutomation *p)
 This notifies all ProcessorController::Listeners about an automation change, so they can adapt accordingly by redrawing the curves or invalidating pre-rendered video frames.
 
TimeCodeAwaregetTimeReference ()
 Grant access to the time reference of this ControllableBase.
 
const TimeCodeAwaregetTimeReference () const
 

Detailed Description

The ControllableBase acts as counterpart to ParameterAutomation.

By inheriting this interface, it is possible to automate things like AudioProcessors or VideoProcessors. But also Clips could have automated parameters, e.g. for geometric information, alpha or an audio gain.

Constructor & Destructor Documentation

◆ ControllableBase()

ControllableBase ( TimeCodeAware reference)

◆ ~ControllableBase()

virtual ~ControllableBase ( )
virtualdefault

Member Function Documentation

◆ getCurrentPTS()

virtual double getCurrentPTS ( ) const
pure virtual

Since the automation values are time dependent, every instance, that inherits ControllableBase needs a way to tell the local time (presentation time stamp).

The PTS refers to the audio clock master, video is rendered asynchronously and may have a different PTS

Implemented in ClipDescriptor::ClipParameterController, and ProcessorController.

Referenced by AudioParameterAutomation::parameterValueChanged(), and VideoParameterAutomation::valueChanged().

◆ getParameters()

virtual AutomationMap & getParameters ( )
pure virtual

Grant access to the individual parameters.

Implemented in ClipDescriptor::ClipParameterController, and ProcessorController.

◆ getNumParameters()

virtual int getNumParameters ( ) const
pure virtual

◆ getValueAtTime()

virtual double getValueAtTime ( juce::Identifier  paramID,
double  pts,
double  defaultValue 
)
pure virtual

Return the value of the parameter at a certain time point.

Since the parameter can be used from outside the parameter (i.e. for scale, position etc.) There needs to be a default value, in case the ControllableBase doesn't provide that parameter.

Parameters
paramIDthe identifier of the parameter
ptsthe timestamp in seconds in clip time
defaultValuethe value that is returned, if the parameter is not set up

Implemented in ClipDescriptor::ClipParameterController, and ProcessorController.

◆ addListener()

void addListener ( Listener listener)

◆ removeListener()

void removeListener ( Listener listener)

◆ notifyParameterAutomationChange()

void notifyParameterAutomationChange ( const ParameterAutomation p)

This notifies all ProcessorController::Listeners about an automation change, so they can adapt accordingly by redrawing the curves or invalidating pre-rendered video frames.

Referenced by ParameterAutomation::addKeyframe(), ParameterAutomation::deleteKeyframe(), ParameterAutomation::setKeyframe(), and ParameterAutomation::setValue().

◆ getTimeReference() [1/2]

TimeCodeAware & getTimeReference ( )

Grant access to the time reference of this ControllableBase.

◆ getTimeReference() [2/2]

const TimeCodeAware & getTimeReference ( ) const

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