/Users/richardeakin/projects/libsms/trunk/src/windows.c File Reference

functions for creating various windows More...

#include "sms.h"
Include dependency graph for windows.c:

Functions

void sms_scaleWindow (int sizeWindow, sfloat *pWindow)
void IFFTwindow (int sizeWindow, sfloat *pFWindow)
 window to be used in the IFFT synthesis
void BlackmanHarris62 (int sizeWindow, sfloat *pFWindow)
 BlackmanHarris window with 62dB rolloff.
void BlackmanHarris70 (int sizeWindow, sfloat *pFWindow)
 BlackmanHarris window with 70dB rolloff.
void BlackmanHarris74 (int sizeWindow, sfloat *pFWindow)
 BlackmanHarris window with 74dB rolloff.
void BlackmanHarris92 (int sizeWindow, sfloat *pFWindow)
 BlackmanHarris window with 92dB rolloff.
void BlackmanHarris (int sizeWindow, sfloat *pFWindow)
 default BlackmanHarris window (70dB rolloff)
void Hamming (int sizeWindow, sfloat *pWindow)
 Hamming window.
void Hanning (int sizeWindow, sfloat *pWindow)
 Hanning window.
void sms_getWindow (int sizeWindow, sfloat *pFWindow, int iWindowType)
 main function for getting various windows
void sms_windowCentered (int sizeWindow, sfloat *pWaveform, sfloat *pWindow, int sizeFft, sfloat *pFftBuffer)
 apply a window and center around sample 0

Detailed Description

functions for creating various windows

Use sms_getWindow() for selecting which window will be made


Function Documentation

void BlackmanHarris ( int  sizeWindow,
sfloat *  pFWindow 
)

default BlackmanHarris window (70dB rolloff)

Parameters:
sizeWindow the size of the window
pFWindow pointer to an array that will hold the window

References BlackmanHarris70().

Referenced by sms_getWindow().

Here is the call graph for this function:

void BlackmanHarris62 ( int  sizeWindow,
sfloat *  pFWindow 
)

BlackmanHarris window with 62dB rolloff.

Todo:
where did these come from?
Parameters:
sizeWindow the size of the window
pFWindow pointer to an array that will hold the window

References sfloat, and TWO_PI.

Referenced by sms_getWindow().

void BlackmanHarris70 ( int  sizeWindow,
sfloat *  pFWindow 
)

BlackmanHarris window with 70dB rolloff.

Parameters:
sizeWindow the size of the window
pFWindow pointer to an array that will hold the window

References sfloat, and TWO_PI.

Referenced by BlackmanHarris(), and sms_getWindow().

void BlackmanHarris74 ( int  sizeWindow,
sfloat *  pFWindow 
)

BlackmanHarris window with 74dB rolloff.

Parameters:
sizeWindow the size of the window
pFWindow pointer to an array that will hold the window

References sfloat, and TWO_PI.

Referenced by sms_getWindow().

void BlackmanHarris92 ( int  sizeWindow,
sfloat *  pFWindow 
)

BlackmanHarris window with 92dB rolloff.

Parameters:
sizeWindow the size of the window
pFWindow pointer to an array that will hold the window

References sfloat, and TWO_PI.

Referenced by sms_getWindow().

void Hamming ( int  sizeWindow,
sfloat *  pWindow 
)

Hamming window.

Parameters:
sizeWindow window size
pWindow window array

References sfloat, and TWO_PI.

Referenced by sms_getWindow().

void Hanning ( int  sizeWindow,
sfloat *  pWindow 
)

Hanning window.

Parameters:
sizeWindow window size
pWindow window array

References PI.

Referenced by sms_getWindow().

void IFFTwindow ( int  sizeWindow,
sfloat *  pFWindow 
)

window to be used in the IFFT synthesis

contains both an inverse Blackman-Harris and triangular window.

Todo:
read X. Rodet, Ph. Depalle, "Spectral Envelopes and Inverse FFT Synthesis." Proc. 93rd AES Convention, October 1992
Parameters:
sizeWindow the size of the window
pFWindow pointer to an array that will hold the window

References sfloat, and TWO_PI.

Referenced by sms_getWindow().

void sms_getWindow ( int  sizeWindow,
sfloat *  pFWindow,
int  iWindowType 
)

main function for getting various windows

Todo:
note on window scales
See also:
SMS_WINDOWS for the different window types available
Parameters:
sizeWindow window size
pFWindow window array
iWindowType the desired window type defined by SMS_WINDOWS

References BlackmanHarris(), BlackmanHarris62(), BlackmanHarris70(), BlackmanHarris74(), BlackmanHarris92(), Hamming(), Hanning(), IFFTwindow(), SMS_WIN_BH_62, SMS_WIN_BH_70, SMS_WIN_BH_74, SMS_WIN_BH_92, SMS_WIN_HAMMING, SMS_WIN_HANNING, and SMS_WIN_IFFT.

Referenced by InitializeHybrid(), sms_analyze(), sms_analyzeFrame(), sms_changeSynthHop(), and sms_initSynth().

Here is the call graph for this function:

void sms_scaleWindow ( int  sizeWindow,
sfloat *  pWindow 
)

References sfloat.

Referenced by sms_analyze(), and sms_analyzeFrame().

void sms_windowCentered ( int  sizeWindow,
sfloat *  pWaveform,
sfloat *  pWindow,
int  sizeFft,
sfloat *  pFftBuffer 
)

apply a window and center around sample 0

function to center a waveform around sample 0, also known as 'zero-phase windowing'. Half the samples are at the beginning, half at the end, with the remaining samples (sizeFft-sizeWindow) in the middle (zero-padding for an interpolated spectrum).

Todo:
do I need to garuntee that sizeWindow is odd-lengthed?
Parameters:
sizeWindow size of waveform/waveform
pWaveform pointer to waveform
pWindow pointer to window
sizeFft size of FFT
pFftBuffer pointer to FFT buffer
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Thu Oct 29 04:08:07 2009 for libsms by  doxygen 1.6.1