Logo Search packages:      
Sourcecode: calf version File versions  Download package

dsp::bandlimiter< SIZE_BITS > Struct Template Reference

#include <osc.h>

List of all members.

Detailed Description

template<int SIZE_BITS>
struct dsp::bandlimiter< SIZE_BITS >

FFT-based bandlimiting helper class. Allows conversion between time and frequency domains and generating brickwall filtered versions of a waveform given a pre-computed spectrum. Waveform size must be a power of two, and template argument SIZE_BITS is log2 of waveform size.

Definition at line 70 of file osc.h.

Public Types

enum  { SIZE = 1 << SIZE_BITS }

Public Member Functions

void compute_spectrum (float input[SIZE])
 Import time domain waveform and calculate spectrum from it.
void compute_waveform (float output[SIZE])
 Generate the waveform from the contained spectrum.
void make_waveform (float output[SIZE], int cutoff, bool foldover=false)
void remove_dc ()
 remove DC offset of the spectrum (it usually does more harm than good!)

Static Public Member Functions

static dsp::fft< float,
get_fft ()

Public Attributes

std::complex< float > spectrum [SIZE]

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index