Nsound
0.9.4
|
A class for filtering audio in the frequecy domain. More...
#include <Nsound/FilterFlanger.h>
Public Member Functions | |
FilterFlanger (const float64 &sample_rate, const float64 &frequency, const float64 &max_delay_time_seconds) | |
FilterFlanger (const FilterFlanger ©) | |
~FilterFlanger () | |
AudioStream | filter (const AudioStream &x) |
AudioStream | filter (const AudioStream &x, const float64 &frequency) |
AudioStream | filter (const AudioStream &x, const float64 &frequency, const float64 &delay) |
AudioStream | filter (const AudioStream &x, const Buffer &frequency, const Buffer &delay) |
Buffer | filter (const Buffer &x) |
Buffer | filter (const Buffer &x, const float64 &frequency) |
Buffer | filter (const Buffer &x, const float64 &frequency, const float64 &delay) |
Buffer | filter (const Buffer &x, const Buffer &frequency, const Buffer &delay) |
float64 | filter (const float64 &x) |
float64 | filter (const float64 &x, const float64 &frequency) |
float64 | filter (const float64 &x, const float64 &frequency, const float64 &delay) |
FilterFlanger & | operator= (const FilterFlanger &rhs) |
void | plot (boolean show_fc=false, boolean show_phase=false) |
void | reset () |
void | setRealtime (bool flag) |
AudioStream | filter (const AudioStream &x, const Buffer &frequencies) |
Buffer | filter (const Buffer &x, const Buffer &frequencies) |
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 | |
float64 | frequency_ |
float64 | max_delay_ |
FilterDelay * | delay_ |
Generator * | gen_ |
float64 | sample_rate_ |
float64 | two_pi_over_sample_rate_ |
float64 | sample_time_ |
uint32 | kernel_size_ |
bool | is_realtime_ |
A class for filtering audio in the frequecy domain.
Definition at line 49 of file FilterFlanger.h.
FilterFlanger::FilterFlanger | ( | const float64 & | sample_rate, |
const float64 & | frequency, | ||
const float64 & | max_delay_time_seconds | ||
) |
Definition at line 51 of file FilterFlanger.cc.
References delay_, frequency_, gen_, Nsound::Generator::generate(), M_ASSERT_VALUE, max_delay_, and Nsound::Filter::sample_rate_.
FilterFlanger::FilterFlanger | ( | const FilterFlanger & | copy | ) |
Definition at line 76 of file FilterFlanger.cc.
References delay_, gen_, Nsound::Generator::generate(), max_delay_, and Nsound::Filter::sample_rate_.
FilterFlanger::~FilterFlanger | ( | ) |
Definition at line 97 of file FilterFlanger.cc.
AudioStream FilterFlanger::filter | ( | const AudioStream & | x | ) |
Definition at line 105 of file FilterFlanger.cc.
References Nsound::Filter::filter().
Referenced by filter().
AudioStream FilterFlanger::filter | ( | const AudioStream & | x, |
const float64 & | frequency | ||
) |
AudioStream FilterFlanger::filter | ( | const AudioStream & | x, |
const float64 & | frequency, | ||
const float64 & | delay | ||
) |
Definition at line 119 of file FilterFlanger.cc.
References filter(), Nsound::AudioStream::getNChannels(), and Nsound::AudioStream::getSampleRate().
AudioStream FilterFlanger::filter | ( | const AudioStream & | x, |
const Buffer & | frequency, | ||
const Buffer & | delay | ||
) |
Definition at line 138 of file FilterFlanger.cc.
References filter(), Nsound::AudioStream::getNChannels(), and Nsound::AudioStream::getSampleRate().
Definition at line 157 of file FilterFlanger.cc.
References filter(), frequency_, Nsound::Buffer::getLength(), max_delay_, and reset().
Definition at line 175 of file FilterFlanger.cc.
References filter(), Nsound::Buffer::getLength(), max_delay_, and reset().
Definition at line 193 of file FilterFlanger.cc.
References filter(), Nsound::Buffer::getLength(), and reset().
Definition at line 211 of file FilterFlanger.cc.
References Nsound::Buffer::cbegin(), filter(), Nsound::Buffer::getLength(), and reset().
Implements Nsound::Filter.
Definition at line 232 of file FilterFlanger.cc.
References filter(), frequency_, and max_delay_.
Implements Nsound::Filter.
Definition at line 240 of file FilterFlanger.cc.
References filter(), and max_delay_.
float64 FilterFlanger::filter | ( | const float64 & | x, |
const float64 & | frequency, | ||
const float64 & | delay | ||
) |
Definition at line 248 of file FilterFlanger.cc.
References delay_, Nsound::FilterDelay::filter(), gen_, and Nsound::Generator::generate().
FilterFlanger & FilterFlanger::operator= | ( | const FilterFlanger & | rhs | ) |
Definition at line 260 of file FilterFlanger.cc.
References delay_, frequency_, gen_, max_delay_, reset(), and Nsound::Filter::sample_rate_.
Definition at line 280 of file FilterFlanger.cc.
References frequency_, max_delay_, Nsound::Filter::plot(), Nsound::Filter::sample_rate_, Nsound::Plotter::subplot(), and Nsound::Plotter::title().
|
virtual |
Implements Nsound::Filter.
Definition at line 311 of file FilterFlanger.cc.
References delay_, gen_, Nsound::FilterDelay::reset(), and Nsound::Generator::reset().
Referenced by filter(), and operator=().
|
inlineinherited |
|
inherited |
Definition at line 99 of file Filter.cc.
References Nsound::Filter::filter(), Nsound::AudioStream::getNChannels(), Nsound::AudioStream::getSampleRate(), Nsound::Filter::is_realtime_, M_THROW, and Nsound::Filter::reset().
Definition at line 161 of file Filter.cc.
References Nsound::Buffer::begin(), Nsound::Buffer::cbegin(), Nsound::Buffer::end(), Nsound::Filter::filter(), Nsound::Buffer::getLength(), Nsound::Filter::is_realtime_, and Nsound::Filter::reset().
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().
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 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 |
|
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(), plot(), Nsound::FilterBandRejectFIR::plot(), Nsound::FilterBandRejectIIR::plot(), Nsound::FilterBandPassIIR::plot(), and Nsound::FilterParametricEqualizer::plot().
|
protected |
Definition at line 127 of file FilterFlanger.h.
Referenced by filter(), FilterFlanger(), operator=(), and plot().
|
protected |
Definition at line 128 of file FilterFlanger.h.
Referenced by filter(), FilterFlanger(), operator=(), and plot().
|
protected |
Definition at line 129 of file FilterFlanger.h.
Referenced by filter(), FilterFlanger(), operator=(), reset(), and ~FilterFlanger().
|
protected |
Definition at line 130 of file FilterFlanger.h.
Referenced by filter(), FilterFlanger(), operator=(), reset(), and ~FilterFlanger().
|
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(), 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=(), 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(), plot(), Nsound::FilterBandRejectFIR::plot(), Nsound::FilterBandPassIIR::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(), Nsound::FilterBandPassIIR::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().