qm-dsp 1.8
KaiserWindow Class Reference

Kaiser window: A windower whose bandwidth and sidelobe height (signal-noise ratio) can be specified. More...

#include <KaiserWindow.h>

Classes

struct  Parameters

Public Member Functions

 KaiserWindow (Parameters p)
 Construct a Kaiser windower with the given length and beta parameter.
int getLength () const
const double * getWindow () const
void cut (double *src) const
void cut (const double *src, double *dst) const

Static Public Member Functions

static KaiserWindow byTransitionWidth (double attenuation, double transition)
 Construct a Kaiser windower with the given attenuation in dB and transition width in samples.
static KaiserWindow byBandwidth (double attenuation, double bandwidth, double samplerate)
 Construct a Kaiser windower with the given attenuation in dB and transition bandwidth in Hz for the given samplerate.
static Parameters parametersForTransitionWidth (double attenuation, double transition)
 Obtain the parameters necessary for a Kaiser window of the given attenuation in dB and transition width in samples.
static Parameters parametersForBandwidth (double attenuation, double bandwidth, double samplerate)
 Obtain the parameters necessary for a Kaiser window of the given attenuation in dB and transition bandwidth in Hz for the given samplerate.

Private Member Functions

void init ()

Private Attributes

int m_length
double m_beta
std::vector< double > m_window

Detailed Description

Kaiser window: A windower whose bandwidth and sidelobe height (signal-noise ratio) can be specified.

These parameters are traded off against the window length.

Definition at line 25 of file KaiserWindow.h.

Constructor & Destructor Documentation

◆ KaiserWindow()

KaiserWindow::KaiserWindow ( Parameters p)
inline

Construct a Kaiser windower with the given length and beta parameter.

Definition at line 37 of file KaiserWindow.h.

References init(), m_beta, and m_length.

Referenced by byBandwidth(), and byTransitionWidth().

Member Function Documentation

◆ byTransitionWidth()

KaiserWindow KaiserWindow::byTransitionWidth ( double attenuation,
double transition )
inlinestatic

Construct a Kaiser windower with the given attenuation in dB and transition width in samples.

Definition at line 43 of file KaiserWindow.h.

References KaiserWindow(), and parametersForTransitionWidth().

◆ byBandwidth()

KaiserWindow KaiserWindow::byBandwidth ( double attenuation,
double bandwidth,
double samplerate )
inlinestatic

Construct a Kaiser windower with the given attenuation in dB and transition bandwidth in Hz for the given samplerate.

Definition at line 53 of file KaiserWindow.h.

References KaiserWindow(), and parametersForBandwidth().

◆ parametersForTransitionWidth()

KaiserWindow::Parameters KaiserWindow::parametersForTransitionWidth ( double attenuation,
double transition )
static

Obtain the parameters necessary for a Kaiser window of the given attenuation in dB and transition width in samples.

Definition at line 19 of file KaiserWindow.cpp.

References KaiserWindow::Parameters::beta, and KaiserWindow::Parameters::length.

Referenced by byTransitionWidth(), and parametersForBandwidth().

◆ parametersForBandwidth()

Parameters KaiserWindow::parametersForBandwidth ( double attenuation,
double bandwidth,
double samplerate )
inlinestatic

Obtain the parameters necessary for a Kaiser window of the given attenuation in dB and transition bandwidth in Hz for the given samplerate.

Definition at line 72 of file KaiserWindow.h.

References parametersForTransitionWidth().

Referenced by byBandwidth(), and Resampler::initialise().

◆ getLength()

int KaiserWindow::getLength ( ) const
inline

Definition at line 79 of file KaiserWindow.h.

References m_length.

◆ getWindow()

const double * KaiserWindow::getWindow ( ) const
inline

Definition at line 83 of file KaiserWindow.h.

References m_window.

◆ cut() [1/2]

void KaiserWindow::cut ( double * src) const
inline

Definition at line 87 of file KaiserWindow.h.

References cut().

Referenced by cut(), and Resampler::initialise().

◆ cut() [2/2]

void KaiserWindow::cut ( const double * src,
double * dst ) const
inline

Definition at line 91 of file KaiserWindow.h.

References m_length, and m_window.

◆ init()

void KaiserWindow::init ( )
private

Definition at line 54 of file KaiserWindow.cpp.

References bessel0(), m_beta, m_length, and m_window.

Referenced by KaiserWindow().

Member Data Documentation

◆ m_length

int KaiserWindow::m_length
private

Definition at line 98 of file KaiserWindow.h.

Referenced by cut(), getLength(), init(), and KaiserWindow().

◆ m_beta

double KaiserWindow::m_beta
private

Definition at line 99 of file KaiserWindow.h.

Referenced by init(), and KaiserWindow().

◆ m_window

std::vector<double> KaiserWindow::m_window
private

Definition at line 100 of file KaiserWindow.h.

Referenced by cut(), getWindow(), and init().


The documentation for this class was generated from the following files: