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

The ProcessorController acts as container foe one AudioProcessor or VideoProcessor inside the ClipDescriptor. More...

#include <foleys_ProcessorController.h>

+ Inheritance diagram for ProcessorController:

Classes

struct  ProcessorAdapter
 

Public Member Functions

 ProcessorController (ClipDescriptor &owner, std::unique_ptr< juce::AudioProcessor > processor, juce::UndoManager *undo)
 This ProcessorController constructor creates an instance using a given AudioProcessor.
 
 ProcessorController (ClipDescriptor &owner, std::unique_ptr< VideoProcessor > processor, juce::UndoManager *undo)
 This ProcessorController constructor creates an instance using a given VideoProcessor.
 
 ProcessorController (ClipDescriptor &owner, const juce::ValueTree &state, juce::UndoManager *undo, int index)
 This ProcessorController constructor creates either an AudioProcessor or VideoProcessor from a saved state in a ValueTree.
 
 ~ProcessorController () override
 
juce::String getName () const
 Returns the name of the controlled processor.
 
double getCurrentPTS () const override
 Return the current timestamp in seconds of the owning clip.
 
double getValueAtTime (juce::Identifier paramID, double pts, double defaultValue) override
 Return the value of the parameter at a certain time point.
 
void updateAutomation (double pts)
 This sets all parameters in the contained processor according to the current time point in seconds.
 
void readPluginStatesIntoValueTree ()
 Read all plugins getStateInformation() and save it into the statusTree as BLOB.
 
juce::ValueTree & getProcessorState ()
 Grants access to the underlying state.
 
ClipDescriptorgetOwningClipDescriptor ()
 
juce::AudioProcessor * getAudioProcessor ()
 Returns the controlled AudioProcessor.
 
VideoProcessorgetVideoProcessor ()
 Returns the controlled VideoProcessor.
 
AutomationMapgetParameters () override
 Grant access to the individual parameters.
 
int getNumParameters () const override
 
void setActive (bool shouldBeActive)
 
bool isActive () const
 
void setPosition (juce::int64 timeInSamples, double timeInSeconds)
 
- Public Member Functions inherited from ControllableBase
 ControllableBase (TimeCodeAware &reference)
 
virtual ~ControllableBase ()=default
 
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 ProcessorController acts as container foe one AudioProcessor or VideoProcessor inside the ClipDescriptor.

It also holds the automation data to update the ProcessorParameters according to the currently rendered position.

Constructor & Destructor Documentation

◆ ProcessorController() [1/3]

ProcessorController ( ClipDescriptor owner,
std::unique_ptr< juce::AudioProcessor >  processor,
juce::UndoManager *  undo 
)

This ProcessorController constructor creates an instance using a given AudioProcessor.

It will create all necessary ProcessorAutomation to wrap the AudioProcessorParameters. The generated state to represent the controller is added to the state of it's owner.

◆ ProcessorController() [2/3]

ProcessorController ( ClipDescriptor owner,
std::unique_ptr< VideoProcessor processor,
juce::UndoManager *  undo 
)

This ProcessorController constructor creates an instance using a given VideoProcessor.

It will create all necessary ProcessorAutomation to wrap the ProcessorParameters. The generated state to represent the controller is added to the state of it's owner.

◆ ProcessorController() [3/3]

ProcessorController ( ClipDescriptor owner,
const juce::ValueTree &  state,
juce::UndoManager *  undo,
int  index 
)

This ProcessorController constructor creates either an AudioProcessor or VideoProcessor from a saved state in a ValueTree.

References ClipDescriptor::getOwningClip(), and AVClip::getVideoEngine().

◆ ~ProcessorController()

~ProcessorController ( )
override

Member Function Documentation

◆ getName()

juce::String getName ( ) const

Returns the name of the controlled processor.

◆ getCurrentPTS()

double getCurrentPTS ( ) const
overridevirtual

Return the current timestamp in seconds of the owning clip.

Implements ControllableBase.

References ClipDescriptor::getCurrentTimeInSeconds().

◆ getValueAtTime()

double getValueAtTime ( juce::Identifier  paramID,
double  pts,
double  defaultValue 
)
overridevirtual

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

Implements ControllableBase.

◆ updateAutomation()

void updateAutomation ( double  pts)

This sets all parameters in the contained processor according to the current time point in seconds.

◆ readPluginStatesIntoValueTree()

void readPluginStatesIntoValueTree ( )

Read all plugins getStateInformation() and save it into the statusTree as BLOB.

References ProcessorController::getAudioProcessor(), and ProcessorController::getVideoProcessor().

◆ getProcessorState()

juce::ValueTree & getProcessorState ( )

Grants access to the underlying state.

Your GUI may use this to add private data. It is your responsibility to avoid property or child collissions.

◆ getOwningClipDescriptor()

ClipDescriptor & getOwningClipDescriptor ( )

◆ getAudioProcessor()

juce::AudioProcessor * getAudioProcessor ( )

Returns the controlled AudioProcessor.

Can be nullptr, if it controlls a VideoProcessor or if loading of the plugin failed.

Referenced by ProcessorController::readPluginStatesIntoValueTree().

◆ getVideoProcessor()

VideoProcessor * getVideoProcessor ( )

Returns the controlled VideoProcessor.

Can be nullptr, if it controlls a AudioProcessor or if loading of the plugin failed.

Referenced by ProcessorController::readPluginStatesIntoValueTree().

◆ getParameters()

AutomationMap & getParameters ( )
overridevirtual

Grant access to the individual parameters.

Implements ControllableBase.

◆ getNumParameters()

int getNumParameters ( ) const
overridevirtual

Implements ControllableBase.

◆ setActive()

void setActive ( bool  shouldBeActive)

◆ isActive()

bool isActive ( ) const

◆ setPosition()

void setPosition ( juce::int64  timeInSamples,
double  timeInSeconds 
)

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