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