Round 1 findings and fixes, all previously uncommitted: - FXProcessor per-slot DSP history repair (HEAD does not compile without it) - SynthVoice::getModulationValue, editor control-lock guard - ExactCompare.h naming the deliberate exact float comparisons - KnobLookAndFeel replacing the never-installed SerumLookAndFeel - 55 first-party compiler warnings to 0 - AGENT.md renamed to AGENTS.md across Source/ - graft repository context graph and its hooks - JANITOR_TASKS.md and UI_UX_AUDIT.md records
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <JuceHeader.h>
|
|
#include "Params.h"
|
|
#include "Filter.h"
|
|
|
|
namespace serum
|
|
{
|
|
|
|
// ===========================================================================
|
|
// Snapshot of the two-slot filter section.
|
|
// ===========================================================================
|
|
struct FilterBankParams
|
|
{
|
|
bool f1On = false, f2On = false;
|
|
int f1Type = 0, f2Type = 0;
|
|
float f1Cutoff = 0.5f, f2Cutoff = 0.5f;
|
|
float f1Res = 0.0f, f2Res = 0.0f;
|
|
float f1Drive = 0.0f, f2Drive = 0.0f;
|
|
float f1Key = 0.0f, f2Key = 0.0f;
|
|
int f1Slope = 2, f2Slope = 2;
|
|
int route = 0;
|
|
float mix = 0.5f;
|
|
float out = 1.0f;
|
|
};
|
|
|
|
// ===========================================================================
|
|
// Two filter slots with serial / parallel / split routing, processed stereo.
|
|
// ===========================================================================
|
|
class FilterBank
|
|
{
|
|
public:
|
|
void prepare (double sampleRate);
|
|
void reset();
|
|
|
|
void process (float* l, float* r, int numSamples, const FilterBankParams& p, float noteHz) noexcept;
|
|
|
|
private:
|
|
Filter f1L, f1R, f2L, f2R;
|
|
|
|
static void applySlot (Filter& f, float* buf, int n, bool on, int type, float cutoff,
|
|
float res, float drive, float key, int slope, float noteHz) noexcept;
|
|
};
|
|
|
|
} // namespace serum
|