functions for creating various windows More...
#include "sms.h"
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 |
functions for creating various windows
Use sms_getWindow() for selecting which window will be made
void BlackmanHarris | ( | int | sizeWindow, | |
sfloat * | pFWindow | |||
) |
default BlackmanHarris window (70dB rolloff)
sizeWindow | the size of the window | |
pFWindow | pointer to an array that will hold the window |
References BlackmanHarris70().
Referenced by sms_getWindow().
void BlackmanHarris62 | ( | int | sizeWindow, | |
sfloat * | pFWindow | |||
) |
BlackmanHarris window with 62dB rolloff.
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.
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.
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.
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.
sizeWindow | window size | |
pWindow | window array |
References sfloat, and TWO_PI.
Referenced by sms_getWindow().
void Hanning | ( | int | sizeWindow, | |
sfloat * | pWindow | |||
) |
Hanning window.
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.
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
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().
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).
sizeWindow | size of waveform/waveform | |
pWaveform | pointer to waveform | |
pWindow | pointer to window | |
sizeFft | size of FFT | |
pFftBuffer | pointer to FFT buffer |