Skip to main content
Skip table of contents

WindowAliasFract32

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

CODE
typedef struct _ModuleWindowAliasFract32
{
    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
    INT32 postShift;                              // Number of bits to shift
    FLOAT32* window;                              // Window coefficients
    fract32* windowFract32;                       // Window coefficients in fractional representation
    fract32* state;                               // State variable array
} ModuleWindowAliasFract32Class;

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

postShift

int

derived

1

0

Unrestricted

window

float*

parameter

0

[256 x 1]

Unrestricted

windowFract32

fract32*

derived

1

[256 x 1]

Unrestricted

state

fract32*

state

1

[256 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_alias_fract32_module.m

CODE
 M=window_alias_fract32_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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.