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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_Phaser.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 PhaserPlugin : public Plugin
15{
16public:
18 ~PhaserPlugin() override;
19
20 //==============================================================================
21 static const char* getPluginName() { return NEEDS_TRANS("Phaser"); }
22 static const char* xmlTypeName;
23
24 juce::String getName() const override { return TRANS("Phaser"); }
25 juce::String getPluginType() override { return xmlTypeName; }
26 bool needsConstantBufferSize() override { return false; }
27 void initialise (const PluginInitialisationInfo&) override;
28 void deinitialise() override;
29 int getNumOutputChannelsGivenInputs (int numInputChannels) override { return juce::jmin (numInputChannels, 2); }
30 void applyToBuffer (const PluginRenderContext&) override;
32 void restorePluginStateFromValueTree (const juce::ValueTree&) override;
33
34 juce::CachedValue<float> depth, rate, feedbackGain;
35
36private:
37 //==============================================================================
38 double filterVals[2][8];
39 double sweep = 0.0, sweepFactor = 0.0, minSweep = 0.0;
40
42};
43
44}} // namespace tracktion { inline namespace engine
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.
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 getSelectableDescription() override
Subclasses must return a description of what they are.
#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.