Nsound
0.9.4
|
#include <Nsound/FilterBandPassIIR.h>
Public Member Functions | |
FilterBandPassIIR (const float64 &sample_rate, uint32 kernel_size, const float64 &frequency_Hz_low, const float64 &frequency_Hz_high, const float64 &percent_ripple=0.0) | |
virtual | ~FilterBandPassIIR () |
float64 | getFrequencyLow () const |
float64 | getFrequencyHigh () const |
AudioStream | filter (const AudioStream &x) |
AudioStream | filter (const AudioStream &x, const float64 &f) |
AudioStream | filter (const AudioStream &x, const Buffer &frequencies) |
AudioStream | filter (const AudioStream &x, const float64 &f_low, const float64 &f_high) |
AudioStream | filter (const AudioStream &x, const Buffer &low_frequencies, const Buffer &high_frequencies) |
Buffer | filter (const Buffer &x) |
Buffer | filter (const Buffer &x, const float64 &f) |
Buffer | filter (const Buffer &x, const Buffer &frequencies) |
Buffer | filter (const Buffer &x, const float64 &f_low, const float64 &f_high) |
Buffer | filter (const Buffer &x, const Buffer &frequencies_Hz_low, const Buffer &frequencies_Hz_high) |
virtual float64 | filter (const float64 &x) |
virtual float64 | filter (const float64 &x, const float64 &frequency_Hz) |
virtual float64 | filter (const float64 &x, const float64 &frequency_Hz_low, const float64 &frequency_Hz_high) |
void | plot (boolean show_fc=true, boolean show_phase=false) |
void | reset () |
void | setRealtime (bool flag) |
Buffer | getFrequencyAxis (const uint32 n_fft=8192) |
Buffer | getFrequencyResponse (const uint32 n_fft=8192) |
Buffer | getImpulseResponse (const uint32 n_samples=8192) |
virtual uint32 | getKernelSize () const |
Buffer | getPhaseResponse () |
float64 | getSampleRate () const |
void | plot (boolean show_phase=false) |
Protected Attributes | |
FilterLowPassIIR * | low_ |
FilterHighPassIIR * | high_ |
float64 | gain_ |
float64 | sample_rate_ |
float64 | two_pi_over_sample_rate_ |
float64 | sample_time_ |
uint32 | kernel_size_ |
bool | is_realtime_ |
Private Member Functions | |
FilterBandPassIIR (const FilterBandPassIIR ©) | |
FilterBandPassIIR & | operator= (const FilterBandPassIIR &rhs) |
Definition at line 49 of file FilterBandPassIIR.h.
FilterBandPassIIR::FilterBandPassIIR | ( | const float64 & | sample_rate, |
uint32 | kernel_size, | ||
const float64 & | frequency_Hz_low, | ||
const float64 & | frequency_Hz_high, | ||
const float64 & | percent_ripple = 0.0 |
||
) |
Definition at line 50 of file FilterBandPassIIR.cc.
References gain_, Nsound::Filter::getFrequencyResponse(), Nsound::Filter::getKernelSize(), Nsound::Buffer::getMax(), Nsound::Filter::kernel_size_, low_, and reset().
|
virtual |
Definition at line 81 of file FilterBandPassIIR.cc.
|
private |
float64 FilterBandPassIIR::getFrequencyLow | ( | ) | const |
Definition at line 89 of file FilterBandPassIIR.cc.
References Nsound::FilterHighPassIIR::getFrequency(), and high_.
float64 FilterBandPassIIR::getFrequencyHigh | ( | ) | const |
Definition at line 96 of file FilterBandPassIIR.cc.
References Nsound::FilterLowPassIIR::getFrequency(), and low_.
AudioStream FilterBandPassIIR::filter | ( | const AudioStream & | x | ) |
Definition at line 103 of file FilterBandPassIIR.cc.
References Nsound::Filter::filter().
Referenced by main(), my_main(), and Nsound::GuitarBass::play().
AudioStream FilterBandPassIIR::filter | ( | const AudioStream & | x, |
const float64 & | f | ||
) |
AudioStream FilterBandPassIIR::filter | ( | const AudioStream & | x, |
const Buffer & | frequencies | ||
) |
AudioStream FilterBandPassIIR::filter | ( | const AudioStream & | x, |
const float64 & | f_low, | ||
const float64 & | f_high | ||
) |
Definition at line 124 of file FilterBandPassIIR.cc.
References Nsound::FilterHighPassIIR::filter(), Nsound::FilterLowPassIIR::filter(), high_, and low_.
AudioStream FilterBandPassIIR::filter | ( | const AudioStream & | x, |
const Buffer & | low_frequencies, | ||
const Buffer & | high_frequencies | ||
) |
Definition at line 131 of file FilterBandPassIIR.cc.
References Nsound::FilterHighPassIIR::filter(), Nsound::FilterLowPassIIR::filter(), high_, and low_.
Buffer FilterBandPassIIR::filter | ( | const Buffer & | x, |
const float64 & | f_low, | ||
const float64 & | f_high | ||
) |
Definition at line 162 of file FilterBandPassIIR.cc.
References Nsound::FilterHighPassIIR::filter(), Nsound::FilterLowPassIIR::filter(), high_, and low_.
Buffer FilterBandPassIIR::filter | ( | const Buffer & | x, |
const Buffer & | frequencies_Hz_low, | ||
const Buffer & | frequencies_Hz_high | ||
) |
Definition at line 169 of file FilterBandPassIIR.cc.
References Nsound::FilterHighPassIIR::filter(), Nsound::FilterLowPassIIR::filter(), high_, and low_.
Implements Nsound::Filter.
Definition at line 179 of file FilterBandPassIIR.cc.
References Nsound::FilterHighPassIIR::filter(), Nsound::FilterLowPassIIR::filter(), gain_, high_, and low_.
Implements Nsound::Filter.
Definition at line 186 of file FilterBandPassIIR.cc.
References Nsound::FilterHighPassIIR::filter(), Nsound::FilterLowPassIIR::filter(), gain_, high_, and low_.
|
virtual |
Definition at line 193 of file FilterBandPassIIR.cc.
References Nsound::FilterHighPassIIR::filter(), Nsound::FilterLowPassIIR::filter(), gain_, high_, and low_.
Definition at line 204 of file FilterBandPassIIR.cc.
References Nsound::FilterHighPassIIR::getFrequency(), Nsound::FilterLowPassIIR::getFrequency(), Nsound::Filter::getKernelSize(), high_, low_, Nsound::Filter::plot(), and Nsound::Filter::sample_rate_.
Referenced by main().
|
virtual |
Resets interal history buffer and sets the cut off frequency to the one used at declaration.
Implements Nsound::Filter.
Definition at line 239 of file FilterBandPassIIR.cc.
References high_, low_, Nsound::FilterHighPassIIR::reset(), and Nsound::FilterLowPassIIR::reset().
Referenced by FilterBandPassIIR().
|
private |
|
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 FilterBandPassIIR(), FilterLeastSquaresFIR_UnitTest(), Nsound::FilterIIR::getRMS(), main(), Nsound::Filter::plot(), and Nsound::FilterIIR::savePlot().
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(), Nsound::FilterHighPassFIR::getImpulseResponse(), Nsound::FilterLowPassFIR::getImpulseResponse(), Nsound::FilterLeastSquaresFIR::getImpulseResponse(), Nsound::FilterIIR::getImpulseResponse(), and Nsound::Filter::getPhaseResponse().
|
inlinevirtualinherited |
Reimplemented in Nsound::FilterIIR, and Nsound::FilterTone.
Definition at line 96 of file Filter.h.
References Nsound::Filter::kernel_size_.
Referenced by FilterBandPassIIR(), Nsound::FilterBandPassFIR::plot(), 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 |
|
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(), Nsound::FilterHighPassFIR::plot(), Nsound::FilterAllPass::plot(), Nsound::FilterBandPassVocoder::plot(), Nsound::FilterBandPassFIR::plot(), Nsound::FilterLeastSquaresFIR::plot(), Nsound::FilterFlanger::plot(), Nsound::FilterBandRejectFIR::plot(), Nsound::FilterBandRejectIIR::plot(), plot(), and Nsound::FilterParametricEqualizer::plot().
|
protected |
Definition at line 135 of file FilterBandPassIIR.h.
Referenced by filter(), FilterBandPassIIR(), getFrequencyHigh(), plot(), reset(), and ~FilterBandPassIIR().
|
protected |
Definition at line 136 of file FilterBandPassIIR.h.
Referenced by filter(), getFrequencyLow(), plot(), reset(), and ~FilterBandPassIIR().
|
protected |
Definition at line 137 of file FilterBandPassIIR.h.
Referenced by filter(), and FilterBandPassIIR().
|
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(), Nsound::FilterHighPassFIR::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::FilterCombLowPassFeedback::plot(), Nsound::FilterLowPassIIR::plot(), Nsound::FilterLowPassFIR::plot(), Nsound::FilterAllPass::plot(), Nsound::FilterHighPassFIR::plot(), Nsound::FilterBandPassFIR::plot(), Nsound::FilterLeastSquaresFIR::plot(), Nsound::FilterFlanger::plot(), Nsound::FilterBandRejectFIR::plot(), plot(), Nsound::FilterBandRejectIIR::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(), FilterBandPassIIR(), Nsound::FilterBandRejectIIR::FilterBandRejectIIR(), Nsound::FilterHighPassIIR::FilterHighPassIIR(), Nsound::FilterLeastSquaresFIR::FilterLeastSquaresFIR(), Nsound::FilterLowPassFIR::FilterLowPassFIR(), Nsound::FilterLowPassIIR::FilterLowPassIIR(), Nsound::FilterLeastSquaresFIR::getKernel(), Nsound::Filter::getKernelSize(), Nsound::FilterHighPassFIR::makeKernel(), Nsound::FilterLowPassFIR::makeKernel(), Nsound::FilterBandRejectFIR::makeKernel(), Nsound::FilterLeastSquaresFIR::makeKernel(), Nsound::FilterLeastSquaresFIR::operator=(), Nsound::FilterLowPassFIR::plot(), Nsound::FilterHighPassFIR::plot(), Nsound::FilterLeastSquaresFIR::plot(), Nsound::FilterBandRejectFIR::plot(), Nsound::FilterLowPassFIR::reset(), Nsound::FilterHighPassFIR::reset(), Nsound::FilterLeastSquaresFIR::reset(), Nsound::FilterLeastSquaresFIR::setKernel(), Nsound::FilterLeastSquaresFIR::setWindow(), and Nsound::FilterHighPassFIR::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().