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
Code Block |
---|
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
...
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
...