A lightweight wrapper around a Processor in the HISE signal path. More...
Public Types | |
using | ParameterCallback = std::function< void(float newValue)> |
A lambda that will be executed when the parameter changes. More... | |
Public Member Functions | |
void | addParameterToWatch (int parameterIndex, const ParameterCallback &callbackFunction) |
Adds a lambda callback to a dedicated parameter that will be fired on changes. More... | |
ProcessorType * | getProcessor () const noexcept |
Returns a raw pointer to the connected Processor. More... | |
Reference (MainController *mc, const String &id=String(), bool addAsListener=false) | |
Creates a reference to the processor with the given ID. More... | |
Public Member Functions inherited from ControlledObject | |
ControlledObject (MainController *m) | |
Creates a new ControlledObject. More... | |
const MainController * | getMainController () const noexcept |
Provides read-only access to the main controller. More... | |
MainController * | getMainController () noexcept |
Provides write access to the main controller. More... | |
A lightweight wrapper around a Processor in the HISE signal path.
This object can be used as a wrapper around one of the Processor modules in your HISE project. Upon creation, it will search for the given ID (or use the first module that matches the type if the ID is not supplied).
If desired, it will also be notified about changes to a parameter which can be used to update the UI.
If you want a bidirectional connection between UI and the processor, take a look at the UIConnection classes, which offer ready made listeners / updaters for some of the basic JUCE widgets (Slider, ComboBox, Button)
using ParameterCallback = std::function<void(float newValue)> |
A lambda that will be executed when the parameter changes.
The newValue argument will contain the current value.
Reference | ( | MainController * | mc, |
const String & | id = String() , |
||
bool | addAsListener = false |
||
) |
Creates a reference to the processor with the given ID.
If the ID is empty, it just looks for the first processor of the specified type.
void addParameterToWatch | ( | int | parameterIndex, |
const ParameterCallback & | callbackFunction | ||
) |
Adds a lambda callback to a dedicated parameter that will be fired on changes.
|
noexcept |
Returns a raw pointer to the connected Processor.