add per-oscillator coarse tune (ctune1/ctune2); add blueprint image

This commit is contained in:
Armin 2026-09-16 14:54:58 +02:00
commit 21aac2d355
8 changed files with 35 additions and 10 deletions

View file

@ -220,6 +220,8 @@ void SynthEngine::render (const VParams& p, float* left, float* right, int num)
const float detuneRatio2 = std::exp2f (p.detune / 1200.0f);
const float detuneRatio1 = std::exp2f (p.detune1 / 1200.0f);
const float tuneRatio = std::exp2f (p.tune / 12.0f);
const float ctuneRatio1 = std::exp2f (p.ctune1 / 12.0f);
const float ctuneRatio2 = std::exp2f (p.ctune2 / 12.0f);
const float maxFc = 0.4f * (float) sr;
const float minFc = 30.0f;
@ -299,10 +301,10 @@ void SynthEngine::render (const VParams& p, float* left, float* right, int num)
bendSmooth += (bendCents - bendSmooth) * 0.08f;
freq *= std::exp2f (bendSmooth / 1200.0f);
const float d1 = (float) (freq / sr) * detuneRatio1 * std::exp2f (v.dtSp / 1200.0f);
const float d1 = (float) (freq / sr) * detuneRatio1 * ctuneRatio1 * std::exp2f (v.dtSp / 1200.0f);
// soundscape detune sway: osc2 slowly zooms its detune in/out
const float swayT = std::exp2f (evoSlow * p.evolve * 16.0f / 1200.0f);
const float d2 = (float) (freq / sr) * detuneRatio2 * swayT;
const float d2 = (float) (freq / sr) * detuneRatio2 * ctuneRatio2 * swayT;
v.ph1 += d1; if (v.ph1 >= 1.0) v.ph1 -= 1.0;
v.ph1r += d1;