38 using namespace Nsound;
45 hp_frequency_(half_power_frequency),
114 Kernel new_kernel(static_cast<uint32>(half_power_frequency * 10));
117 KernelCache::const_iterator itor =
kernel_cache_.find(new_kernel);
131 a_ = -1.0 * (temp - ::sqrt(temp * temp - 1.0));
142 plot(
boolean show_fc,
boolean show_phase)
146 "Tone Filter Frequency Response\n"
147 "order = %d, fc = %0.1f Hz, sr = %0.1f Hz",
187 frequency_(frequency)
Kernel(const uint32 &frequency)
void makeKernel(const float64 &half_power_frequency)
void axvline(const float64 &x_pos=0.0, const std::string &kwargs="")
Draws a vertical line at x and spans ymin to ymax (ralitive).
FilterTone(const float64 &sample_rate, const float64 &half_power_frequency)
void title(const std::string &title, const std::string &kwargs="")
Add a title to the plot at the top and centered.
bool operator<(const Kernel &rhs) const
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)
KernelCache kernel_cache_
void plot(boolean show_phase=false)
AudioStream filter(const AudioStream &x)
void plot(boolean show_fc=true, boolean show_phase=false)
A Buffer for storing audio samples.
AudioStream filter(const AudioStream &x)
A class to store calculated kernels.
float64 two_pi_over_sample_rate_