(8.D.2.1) WindowFract32
Overview
Applies a time domain window
Discussion
This module applies a time domain window to a signal. This operation is useful prior to taking the FFT of a signal and commonly occurs in STFT-based filterbanks. The module operates on multiple channels with all channels having the same window. The length of the window (WLEN) is specified at instantiation time. The module outputs a block of size [WLEN numChannels], where numChannels equals the number of channels in the input signal. This block is output everytime that the module's processing function is called.
The window coefficients are set to a Hamming window (raised cosine) at instantiation time. The window coefficients may subsequently be changed.
Type Definition
typedef struct _ModuleWindowFract32
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 winLen; // Length of the window
INT32 postShift; // Number of bits to shift
FLOAT32* window; // Window coefficients
fract32* windowFract32; // Window coefficients in fractional representation
} ModuleWindowFract32Class;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
winLen | int | const | 0 | 256 | 1:1:8192 | samples |
postShift | int | derived | 1 | 0 | Unrestricted | Â |
window | float* | parameter | 0 | [256 x 1] | Unrestricted | Â |
windowFract32 | fract32* | derived | 1 | [256 x 1] | Unrestricted | Â |
Pins
Input Pins
Name: in
Description: audio input
Data type: fract32
Channel range: Unrestricted
Block size range: 256
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: audio output
Data type: fract32
MATLAB Usage
File Name: window_fract32_module.m
M=windowFract32_module(NAME, ILEN, WLEN)
Creates a module which applies a window.
Arguments:
NAME - name of the module.
ILEN - lenght of the input
WLEN - length of the window to apply.
This module is often used as part of a short term Fourier transform
filterbank. The module operates on an arbitrary number of channels
with the same window and length parameters applied.
Â