Nsound
0.9.4
|
#include <Nsound/FilterHighPassFIR.h>
Public Member Functions | |
FilterHighPassFIR (const float64 &sample_rate, uint32 kernel_size, const float64 &cutoff_frequency_Hz) | |
virtual | ~FilterHighPassFIR () |
AudioStream | filter (const AudioStream &x) |
AudioStream | filter (const AudioStream &x, const float64 &frequency) |
AudioStream | filter (const AudioStream &x, const Buffer &frequencies) |
Buffer | filter (const Buffer &x) |
Buffer | filter (const Buffer &x, const float64 &frequency) |
Buffer | filter (const Buffer &x, const Buffer &frequencies) |
virtual float64 | filter (const float64 &x) |
virtual float64 | filter (const float64 &x, const float64 &frequency_Hz) |
float64 | getFrequency () const |
Buffer | getImpulseResponse () |
void | makeKernel (const float64 &frequency) |
void | plot (boolean show_fc=true, boolean show_phase=false) |
virtual void | reset () |
Buffer | getImpulseResponse (const uint32 n_samples=8192) |
void | plot (boolean show_phase=false) |
void | setCutoff (const float64 &fc) |
Sets the cut off frequency (Hz). More... | |
void | setRealtime (bool flag) |
Buffer | getFrequencyAxis (const uint32 n_fft=8192) |
Buffer | getFrequencyResponse (const uint32 n_fft=8192) |
virtual uint32 | getKernelSize () const |
Buffer | getPhaseResponse () |
float64 | getSampleRate () const |
Protected Types | |
typedef std::set< Kernel > | KernelCache |
Protected Member Functions | |
void | spectraReversal_ () |
Definition at line 42 of file FilterHighPassFIR.h.
|
protectedinherited |
Definition at line 126 of file FilterLowPassFIR.h.
FilterHighPassFIR::FilterHighPassFIR | ( | const float64 & | sample_rate, |
uint32 | kernel_size, | ||
const float64 & | cutoff_frequency_Hz | ||
) |
Definition at line 46 of file FilterHighPassFIR.cc.
References Nsound::FilterLowPassFIR::frequency_1_Hz_, and reset().
|
virtual |
Definition at line 60 of file FilterHighPassFIR.cc.
References hp_cache_.
AudioStream FilterHighPassFIR::filter | ( | const AudioStream & | x | ) |
Definition at line 74 of file FilterHighPassFIR.cc.
References Nsound::Filter::filter().
Referenced by Nsound::FilterBandPassFIR::filter(), and main().
AudioStream FilterHighPassFIR::filter | ( | const AudioStream & | x, |
const float64 & | frequency | ||
) |
AudioStream FilterHighPassFIR::filter | ( | const AudioStream & | x, |
const Buffer & | frequencies | ||
) |
Definition at line 102 of file FilterHighPassFIR.cc.
References Nsound::Buffer::begin(), Nsound::Buffer::end(), Nsound::FilterLowPassFIR::filter(), makeKernel(), and reset().
Reimplemented from Nsound::FilterLowPassFIR.
Reimplemented in Nsound::FilterBandRejectFIR.
Definition at line 132 of file FilterHighPassFIR.cc.
References Nsound::FilterLowPassFIR::filter().
Implements Nsound::Filter.
Reimplemented in Nsound::FilterBandRejectFIR.
Definition at line 139 of file FilterHighPassFIR.cc.
References Nsound::FilterLowPassFIR::filter(), and makeKernel().
|
inline |
Definition at line 80 of file FilterHighPassFIR.h.
References Nsound::FilterLowPassFIR::frequency_1_Hz_.
Referenced by Nsound::FilterBandPassFIR::getFrequencyLow(), and Nsound::FilterBandPassFIR::plot().
Buffer FilterHighPassFIR::getImpulseResponse | ( | ) |
Definition at line 147 of file FilterHighPassFIR.cc.
References Nsound::Filter::getImpulseResponse().
void FilterHighPassFIR::makeKernel | ( | const float64 & | frequency | ) |
Definition at line 154 of file FilterHighPassFIR.cc.
References Nsound::FilterLowPassFIR::b_, Nsound::FilterLowPassFIR::Kernel::b_, hp_cache_, Nsound::Filter::kernel_size_, Nsound::FilterLowPassFIR::makeKernel(), Nsound::Filter::sample_rate_, and spectraReversal_().
Referenced by filter(), Nsound::FilterBandRejectFIR::makeKernel(), and reset().
Definition at line 211 of file FilterHighPassFIR.cc.
References Nsound::Plotter::axvline(), Nsound::FilterLowPassFIR::frequency_1_Hz_, Nsound::Filter::kernel_size_, Nsound::Filter::plot(), Nsound::Filter::sample_rate_, Nsound::Plotter::subplot(), and Nsound::Plotter::title().
Referenced by main().
|
virtual |
Resets interal history buffer and sets the cut off frequency to the one used at declaration.
Implements Nsound::Filter.
Reimplemented in Nsound::FilterBandRejectFIR.
Definition at line 245 of file FilterHighPassFIR.cc.
References Nsound::FilterLowPassFIR::frequency_1_Hz_, Nsound::Filter::kernel_size_, makeKernel(), Nsound::FilterLowPassFIR::x_history_, and Nsound::FilterLowPassFIR::x_ptr_.
Referenced by filter(), FilterHighPassFIR(), and Nsound::FilterBandPassFIR::reset().
|
protected |
Definition at line 258 of file FilterHighPassFIR.cc.
References Nsound::FilterLowPassFIR::b_, and Nsound::Filter::kernel_size_.
Referenced by makeKernel().
Definition at line 225 of file Filter.cc.
References Nsound::Filter::filter(), Nsound::Filter::is_realtime_, and Nsound::Filter::reset().
Referenced by Nsound::Filter::getFrequencyResponse(), getImpulseResponse(), Nsound::FilterLowPassFIR::getImpulseResponse(), Nsound::FilterLeastSquaresFIR::getImpulseResponse(), Nsound::FilterIIR::getImpulseResponse(), and Nsound::Filter::getPhaseResponse().
|
inherited |
Definition at line 262 of file Filter.cc.
References Nsound::Plotter::figure(), Nsound::Buffer::getdB(), Nsound::Filter::getFrequencyAxis(), Nsound::Filter::getFrequencyResponse(), Nsound::Buffer::getMax(), Nsound::Filter::getPhaseResponse(), Nsound::Plotter::plot(), Nsound::Plotter::subplot(), Nsound::Plotter::xlabel(), Nsound::Plotter::ylabel(), and Nsound::Plotter::ylim().
Referenced by main(), Nsound::FilterLowPassMoogVcf::plot(), Nsound::FilterPhaser::plot(), Nsound::FilterTone::plot(), Nsound::FilterHighPassIIR::plot(), Nsound::FilterCombLowPassFeedback::plot(), Nsound::FilterLowPassIIR::plot(), Nsound::FilterLowPassFIR::plot(), plot(), Nsound::FilterAllPass::plot(), Nsound::FilterBandPassVocoder::plot(), Nsound::FilterBandPassFIR::plot(), Nsound::FilterLeastSquaresFIR::plot(), Nsound::FilterFlanger::plot(), Nsound::FilterBandRejectFIR::plot(), Nsound::FilterBandPassIIR::plot(), Nsound::FilterBandRejectIIR::plot(), and Nsound::FilterParametricEqualizer::plot().
|
inherited |
Sets the cut off frequency (Hz).
Definition at line 366 of file FilterLowPassFIR.cc.
References Nsound::FilterLowPassFIR::frequency_1_Hz_, and Nsound::FilterLowPassFIR::reset().
|
inlineinherited |
Definition at line 185 of file Filter.cc.
References Nsound::FFTransform::roundUp2(), and Nsound::Filter::sample_rate_.
Referenced by main(), Nsound::Filter::plot(), and Nsound::FilterIIR::savePlot().
Definition at line 210 of file Filter.cc.
References Nsound::FFTransform::fft(), Nsound::Filter::getImpulseResponse(), and Nsound::Filter::sample_rate_.
Referenced by Nsound::FilterBandPassIIR::FilterBandPassIIR(), FilterLeastSquaresFIR_UnitTest(), Nsound::FilterIIR::getRMS(), main(), Nsound::Filter::plot(), and Nsound::FilterIIR::savePlot().
|
inlinevirtualinherited |
Reimplemented in Nsound::FilterIIR, and Nsound::FilterTone.
Definition at line 96 of file Filter.h.
References Nsound::Filter::kernel_size_.
Referenced by Nsound::FilterBandPassIIR::FilterBandPassIIR(), Nsound::FilterBandPassFIR::plot(), Nsound::FilterBandPassIIR::plot(), and Nsound::FilterBandRejectIIR::plot().
|
inherited |
Definition at line 245 of file Filter.cc.
References Nsound::FFTransform::fft(), Nsound::Filter::getImpulseResponse(), Nsound::Buffer::getLength(), Nsound::Filter::sample_rate_, and Nsound::Buffer::subbuffer().
Referenced by Nsound::Filter::plot().
|
inlineinherited |
|
protected |
Definition at line 99 of file FilterHighPassFIR.h.
Referenced by makeKernel(), and ~FilterHighPassFIR().
|
protectedinherited |
Definition at line 104 of file FilterLowPassFIR.h.
Referenced by Nsound::FilterLowPassFIR::filter(), makeKernel(), Nsound::FilterLowPassFIR::makeKernel(), Nsound::FilterBandRejectFIR::makeKernel(), and spectraReversal_().
|
protectedinherited |
Definition at line 105 of file FilterLowPassFIR.h.
Referenced by Nsound::FilterLowPassFIR::FilterLowPassFIR(), Nsound::FilterLowPassFIR::makeKernel(), and Nsound::FilterLowPassFIR::~FilterLowPassFIR().
|
protectedinherited |
Definition at line 108 of file FilterLowPassFIR.h.
Referenced by Nsound::FilterLowPassFIR::filter(), Nsound::FilterLowPassFIR::FilterLowPassFIR(), Nsound::FilterLowPassFIR::reset(), reset(), and Nsound::FilterLowPassFIR::~FilterLowPassFIR().
|
protectedinherited |
Definition at line 109 of file FilterLowPassFIR.h.
Referenced by Nsound::FilterLowPassFIR::filter(), Nsound::FilterLowPassFIR::FilterLowPassFIR(), Nsound::FilterLowPassFIR::reset(), and reset().
|
protectedinherited |
Definition at line 110 of file FilterLowPassFIR.h.
Referenced by Nsound::FilterLowPassFIR::filter(), and Nsound::FilterLowPassFIR::FilterLowPassFIR().
|
protectedinherited |
Definition at line 112 of file FilterLowPassFIR.h.
Referenced by Nsound::FilterBandRejectFIR::FilterBandRejectFIR(), FilterHighPassFIR(), getFrequency(), Nsound::FilterLowPassFIR::getFrequency(), Nsound::FilterBandRejectFIR::getFrequencyLow(), Nsound::FilterLowPassFIR::plot(), plot(), Nsound::FilterBandRejectFIR::plot(), Nsound::FilterLowPassFIR::reset(), reset(), Nsound::FilterBandRejectFIR::reset(), and Nsound::FilterLowPassFIR::setCutoff().
|
protectedinherited |
Definition at line 128 of file FilterLowPassFIR.h.
Referenced by Nsound::FilterLowPassFIR::makeKernel(), and Nsound::FilterLowPassFIR::~FilterLowPassFIR().
|
protectedinherited |
Definition at line 113 of file Filter.h.
Referenced by Nsound::FilterPhaser::filter(), Nsound::FilterCombLowPassFeedback::filter(), Nsound::FilterDelay::filter(), Nsound::FilterAllPass::FilterAllPass(), Nsound::FilterCombLowPassFeedback::FilterCombLowPassFeedback(), Nsound::FilterDelay::FilterDelay(), Nsound::FilterFlanger::FilterFlanger(), Nsound::FilterPhaser::FilterPhaser(), Nsound::FilterSlinky::FilterSlinky(), Nsound::Filter::getFrequencyAxis(), Nsound::Filter::getFrequencyResponse(), Nsound::Filter::getPhaseResponse(), Nsound::Filter::getSampleRate(), Nsound::FilterStageIIR::makeIIRKernelHelper(), makeKernel(), Nsound::FilterStageIIR::makeKernel(), Nsound::FilterBandPassVocoder::makeKernel(), Nsound::FilterLeastSquaresFIR::makeKernel(), Nsound::FilterParametricEqualizer::makeKernel(), Nsound::FilterPhaser::operator=(), Nsound::FilterLeastSquaresFIR::operator=(), Nsound::FilterFlanger::operator=(), Nsound::FilterIIR::operator=(), Nsound::FilterLowPassMoogVcf::plot(), Nsound::FilterPhaser::plot(), Nsound::FilterTone::plot(), Nsound::FilterHighPassIIR::plot(), Nsound::FilterLowPassIIR::plot(), Nsound::FilterCombLowPassFeedback::plot(), Nsound::FilterLowPassFIR::plot(), plot(), Nsound::FilterAllPass::plot(), Nsound::FilterBandPassFIR::plot(), Nsound::FilterLeastSquaresFIR::plot(), Nsound::FilterFlanger::plot(), Nsound::FilterBandRejectFIR::plot(), Nsound::FilterBandRejectIIR::plot(), Nsound::FilterBandPassIIR::plot(), Nsound::FilterParametricEqualizer::plot(), Nsound::FilterLowPassIIR::setCutoff(), and Nsound::FilterLeastSquaresFIR::setWindow().
|
protectedinherited |
Definition at line 114 of file Filter.h.
Referenced by Nsound::FilterTone::makeKernel(), Nsound::FilterLowPassFIR::makeKernel(), and Nsound::FilterParametricEqualizer::makeKernel().
|
protectedinherited |
Definition at line 115 of file Filter.h.
Referenced by Nsound::FilterLowPassMoogVcf::_make_filter().
|
protectedinherited |
Definition at line 116 of file Filter.h.
Referenced by Nsound::FilterLowPassFIR::filter(), Nsound::FilterLeastSquaresFIR::filter(), Nsound::FilterBandPassFIR::FilterBandPassFIR(), Nsound::FilterBandPassIIR::FilterBandPassIIR(), Nsound::FilterBandRejectIIR::FilterBandRejectIIR(), Nsound::FilterHighPassIIR::FilterHighPassIIR(), Nsound::FilterLeastSquaresFIR::FilterLeastSquaresFIR(), Nsound::FilterLowPassFIR::FilterLowPassFIR(), Nsound::FilterLowPassIIR::FilterLowPassIIR(), Nsound::FilterLeastSquaresFIR::getKernel(), Nsound::Filter::getKernelSize(), makeKernel(), Nsound::FilterLowPassFIR::makeKernel(), Nsound::FilterBandRejectFIR::makeKernel(), Nsound::FilterLeastSquaresFIR::makeKernel(), Nsound::FilterLeastSquaresFIR::operator=(), Nsound::FilterLowPassFIR::plot(), plot(), Nsound::FilterLeastSquaresFIR::plot(), Nsound::FilterBandRejectFIR::plot(), Nsound::FilterLowPassFIR::reset(), reset(), Nsound::FilterLeastSquaresFIR::reset(), Nsound::FilterLeastSquaresFIR::setKernel(), Nsound::FilterLeastSquaresFIR::setWindow(), and spectraReversal_().
|
protectedinherited |
Definition at line 118 of file Filter.h.
Referenced by Nsound::Filter::filter(), Nsound::FilterBandRejectIIR::filter(), Nsound::FilterBandRejectFIR::filter(), Nsound::Filter::getImpulseResponse(), and Nsound::Filter::setRealtime().