From 518de8ccddc201d554b2738e8a85d85100502c39 Mon Sep 17 00:00:00 2001 From: jatinchowdhury18 Date: Wed, 14 Feb 2024 15:32:19 -0800 Subject: [PATCH] SVF: make some internal methods and members public (#491) * SVF: make some methods and members public * No move constructor for ScopedValue --- .../LowerOrderFilters/chowdsp_StateVariableFilter.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/dsp/chowdsp_filters/LowerOrderFilters/chowdsp_StateVariableFilter.h b/modules/dsp/chowdsp_filters/LowerOrderFilters/chowdsp_StateVariableFilter.h index 47659459d..341a6ebab 100644 --- a/modules/dsp/chowdsp_filters/LowerOrderFilters/chowdsp_StateVariableFilter.h +++ b/modules/dsp/chowdsp_filters/LowerOrderFilters/chowdsp_StateVariableFilter.h @@ -202,7 +202,7 @@ class StateVariableFilter return processSampleInternal (inputValue, ic1eq[(size_t) channel], ic2eq[(size_t) channel]); } -private: + /** Internal use only! */ inline auto processSampleInternal (SampleType x, SampleType& s1, SampleType& s2) noexcept { const auto [v0, v1, v2] = processCore (x, s1, s2); @@ -237,6 +237,7 @@ class StateVariableFilter } } + /** Internal use only! */ inline auto processCore (SampleType x, SampleType& s1, SampleType& s2) noexcept { const auto v3 = x - s2; @@ -251,10 +252,12 @@ class StateVariableFilter return std::make_tuple (v0, v1, v2); } + std::vector ic1eq, ic2eq; // state variables + +private: SampleType cutoffFrequency, resonance, gain; // parameters SampleType g0, k0, A, sqrtA; // parameter intermediate values SampleType a1, a2, a3, ak, k0A, Asq; // coefficients - std::vector ic1eq, ic2eq; // state variables NumericType lowpassMult { 0 }, bandpassMult { 0 }, highpassMult { 0 };