Document toolboxDocument toolbox

(8.D.2.6) WindowAlias

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 module outputs a block of size [OLEN 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 Hanning window (raised cosine) at instantiation time. The window coefficients may subsequently be changed.

Type Definition

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

Data type: float

Channel range: Unrestricted

Block size range: Unrestricted

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

M=window_alias_module(NAME, WLEN, OLEN) Creates a module which applies a window and optionally aliases the result to a shorter length. Arguments: NAME - name of the module. WLEN - length of the window to apply. OLEN - output sequence length after aliasing. 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. If you set WLEN = OLEN, then no aliasing occurs.

Â