45 #include <sys/types.h> 56 OSFilter(
float * filter_impulse_response,
65 unsigned int filter_length,
67 unsigned int inout_buffer_length,
69 unsigned int suggested_transform_length = 0);
89 unsigned int filter_length,
93 unsigned int inout_buffer_length,
94 unsigned int suggested_transform_length = 0);
101 unsigned int apply(std::complex<float> * inbuf, std::complex<float> * outbuf,
float outgain = 1.0);
110 unsigned int apply(
float * inbuf,
float * outbuf,
float outgain = 1.0,
111 int instride = 1,
int outstride = 1);
115 void dump(std::ostream & os);
int guessN()
pick a likely N - FFT length.
double low_edge
parameters that we keep to support display masks on the spectrogram
std::complex< float > * fft_input
a copy of the input stream.
fftwf_plan backward_plan
plans for fftw transform ops
void dump(std::ostream &os)
dump the filter FFT to the output stream
std::complex< float > * ifft_output
the output stream + overlap discard
OSFilter(float low_cutoff, float low_pass_edge, float high_pass_edge, float high_cutoff, unsigned int filter_length, float filter_gain, float sample_rate, unsigned int inout_buffer_length, unsigned int suggested_transform_length=0)
constructor
unsigned int tail_index
the beginning of the end.
Overlap-and-save filter class.
std::complex< float > * filter_fft
FFT image of the input filter.
unsigned int apply(std::complex< float > *inbuf, std::complex< float > *outbuf, float outgain=1.0)
run the filter on a complex input stream
std::complex< float > * fft_output
the transformed input stream + overlap
std::pair< double, double > getFilterEdges()
unsigned int N
the total length of the transform N > (M + Q-1)
unsigned int M
the input buffer length;
unsigned int Q
the filter length