1 #ifndef CORE_FILTERS_SPLITTER_H
2 #define CORE_FILTERS_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); }
21 BandSplitterR& operator=(const BandSplitterR&) = default;
23 void init(Real f0norm);
24 void clear() noexcept { mLpZ1 = mLpZ2 = mApZ1 = 0.0f; }
25 void process(const al::span<const Real> input, Real *hpout, Real *lpout);
27 void processHfScale(const al::span<const Real> input, Real *output, const Real hfscale);
29 void processHfScale(const al::span<Real> samples, const Real hfscale);
30 void processScale(const al::span<Real> samples, const Real hfscale, const Real lfscale);
33 * The all-pass portion of the band splitter. Applies the same phase shift
34 * without splitting or scaling the signal.
36 void processAllPass(const al::span<Real> samples);
38 using BandSplitter = BandSplitterR<float>;
40 #endif /* CORE_FILTERS_SPLITTER_H */