mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
DSP: Solved an issue with FilterDesign::designFIRLowpassHalfBandEquirippleMethod for low amplitudedB and normalisationTransitionWidth close to 0.5
This commit is contained in:
parent
b0c8917430
commit
b2e49bc7e8
1 changed files with 7 additions and 2 deletions
|
|
@ -279,9 +279,14 @@ typename FIR::Coefficients<FloatType>::Ptr
|
|||
else
|
||||
{
|
||||
auto w01 = std::sqrt (kp * kp + (1 - kp * kp) * std::pow (std::cos (MathConstants<double>::pi / (2.0 * n + 1.0)), 2.0));
|
||||
auto om01 = std::acos (-w01);
|
||||
|
||||
NN = -2.0 * result->getMagnitudeForFrequency (om01 / MathConstants<double>::twoPi, 1.0);
|
||||
if (std::abs (w01) <= 1.0)
|
||||
{
|
||||
auto om01 = std::acos (-w01);
|
||||
NN = -2.0 * result->getMagnitudeForFrequency (om01 / MathConstants<double>::twoPi, 1.0);
|
||||
}
|
||||
else
|
||||
NN = 2.0 * result->getMagnitudeForFrequency (0.5, 1.0);
|
||||
}
|
||||
|
||||
for (int i = 0; i < hh.size(); ++i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue