feat(fx): add effect rack and effect units
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include "../FXProcessor.h"
|
||||
|
||||
namespace serum
|
||||
{
|
||||
|
||||
// ===========================================================================
|
||||
// Chorus — two LFO-modulated delay taps per channel. p[0]=rate, p[1]=depth,
|
||||
// p[2]=width, p[3]=unused.
|
||||
// ===========================================================================
|
||||
class ChorusUnit : public FXUnit
|
||||
{
|
||||
public:
|
||||
void prepare (double sampleRate, int maxBlockSize) override;
|
||||
void reset() override;
|
||||
void process (float* l, float* r, int numSamples, const float p[4]) override;
|
||||
|
||||
private:
|
||||
double sr = 44100.0;
|
||||
std::vector<float> delayL, delayR;
|
||||
int writePos = 0;
|
||||
double lfoPhase = 0.0;
|
||||
};
|
||||
|
||||
} // namespace serum
|
||||
Reference in New Issue
Block a user