43 using namespace Nsound;
54 const float64 & max_delay_time_seconds)
57 frequency_(frequency),
58 max_delay_(max_delay_time_seconds),
79 frequency_(copy.frequency_),
80 max_delay_(copy.max_delay_),
128 for(
uint32 channel = 0; channel < n_channels; ++channel)
130 y[channel] =
filter(x[channel], frequency, delay);
147 for(
uint32 channel = 0; channel < n_channels; ++channel)
149 y[channel] =
filter(x[channel], frequency, delay);
165 for(
uint32 i = 0; i < x_samples; ++i)
183 for(
uint32 i = 0; i < x_samples; ++i)
201 for(
uint32 i = 0; i < x_samples; ++i)
203 y <<
filter(x[i], frequency, delay);
222 for(
uint32 i = 0; i < x_samples; ++i)
224 y <<
filter(x[i], *f, *d);
280 plot(
boolean show_fc,
boolean show_phase)
284 "Flanger Frequency Response\n"
285 "sr = %0.1f Hz, f = %0.1f Hz, delay = %0.3f ms",
#define M_ASSERT_VALUE(a, op, value)
FilterFlanger(const float64 &sample_rate, const float64 &frequency, const float64 &max_delay_time_seconds)
void plot(boolean show_fc=false, boolean show_phase=false)
AudioStream filter(const AudioStream &x)
float64 getSampleRate() const
Returns the sample rate of the stream.
void title(const std::string &title, const std::string &kwargs="")
Add a title to the plot at the top and centered.
circular_iterator cbegin()
Retruns the itreator at the start of the Buffer.
AudioStream filter(const AudioStream &x)
uint32 getLength() const
Returns the number of samples in the Buffer.
Base class for IIR Filters, defines the interface.
Axes subplot(const uint32 n_rows, const uint32 n_cols, const uint32 n, const std::string &kwargs="", Axes *sharex=NULL, Axes *sharey=NULL)
Creates a figure in a subplot, subplot(A, B, C, **kwargs)
uint32 getNChannels(void) const
Returns the number of audio channels in the stream.
virtual float64 generate(const float64 &frequency)
This is a real-time method for the wavetable oscillator.
void plot(boolean show_phase=false)
AudioStream filter(const AudioStream &x)
virtual void reset()
Resets the position pointer back to the begging of the waveform.
A Buffer for storing audio samples.
A class for filtering audio in the frequecy domain.
A class for filtering audio in the frequecy domain.
A class the provides draw utilities and a wavetable oscillator.
FilterFlanger & operator=(const FilterFlanger &rhs)