This commit is contained in:
Armin 2026-08-29 22:55:17 +02:00
commit 517219e035
6 changed files with 733 additions and 110 deletions

View file

@ -135,21 +135,13 @@ void GelykEQAudioProcessor::processBlock(juce::AudioBuffer<float>& buffer, juce:
analyser.push(chans, numChannels > 1 ? 2 : 1, numSamples);
}
// Refresh band coefficients (cheap) from smoothed params each block.
// Refresh band coefficient targets (cheap) from smoothed params each block.
for (int i = 0; i < numBands; ++i)
{
float gain = apvts.getRawParameterValue("gain" + juce::String(i))->load();
float q = apvts.getRawParameterValue("q" + juce::String(i))->load();
float freq = apvts.getRawParameterValue("freq" + juce::String(i))->load();
if (std::abs(gain - bands[i].gainDb) > 0.001f ||
std::abs(q - bands[i].q) > 0.001f ||
std::abs(freq - bands[i].freq) > 0.5f)
{
bands[i].gainDb = gain;
bands[i].q = q;
bands[i].freq = freq;
bands[i].prepare(currentSampleRate, numSamples);
}
bands[i].setTargets(gain, freq, q);
}
juce::dsp::AudioBlock<float> block(buffer);