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
29 lines
722 B
C++
29 lines
722 B
C++
#pragma once
|
|
|
|
#include <JuceHeader.h>
|
|
#include "Params.h"
|
|
|
|
namespace serum
|
|
{
|
|
|
|
// ===========================================================================
|
|
// Simple sub oscillator: sine or triangle, one/two octaves down or unison.
|
|
// ===========================================================================
|
|
class SubOscillator
|
|
{
|
|
public:
|
|
void prepare (double sampleRate) { sr = sampleRate; phase = 0.0; }
|
|
void reset() { phase = 0.0; }
|
|
|
|
void noteOn();
|
|
|
|
// Accumulate into out (mono; the caller pans/levels it).
|
|
void processAdd (double freqHz, int shape, float level, float& out) noexcept;
|
|
|
|
private:
|
|
double sr = 44100.0;
|
|
double phase = 0.0;
|
|
};
|
|
|
|
} // namespace serum
|