Skip to main content
Skip table of contents

WindowOverlap

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

CODE
typedef struct _ModuleWindowOverlap
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    FLOAT32* window;                              // Window coefficients
    FLOAT32* state;                               // State variable array
} ModuleWindowOverlapClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

window

float*

parameter

0

[32 x 1]

Unrestricted

state

float*

state

1

[32 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_overlap_module.m

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

JavaScript errors detected

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

If this problem persists, please contact our support.