44 using namespace Nsound;
51 static const char *
THIS_FILE =
"FilterCombLowPassFeedback_UnitTest.cc";
68 noise <<
"gold/Filter_noise.wav";
70 cout <<
TEST_HEADER <<
"Testing FilterCombLowPassFeedback::filter(input) ...";
82 gold <<
"gold/FilterCombLowPassFeedback_out1.wav";
92 <<
"Output did not match gold file!"
95 diff.
plot(
"data - gold");
106 cout << TEST_HEADER <<
"Testing FilterCombLowPassFeedback::filter(input, freqs) ...";
110 data = f.
filter(noise, freqs);
118 gold <<
"gold/FilterCombLowPassFeedback_out2.wav";
128 <<
"Output did not match gold file!"
131 diff.
plot(
"data - gold");
143 cout << SUCCESS << endl;
static const char * THIS_FILE
static void show()
Acutally draw the plots to the screen.
static const float64 GAMMA
void plot(const std::string &title="Buffer") const
Requires matplotlib. Creates a plot of this Buffer.
AudioStream filter(const AudioStream &x)
#define TEST_ERROR_HEADER
void FilterCombLowPassFeedback_UnitTest()
void normalize()
Multiplies the Buffer by a constant gain so the peak sample has magnitude 1.0.
void abs()
Modifies the Buffer by making any negative value positive.
A class for filtering audio in the frequecy domain.
A Buffer for storing audio samples.
static void setDefaultSampleSize(uint32 size)
Buffer drawLine(const float64 &duration, const float64 &litude_start, const float64 &litude_finish) const
This method draws a linear line beteween 2 points.
float64 getMax() const
Returns the maximum sample value in the Buffer.