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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_Reverb.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
14class ReverbPlugin : public Plugin
15{
16public:
18 ~ReverbPlugin() override;
19
20 //==============================================================================
21 static const char* getPluginName() { return NEEDS_TRANS("Reverb"); }
22 static const char* xmlTypeName;
23
24 juce::String getName() const override { return TRANS("Reverb"); }
25 juce::String getPluginType() override { return xmlTypeName; }
26 bool needsConstantBufferSize() override { return false; }
27
28 void initialise (const PluginInitialisationInfo&) override;
29 void deinitialise() override;
30 void reset() override;
31 int getNumOutputChannelsGivenInputs (int numInputChannels) override { return juce::jmin (numInputChannels, 2); }
32 void applyToBuffer (const PluginRenderContext&) override;
33 juce::String getSelectableDescription() override { return TRANS("Reverb Plugin"); }
34 void restorePluginStateFromValueTree (const juce::ValueTree&) override;
35
36 //==============================================================================
37 void setRoomSize (float value);
38 float getRoomSize();
39
40 void setDamp (float value);
41 float getDamp();
42
43 void setWet (float value);
44 float getWet();
45
46 void setDry (float value);
47 float getDry();
48
49 void setWidth (float value);
50 float getWidth();
51
52 void setMode (float value);
53 float getMode();
54
55 juce::CachedValue<float> roomSizeValue, dampValue, wetValue,
56 dryValue, widthValue, modeValue;
57
58 AutomatableParameter::Ptr roomSizeParam, dampParam, wetParam,
59 dryParam, widthParam, modeParam;
60
61private:
62 bool outputSilent = true;
63 juce::Reverb reverb;
64
66};
67
68}} // namespace tracktion { inline namespace engine
void applyToBuffer(const PluginRenderContext &) override
Process the next block of data.
void reset() override
Should reset synth voices, tails, clear delay buffers, etc.
int getNumOutputChannelsGivenInputs(int numInputChannels) override
This must return the number of output channels that the plugin will produce, given a number of input ...
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 deinitialise() override
Called after play stops to release resources.
#define TRANS(stringLiteral)
#define NEEDS_TRANS(stringLiteral)
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
constexpr Type jmin(Type a, Type b)
The context passed to plugin render methods to provide it with buffers to fill.