chore: land janitor round 1 and graft integration
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
This commit is contained in:
1 parent
5c942cad0c
commit
e4cea300db
63 files changed
+2360
-805
No files matched your search
@@ -3,12 +3,8 @@
|
||||
namespace serum
|
||||
{
|
||||
|
||||
void SubOscillator::noteOn (double freqHz, int octaveShift)
|
||||
void SubOscillator::noteOn()
|
||||
{
|
||||
// octaveShift: -2, -1 or 0 (from the subOct param).
|
||||
const double mult = (octaveShift == -2) ? 0.25 : (octaveShift == -1) ? 0.5 : 1.0;
|
||||
(void) freqHz;
|
||||
(void) mult;
|
||||
phase = 0.0;
|
||||
}
|
||||
|
||||
@@ -18,14 +14,14 @@ void SubOscillator::processAdd (double freqHz, int shape, float level, float& ou
|
||||
return;
|
||||
|
||||
// The octave shift is baked into freqHz by the voice; here we just phase-accumulate.
|
||||
const double inc = kTwoPi * freqHz / sr;
|
||||
const double inc = juce::MathConstants<double>::twoPi * freqHz / sr;
|
||||
phase += inc;
|
||||
phase -= std::floor (phase * (1.0 / kTwoPi)) * kTwoPi;
|
||||
phase -= std::floor (phase * (1.0 / juce::MathConstants<double>::twoPi)) * juce::MathConstants<double>::twoPi;
|
||||
|
||||
float s = 0.0f;
|
||||
if (shape == (int) SubShape::Triangle)
|
||||
{
|
||||
const float p = (float) (phase * (1.0 / kTwoPi));
|
||||
const float p = (float) (phase * (1.0 / juce::MathConstants<double>::twoPi));
|
||||
s = 1.0f - 4.0f * std::abs (p - 0.5f);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user