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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_VCA.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
18class VCAPlugin : public Plugin
19{
20public:
22 ~VCAPlugin() override;
23
24 static juce::ValueTree create();
25
26 //==============================================================================
27 float getSliderPos() const;
28 void setVolumeDb (float dB);
29 float getVolumeDb() const;
30 void setSliderPos (float position);
31 void muteOrUnmute();
32
33 float updateAutomationStreamAndGetVolumeDb (TimePosition);
34
35 //==============================================================================
36 static const char* xmlTypeName;
37
38 juce::String getName() const override { return TRANS("VCA"); }
40 juce::String getPluginType() override { return xmlTypeName; }
41 bool canBeAddedToClip() override { return false; }
42 bool canBeAddedToRack() override { return false; }
43 bool canBeAddedToFolderTrack() override { return true; }
44 bool canBeMoved() override;
45 bool needsConstantBufferSize() override { return false; }
46
47 void initialise (const PluginInitialisationInfo&) override;
48 void deinitialise() override;
49 void applyToBuffer (const PluginRenderContext&) override;
50
51 void restorePluginStateFromValueTree (const juce::ValueTree&) override;
52
53 juce::CachedValue<float> volumeValue;
54 AutomatableParameter::Ptr volParam;
55
56private:
57 float lastVolumeBeforeMute = 0.0f;
58
60};
61
62}} // namespace tracktion { inline namespace engine
The VCA plugin sits on a folder track to control the overall level of all the volume/pan plugins in i...
void initialise(const PluginInitialisationInfo &) override
Gives the plugin a chance to set itself up before being played.
void deinitialise() override
Called after play stops to release resources.
juce::String getName() const override
The name of the type, e.g.
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
void applyToBuffer(const PluginRenderContext &) override
Process the next block of data.
#define TRANS(stringLiteral)
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Represents a position in real-life time.