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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_MacroParameter.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
20{
21public:
22 //==============================================================================
38
39 //==============================================================================
41 ~MacroParameter() override;
42
44
45 void initialise();
46
47 juce::String getParameterName() const override { return macroName; }
48 std::optional<float> getDefaultValue() const override;
49
50 Edit& edit;
51 juce::ValueTree state;
52 juce::CachedValue<float> value, defaultValue;
54
55private:
56 virtual void parameterChanged (float, bool byAutomation) override;
57};
58
61
62//==============================================================================
66{
67public:
69 ~MacroParameterList() override;
70
71 MacroParameter* createMacroParameter();
72 void removeMacroParameter (MacroParameter&);
73 void hideMacroParametersFromTracks() const;
74
75 juce::ReferenceCountedArray<MacroParameter> getMacroParameters() const;
76 void visitMacroParameters (const std::function<void(AutomatableParameter&)>& visit) const;
77
78 juce::String getName() const override { return {}; }
79 Track* getTrack() const;
80
81 //==============================================================================
82 void restorePluginStateFromValueTree (const juce::ValueTree&) override {}
83
84 juce::ValueTree state;
85
86private:
87 struct List;
88 juce::ValueTree parent;
90};
91
94
95//==============================================================================
100{
101public:
104
106 virtual ~MacroParameterElement() = default;
107
110
113
114 juce::ReferenceCountedArray<MacroParameter> getMacroParameters() const;
115
116 Edit& ownerEdit;
117 juce::ValueTree parentStateForList;
118
119private:
120 std::unique_ptr<MacroParameterList> macroParameterList;
121};
122
123}} // namespace tracktion { inline namespace engine
Base class for elements that have some kind of automatable parameters.
The Tracktion Edit class!
Base class for elements which can contain macro parameters.
virtual ~MacroParameterElement()=default
Destructor.
MacroParameterList * getMacroParameterList()
If no parameters have been created, this may return nullptr.
MacroParameterList & getMacroParameterListForWriting()
This ensures that the list has been created.
A MacroParameter is an AutomatableParameter which is a collection of Mappings.
Base class for tracks which contain clips and plugins and can be added to Edit[s].
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
MacroParameter::Ptr getMacroParameterForID(Edit &e, EditItemID pid)
Searched the Edit for a MacroParameter with this ID.
Plugin::Ptr getOwnerPlugin(MacroParameterList *mpl)
If this MacroParameterList belongs to an Plugin, this will return it.
Connects a modifier source to an AutomatableParameter.
Base class for things that can be used to modify parameters.
ID for objects of type EditElement - e.g.
An Assignment between a MacroParameter and an AutomatableParameter.
bool isForModifierSource(const AutomatableParameter::ModifierSource &) const override
Must return true if this assigment is for the given source.