Smooth MIDI CC parameter changes per-sample to avoid stepped/zippery fast knob rotation

This commit is contained in:
Armin 2026-09-08 16:29:47 +02:00
commit 51a6944326
4 changed files with 77 additions and 18 deletions

View file

@ -112,6 +112,8 @@ public:
int activeVoices() const noexcept { return active; }
private:
void glideParams (VParams& sp, const VParams& tgt, float k);
struct Voice
{
bool active = false;
@ -134,6 +136,8 @@ private:
int active = 0;
int polyLimit = 16;
float mod = 0.0f, bendCents = 0.0f, bendSmooth = 0.0f;
VParams sv; // smoothed parameter values (per-sample glide)
bool svValid = false;
bool pedal = false;
float lastNoteFreq = 440.0f, lastGlide = 0.0f, lastPan = 0.0f;
int stealIdx = 0;