mirror of
https://codeberg.org/armin/gelyk.git
synced 2026-10-11 17:01:53 +02:00
init
This commit is contained in:
parent
b2b64fb26e
commit
517219e035
6 changed files with 733 additions and 110 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue