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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_Chorus.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 ChorusPlugin : public Plugin
15{
16public:
18 ~ChorusPlugin() override;
19
20 //==============================================================================
21 static const char* getPluginName() { return NEEDS_TRANS("Chorus"); }
22 static const char* xmlTypeName;
23
24 juce::String getName() const override { return TRANS("Chorus"); }
25 juce::String getPluginType() override { return xmlTypeName; }
26 juce::String getShortName (int) override { return getName(); }
27
28 int getNumOutputChannelsGivenInputs (int numInputChannels) override { return juce::jmin (numInputChannels, 2); }
29 void initialise (const PluginInitialisationInfo&) override;
30 void deinitialise() override;
31 void applyToBuffer (const PluginRenderContext&) override;
32 juce::String getSelectableDescription() override { return TRANS("Chorus Plugin"); }
33 bool needsConstantBufferSize() override { return false; }
34
35 void restorePluginStateFromValueTree (const juce::ValueTree&) override;
36
37 juce::CachedValue<float> depthMs, width, mixProportion, speedHz;
38
39private:
40 //==============================================================================
41 DelayBufferBase delayBuffer;
42 float phase = 0;
43
45};
46
47}} // namespace tracktion { inline namespace engine
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
int getNumOutputChannelsGivenInputs(int numInputChannels) override
This must return the number of output channels that the plugin will produce, given a number of input ...
void deinitialise() override
Called after play stops to release resources.
juce::String getName() const override
The name of the type, e.g.
void applyToBuffer(const PluginRenderContext &) override
Process the next block of data.
#define TRANS(stringLiteral)
#define NEEDS_TRANS(stringLiteral)
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
constexpr Type jmin(Type a, Type b)
Passed into Plugins when they are being initialised, to give them useful contextual information that ...
The context passed to plugin render methods to provide it with buffers to fill.