39 using namespace Nsound;
47 int main(
int argc,
char ** argv)
61 pylab.
plot(as[0],
"b");
64 pylab.
plot(as[1],
"r");
67 pylab.
title(
"blue = default gaussian, red = gaussian with 30% pass band");
78 pylab.
title(
"default gaussian");
79 pylab.
plot(x_axis, as[0],
"b");
83 pylab.
title(
"gaussian with 30% pass band");
84 pylab.
plot(x_axis, as[1],
"r");
89 as.
plot(
"quick plot from AudioStream");
92 as[1].
plot(
"quick plot, gaussian with 30% pass band");
93 as[0].
plot(
"quick plot, default gaussian");
void xlabel(const std::string &label, const std::string &kwargs="")
Add a label x axis.
static void show()
Acutally draw the plots to the screen.
Buffer drawFatGaussian(const float64 &duration, const float64 &pass_band_percent=0.01) const
This method draws a standard Gaussian curve over duration seconds, with a specified pass band...
void plot(const Buffer &y, const std::string &fmt="", const std::string &kwargs="")
Plots the Buffer on the current figure.
void figure(const std::string &kwargs="") const
Creates a new figure window to plot in.
void title(const std::string &title, const std::string &kwargs="")
Add a title to the plot at the top and centered.
Buffer drawGaussian(const float64 &duration, const float64 &mu, const float64 &sigma, const boolean &normalize=true) const
This method draws a Gaussian curve over duration seconds.
int main(int argc, char **argv)
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 plot(const std::string &title="AudioStream") const
void ylabel(const std::string &label, const std::string &kwargs="")
Add a label y axis.
A Buffer for storing audio samples.
Buffer drawLine(const float64 &duration, const float64 &litude_start, const float64 &litude_finish) const
This method draws a linear line beteween 2 points.
A class the provides draw utilities and a wavetable oscillator.