feat(fx): add effect rack and effect units
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include "../FXProcessor.h"
|
||||
#include "Biquad.h"
|
||||
|
||||
namespace serum
|
||||
{
|
||||
|
||||
// ===========================================================================
|
||||
// Distortion — waveshaper with drive and a post lowpass tone. p[0]=drive,
|
||||
// p[1]=shape (soft/hard/fold), p[2]=tone, p[3]=output.
|
||||
// ===========================================================================
|
||||
class DistortionUnit : 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;
|
||||
Biquad lpL, lpR;
|
||||
|
||||
static float shape (float x, float shapeParam) noexcept;
|
||||
};
|
||||
|
||||
} // namespace serum
|
||||
Reference in New Issue
Block a user