tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_ParameterChangeHandler.h
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11namespace tracktion { inline namespace engine
12{
13
18{
19public:
20 //==============================================================================
23
25 bool isEventPending() const noexcept;
26
28 struct Disabler
29 {
30 Disabler (ParameterChangeHandler& p) : owner (p) { p.enabled = false; }
31 ~Disabler() { owner.enabled = true; }
32
35 };
36
37 //==============================================================================
42 void parameterChanged (AutomatableParameter& parameter, bool fromAutomation);
43
46 bool isParameterPending() const noexcept;
47
52 AutomatableParameter::Ptr getPendingParam (bool consumeEvent) noexcept;
53
54 //==============================================================================
59 void actionFunctionTriggered (int externalControllerID);
60
63 bool isActionFunctionPending() const noexcept;
64
69 int getPendingActionFunctionId (bool consumeEvent) noexcept;
70
71 //==============================================================================
73 void setParameterLearnActive (bool a) { parameterLearnActive = a; }
74
75private:
76 //==============================================================================
77 Edit& edit;
78 int pendingActionId = -1;
79 bool enabled = true;
80 bool parameterLearnActive = false;
81 AutomatableParameter::Ptr pendingParam;
82 juce::CriticalSection eventLock;
83
85};
86
87}} // namespace tracktion { inline namespace engine
The Tracktion Edit class!
Manages a set of AutomatableParameters for an Edit and notifies controllers and registered listeners ...
int getPendingActionFunctionId(bool consumeEvent) noexcept
Returns the pending action function waiting to be assigned or a nullptr if none has been.
bool isEventPending() const noexcept
Returns true if there is either a parameter or action waiting to be assigned.
bool isActionFunctionPending() const noexcept
Returns true if there is an action function waiting to be assigned.
AutomatableParameter::Ptr getPendingParam(bool consumeEvent) noexcept
Returns the parameter waiting to be assigned if there is one, otherwise a nullptr.
bool isParameterPending() const noexcept
Returns true if there is an AutomatableParameter waiting to be assigned.
void parameterChanged(AutomatableParameter &parameter, bool fromAutomation)
Called by parameters when they are changed.
void actionFunctionTriggered(int externalControllerID)
Called by the accelerators when an assignable action is called.
void setParameterLearnActive(bool a)
Set true when UI up for learning parameters.
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)