JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::AudioProcessorParameter::Listener Class Referenceabstract

A base class for listeners that want to know about changes to an AudioProcessorParameter. More...

#include <juce_AudioProcessorParameter.h>

Inheritance diagram for juce::AudioProcessorParameter::Listener:

Public Member Functions

virtual ~Listener ()=default
 Destructor. More...
 
virtual void parameterGestureChanged (int parameterIndex, bool gestureIsStarting)=0
 Indicates that a parameter change gesture has started. More...
 
virtual void parameterValueChanged (int parameterIndex, float newValue)=0
 Receives a callback when a parameter has been changed. More...
 

Detailed Description

A base class for listeners that want to know about changes to an AudioProcessorParameter.

Use AudioProcessorParameter::addListener() to register your listener with an AudioProcessorParameter.

This Listener replaces most of the functionality in the AudioProcessorListener class, which will be deprecated and removed.

Constructor & Destructor Documentation

◆ ~Listener()

virtual juce::AudioProcessorParameter::Listener::~Listener ( )
virtualdefault

Destructor.

Member Function Documentation

◆ parameterGestureChanged()

virtual void juce::AudioProcessorParameter::Listener::parameterGestureChanged ( int  parameterIndex,
bool  gestureIsStarting 
)
pure virtual

Indicates that a parameter change gesture has started.

E.g. if the user is dragging a slider, this would be called with gestureIsStarting being true when they first press the mouse button, and it will be called again with gestureIsStarting being false when they release it.

IMPORTANT NOTE: This will be called synchronously, and many audio processors will call it during their audio callback. This means that not only has your handler code got to be completely thread-safe, but it's also got to be VERY fast, and avoid blocking. If you need to handle this event on your message thread, use this callback to trigger an AsyncUpdater or ChangeBroadcaster which you can respond to later on the message thread.

Implemented in juce::ParameterAttachment.

◆ parameterValueChanged()

virtual void juce::AudioProcessorParameter::Listener::parameterValueChanged ( int  parameterIndex,
float  newValue 
)
pure virtual

Receives a callback when a parameter has been changed.

IMPORTANT NOTE: This will be called synchronously when a parameter changes, and many audio processors will change their parameter during their audio callback. This means that not only has your handler code got to be completely thread-safe, but it's also got to be VERY fast, and avoid blocking. If you need to handle this event on your message thread, use this callback to trigger an AsyncUpdater or ChangeBroadcaster which you can respond to on the message thread.

Implemented in juce::ParameterAttachment.


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