Overview
Applies a time domain window and optionally aliases the result to a shorter length
Discussion
This module applies a time domain window to a signal and then optionally aliases the result. 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 and aliasing operation applied. The length of the window (WLEN) and the size of the output (OLEN) are specified at instantiation time. If OLEN == WLEN, then no aliasing occurs and the module simply applies a window. For aliasing, set WLEN equal to a multiple of OLEN. This causes the window to be applied and the result to be time aliased to OLEN samples. WLEN must be a multiple of OLEN so that an integer number of complete blocks are aliased.
...
The window coefficients are set to a Hanning window (raised cosine) at instantiation time. The window coefficients may subsequently be changed.
Type Definition
Code Block |
---|
typedef struct _ModuleWindowAlias { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 winLen; // Length of the window INT32 stateIndex; // Index of the oldest state variable in the array of state variables INT32 numAliasSections; // Number of sections that are aliased to form the output. Equals WLEN/OLEN FLOAT32* window; // Window coefficients FLOAT32* state; // State variable array } ModuleWindowAliasClass; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
winLen | int | const | 0 | 256 | 1:1:8192 | samples |
stateIndex | int | state | 1 | 0 | Unrestricted | |
numAliasSections | int | const | 1 | 1 | Unrestricted | |
window | float* | parameter | 0 | [256 x 1] | Unrestricted | |
state | float* | state | 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: float
MATLAB Usage
File Name: window_alias_module.m
...