Skip to main content
Skip table of contents

BandToBin

Overview

Expand frequency domain bands into individual bins

Discussion

The Band to Bin Module is a module that expands frequency bands into more bins. It expands each input band into multiple bins as per the user defined bandSize array and this module only accepts real numbers as inputs. If the total number of bins in .bandSize is smaller than the .numBins variable, the module will output zeros for the missing bins. If the total number of bins in .bandSize is greater than the .numBins variable, the module will ignore the value of any band that is larger than the last bin.

The module supports multichannel inputs and separately expands the bins for each channel. That is, if the input has N channels then the output will also have N channels.

Type Definition

CODE
typedef struct _ModuleBandToBin
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32* bandSize;                              // Number of output bins to expand per input band.
    INT32* startIndex;                            // Starting bin index for each band.
    INT32* endIndex;                              // Ending bin index for each band.
} ModuleBandToBinClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

bandSize

int*

parameter

0

[32 x 1]

Unrestricted

startIndex

int*

derived

1

[32 x 1]

Unrestricted

endIndex

int*

derived

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: band_to_bin_module.m

CODE
 M = band_to_bin_module(NAME, NUMBINS)
 Creates a module which expands frequency bands to individual frequency
 bins.  Arguments:
    NAME - name of the module.
    NUMBINS - number of output bins

JavaScript errors detected

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

If this problem persists, please contact our support.