39 using namespace Nsound;
44 #define CERR_HEADER __FILE__ << ":" << __LINE__ << ": "
54 frequency_low_(frequency_low),
55 frequency_high_(frequency_high),
93 const Buffer & frequencies_Hz_low,
94 const Buffer & frequencies_Hz_high)
100 for(
uint32 channel = 0; channel < n_channels; ++channel)
105 frequencies_Hz_high);
129 const Buffer & frequencies_Hz_low,
130 const Buffer & frequencies_Hz_high)
171 const float64 & frequencies_Hz_low,
172 const float64 & frequencies_Hz_high)
174 makeKernel(frequencies_Hz_low, frequencies_Hz_high);
180 plot(
boolean show_fc,
boolean show_phase)
184 "Band Pass IIR Frequency Response\n"
185 "fl = %0.1f Hz, fh = %01f Hz, omega2 = %0.1f Hz, f_ = %0.1f Hz, att_ = %0.1f",
232 float64 fc = f_high - 0.5 * (f_high - f_low);
FilterBandPassVocoder(const float64 &sample_rate, const float64 &frequency_low, const float64 &frequency_high)
float64 getSampleRate() const
Returns the sample rate of the stream.
void axvline(const float64 &x_pos=0.0, const std::string &kwargs="")
Draws a vertical line at x and spans ymin to ymax (ralitive).
void plot(boolean show_fc=true, boolean show_phase=false)
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.
void plot(boolean show_phase=false)
AudioStream filter(const AudioStream &x)
virtual ~FilterBandPassVocoder()
A Buffer for storing audio samples.
void makeKernel(const float64 &f_low, const float64 &f_high)