36 using namespace Nsound;
51 resonance_(resonance),
76 k_ = 3.6 * f - 1.6 * f * f - 1.0;
77 p_ = (
k_ + 1.0) * 0.5;
79 float64 scale = std::exp((1.0 -
p_) * 1.386249);
81 r_ = resonance * scale;
101 y3_ = y3_ - y3_ * y3_ * y3_ / 6.0;
137 plot(
boolean show_fc,
boolean show_phase)
141 "Moog 24 dB Resonant Lowpass\n"
142 "Resonance = %.3f, Cutoff = %0.1f Hz, sr = %0.1f Hz",
virtual float64 filter(const float64 &x)
FilterLowPassMoogVcf(const float64 &sample_rate, const float64 &cutoff_hz, const float64 &resonance)
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 title(const std::string &title, const std::string &kwargs="")
Add a title to the plot at the top and centered.
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)
void _make_filter(float64 cutoff_hz, float64 resonance)
void plot(boolean show_phase=false)
void plot(boolean show_fc=true, boolean show_phase=false)