feat(fx): add effect rack and effect units
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "../FXProcessor.h"
|
||||
|
||||
namespace serum
|
||||
{
|
||||
|
||||
// ===========================================================================
|
||||
// Phaser — cascade of four first-order allpass stages with an LFO-modulated
|
||||
// coefficient and feedback. p[0]=rate, p[1]=depth, p[2]=feedback, p[3]=stages.
|
||||
// ===========================================================================
|
||||
class PhaserUnit : 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;
|
||||
double lfoPhase = 0.0;
|
||||
float xL[6] {}, xR[6] {}, yL[6] {}, yR[6] {};
|
||||
};
|
||||
|
||||
} // namespace serum
|
||||
Reference in New Issue
Block a user