38 using namespace Nsound;
47 int main(
int argc,
char ** argv)
51 Sine sine(SAMPLE_RATE);
61 <<
"FFTransform::fft(), FFTransform::ifft() ... " << flush;
68 Buffer diff = input - ifft;
72 if(diff.
getMax() > 0.00005)
75 <<
"fft() - ifft() > 0.00005, max(diff) = "
81 cout <<
Toc() <<
" seconds: SUCCESS" << endl;
98 <<
"Plotting Frequecy Responses of Filters ... " << flush;
103 pylab.
xlim(0, fh * 2);
107 pylab.
xlim(0, fh * 2);
111 pylab.
xlim(0,fh * 2);
115 pylab.
xlim(0,fh * 2);
119 pylab.
xlim(0,fh * 2);
123 pylab.
xlim(0,fh * 2);
127 pylab.
xlim(0,fh * 2);
131 pylab.
xlim(0,fh * 2);
134 cout <<
Toc() <<
" seconds" << endl << flush;
void plot(boolean show_fc=true, boolean show_phase=false)
static void show()
Acutally draw the plots to the screen.
void plot(boolean show_fc=true, boolean show_phase=false)
void plot(boolean show_fc=true, boolean show_phase=false)
void xlim(const float64 &xmin, const float64 &xmax)
Sets the limit for the x & y axis.
A class for filtering audio in the frequecy domain.
#define TEST_ERROR_HEADER
void ylim(const float64 &ymin, const float64 &ymax)
void plot(boolean show_fc=true, boolean show_phase=false)
virtual float64 generate(const float64 &frequency)
This is a real-time method for the wavetable oscillator.
void plot(boolean show_fc=true, boolean show_phase=false)
static const char * THIS_FILE
A class for filtering audio in the frequecy domain.
void plot(boolean show_fc=true, boolean show_phase=false)
void plot(boolean show_fc=true, boolean show_phase=false)
void abs()
Modifies the Buffer by making any negative value positive.
A Buffer for storing audio samples.
void plot(boolean show_fc=true, boolean show_phase=false)
float64 getMax() const
Returns the maximum sample value in the Buffer.
int main(int argc, char **argv)
std::vector< FFTChunk > FFTChunkVector