Document toolboxDocument toolbox

(8.D.2.5) OverlapAdd

Overview

Overlap and add method

Discussion

The OverlapAdd module implements the "overlap add" processing found in many frequency domain algorithms. At instantiation time you specify the blockSize of the input pin (ILEN) and the blockSize of the output pin (OLEN). The module allocates an internal state buffer of size ILEN words at instantiation time.

The processing function first takes the input data and adds it to the internal state buffer. Next, it copies OLEN of the oldest samples and writes this to the output buffer. Finally, it shifts the state buffer by OLEN samples.

The module is designed to work on multiple channels.

Type Definition

typedef struct _ModuleOverlapAdd { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 stateIndex; // Index of the oldest state variable in the array of state variables INT32 overlapLength; // Number of samples to be overlapped INT32 channelCount; // Number of channels FLOAT32* state; // State variable array } ModuleOverlapAddClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

stateIndex

int

state

1

0

Unrestricted

 

overlapLength

int

parameter

1

256

Unrestricted

 

channelCount

int

state

1

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: 256

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: audio output

Data type: float

MATLAB Usage

File Name: overlap_add_module.m

M=overlap_add_module(NAME, ILEN, OLEN) Creates a module which implements the overlap and add method. Arguments: NAME - name of the module. ILEN - block size of the input pin (default = 128) OLEN - block size of the outputput pin (default = 256)

Â