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

@ -45,6 +45,7 @@ int getPatchIndex() const noexcept { return patchIndex; }
private:
void processMidi (juce::MidiBuffer&, const VParams&);
void smoothGain (juce::AudioBuffer<float>& buffer, float targetVol);
juce::AudioProcessorValueTreeState::ParameterLayout createParams();
@ -58,6 +59,7 @@ private:
juce::uint32 lastMidi = 0;
float cpu = 0.0f;
float dcL = 0.0f, dcR = 0.0f, dcPrevL = 0.0f, dcPrevR = 0.0f;
float volSmooth = 1.0f;
juce::AudioBuffer<float> osBuf; // internal 2x oversample target (HQ mode)
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RMX19AudioProcessor)