HISE Docs

raw::Reference

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.

Reference polyFilter(mc, "MyFunkyFilter", true);

ParameterCallback update = [this](float newValue) 
{
    this->frequencySlider->setValue(newValue, dontSendNotification); 
};

polyFilter.addParameterToWatch(hise::MonoFilterEffect::Frequency, update);


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)

Class Hierarchy

Base Classes

classProcessorTypeProcessorType

Class methods

Reference

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.

addParameterToWatch

void addParameterToWatch(int parameterIndex, const ParameterCallback &callbackFunction)

Adds a lambda callback to a dedicated parameter that will be fired on changes.

getProcessor

ProcessorType * getProcessor() const noexcept

Returns a raw pointer to the connected Processor .