(8.D.2.7) WindowOverlapFract32
Overview
Windows the signal and accumlates to an internal buffer
Discussion
This module implements windowing and overlapping. The module has an array of window coefficients equal to the input blockSize. The module multiples the window by the input block and accumulates this to an internal state buffer. The state buffer acts as a FIFO. After the accumulation, the last OUTBLOCKSIZE samples are copied to the output wire and the whole state buffer is then shifted and the first OUTBLOCKSIZE samples set to zero.
The module has two arguments: OUTBLOCKSIZE and INBLOCKSIZE. OUTBLOCKSIZZE specifies the blockSize of the output wire. INBLOCKSIZE is optional and specifies the initial length of the window and the initial length of the state buffer. The final lengths are set in the module's prebuild function.
The module operates on any number of channels. The module requires that the output blockSize be equal or smaller in length to the input blockSize.
Type Definition
typedef struct _ModuleWindowOverlapFract32
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
fract32* window; // Window coefficients
fract32* state; // State variable array
} ModuleWindowOverlapFract32Class;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
window | fract32* | parameter | 0 | [32 x 1] | Unrestricted | Â |
state | fract32* | state | 1 | [32 x 1] | Unrestricted | Â |
Pins
Input Pins
Name: in
Description: audio input
Data type: fract32
Channel range: Unrestricted
Block size range: Unrestricted
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: audio output
Data type: fract32
MATLAB Usage
File Name: window_overlap_fract32_module.m
M = window_overlap_fract32_module(NAME, OUTBLOCKSIZE, INBLOCKSIZE)
Creates a module which applies a window, adds the result to a state
buffer and then shifts out a block of output data. The module is
frequently used to in frequency domain processing. Arguments:
NAME - name of the module.
OUTBLOCKSIZE - output block size.
INBLOCKSIZE - optional value which specifies the default blockSize
of the input pin. Setting this allows you to size the
window buffer before the system is built.
The size of the internal buffer (and the window) equals the input
blockSize.
The module requires that the output block size (OUTBLOCKSIZE) be equal to or
smaller than the input blockSize. This is checked in the module's
prebuild function.
Â