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. | |
| ClipDescriptor & | getOwningClipDescriptor () |
| juce::AudioProcessor * | getAudioProcessor () |
| Returns the controlled AudioProcessor. | |
| VideoProcessor * | getVideoProcessor () |
| Returns the controlled VideoProcessor. | |
| AutomationMap & | getParameters () 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. | |
| TimeCodeAware & | getTimeReference () |
| Grant access to the time reference of this ControllableBase. | |
| const TimeCodeAware & | getTimeReference () const |
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.
| 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 | ( | 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 | ( | 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().
|
override |
| juce::String getName | ( | ) | const |
Returns the name of the controlled processor.
|
overridevirtual |
Return the current timestamp in seconds of the owning clip.
Implements ControllableBase.
References ClipDescriptor::getCurrentTimeInSeconds().
|
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.
| paramID | the identifier of the parameter |
| pts | the timestamp in seconds in clip time |
| defaultValue | the value that is returned, if the parameter is not set up |
Implements ControllableBase.
| 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.
References ProcessorController::getAudioProcessor(), and ProcessorController::getVideoProcessor().
| 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.
| ClipDescriptor & getOwningClipDescriptor | ( | ) |
| 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().
| 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().
|
overridevirtual |
Grant access to the individual parameters.
Implements ControllableBase.
|
overridevirtual |
Implements ControllableBase.
| void setActive | ( | bool | shouldBeActive | ) |
| bool isActive | ( | ) | const |
| void setPosition | ( | juce::int64 | timeInSamples, |
| double | timeInSeconds | ||
| ) |