Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions plugins/LOMM/LOMM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ LOMMEffect::LOMMEffect(Model* parent, const Descriptor::SubPluginFeatures::Key*
m_lp2(m_sampleRate),
m_hp1(m_sampleRate),
m_hp2(m_sampleRate),
m_ap(m_sampleRate),
m_needsUpdate(true),
m_coeffPrecalc(-0.05),
m_crestTimeConst(0.999),
Expand All @@ -67,6 +68,8 @@ LOMMEffect::LOMMEffect(Model* parent, const Descriptor::SubPluginFeatures::Key*
m_yL[1][0] = m_yL[1][1] = LOMM_MIN_FLOOR;
m_yL[2][0] = m_yL[2][1] = LOMM_MIN_FLOOR;

m_ap.setFilterType(BasicFilters<2>::FilterType::AllPass);

connect(Engine::audioEngine(), SIGNAL(sampleRateChanged()), this, SLOT(changeSampleRate()));
emit changeSampleRate();
}
Expand Down Expand Up @@ -117,6 +120,7 @@ bool LOMMEffect::processAudioBuffer(sampleFrame* buf, const fpp_t frames)
{
m_lp1.setLowpass(m_lommControls.m_split1Model.value());
m_hp1.setHighpass(m_lommControls.m_split1Model.value());
m_ap.calcFilterCoeffs(m_lommControls.m_split1Model.value(), 0.70710678118);
}
if (m_needsUpdate || m_lommControls.m_split2Model.isValueChanged())
{
Expand Down Expand Up @@ -224,9 +228,11 @@ bool LOMMEffect::processAudioBuffer(sampleFrame* buf, const fpp_t frames)
float crestFactorValTemp = ((m_crestFactorVal[i] - LOMM_AUTO_TIME_ADJUST) * autoTime) + LOMM_AUTO_TIME_ADJUST;

// Crossover filters
bands[0][i] = m_hp1.update(s[i], i);
bands[1][i] = m_hp2.update(m_lp1.update(s[i], i), i);
bands[2][i] = m_lp2.update(s[i], i);
bands[1][i] = m_hp2.update(s[i], i);
bands[0][i] = m_hp1.update(bands[1][i], i);
bands[1][i] = m_lp1.update(bands[1][i], i);
bands[2][i] = m_ap.update(bands[2][i], i);

if (!split1Enabled)
{
Expand Down
2 changes: 2 additions & 0 deletions plugins/LOMM/LOMM.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ private slots:
StereoLinkwitzRiley m_hp1;
StereoLinkwitzRiley m_hp2;

BasicFilters<2> m_ap;

bool m_needsUpdate;
float m_coeffPrecalc;

Expand Down