1 #ifndef FILTER_SPLITTER_H
2 #define FILTER_SPLITTER_H
9 /* Band splitter. Splits a signal into two phase-matching frequency bands. */
10 template<typename Real
>
18 BandSplitterR() = default;
19 BandSplitterR(const BandSplitterR
&) = default;
20 BandSplitterR(Real f0norm
) { init(f0norm
); }
22 void init(Real f0norm
);
23 void clear() noexcept
{ mLpZ1
= mLpZ2
= mApZ1
= 0.0f
; }
24 void process(const al::span
<const Real
> input
, Real
*hpout
, Real
*lpout
);
26 void processHfScale(const al::span
<Real
> samples
, const Real hfscale
);
28 /* The all-pass portion of the band splitter. Applies the same phase shift
29 * without splitting the signal. Note that each use of this method is
30 * indepedent, it does not track history between calls.
32 void applyAllpass(const al::span
<Real
> samples
) const;
34 using BandSplitter
= BandSplitterR
<float>;
36 #endif /* FILTER_SPLITTER_H */