Skip to content

Commit

Permalink
SVF: make some internal methods and members public (#491)
Browse files Browse the repository at this point in the history
* SVF: make some methods and members public

* No move constructor for ScopedValue
  • Loading branch information
jatinchowdhury18 authored Feb 14, 2024
1 parent d3fa9a5 commit 518de8c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -237,6 +237,7 @@ class StateVariableFilter
}
}

/** Internal use only! */
inline auto processCore (SampleType x, SampleType& s1, SampleType& s2) noexcept
{
const auto v3 = x - s2;
Expand All @@ -251,10 +252,12 @@ class StateVariableFilter
return std::make_tuple (v0, v1, v2);
}

std::vector<SampleType> 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<SampleType> ic1eq, ic2eq; // state variables

NumericType lowpassMult { 0 }, bandpassMult { 0 }, highpassMult { 0 };

Expand Down

0 comments on commit 518de8c

Please sign in to comment.