-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDelayPlugin.hpp
More file actions
30 lines (27 loc) · 850 Bytes
/
Copy pathDelayPlugin.hpp
File metadata and controls
30 lines (27 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "pluginInterface/Plugin/Plugin.hpp"
#include <vector>
class DelayPlugin : public Plugin {
enum PARAMETER_INDICES {
FEEDBACK,
TIME,
WETNESS_PARAM
};
private:
int bufferSize;
int channelSize;
int delaySamples;
float feedback;
std::vector<std::vector<float>> delayBuffer;
int writeIndex;
int readIndex;
std::vector<PluginParameter*> parameters;
PluginMetaData* pluginMetaData;
float wetness;
public:
DelayPlugin(int delaySamples = 48000, float feedback = 0.3f);
bool initialize(int bufferSize, int channelSize, int inIndex, int outIndex) override;
void process(float** input, float** output) override;
PluginMetaData* const getMetaData() override;
std::vector<PluginParameter*>* const getParameters() override;
bool setParameter(int index, float value) override;
};