Document toolboxDocument toolbox

(8.D.1.2) TableSourceV2

Overview

Copies the column data pointed to by Index to the output wire

Discussion

This module maintains a user configurable 2D array (table) of user data (int, float, Fract32). At the input pin it accepts multiple integer indices (1 per channel) that are used as a column index selector of the table. All the elements of the selected column(s) are then output at the output wire.

The column selector index is zero-based and will be internally limited to the allowable range of the table. If input index is less than zero, then the first column will be selected. If index is greater than numCols, then the last column will be selected.

Type Definition

typedef struct _ModuleTableSourceV2 { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 numRows; // Size of each vector INT32 numCols; // Number of vectors FLOAT32* coeff; // 2-D table. } ModuleTableSourceV2Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

numRows

int

const

0

5

Unrestricted

 

numCols

int

const

0

1

Unrestricted

 

coeff

float*

parameter

0

[5 x 1]

Unrestricted

 

Pins

Input Pins

Name: in

Description: Input signal

Data type: int

Channel range: Unrestricted

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: Output data

Data type: float

MATLAB Usage

File Name: tablesource_v2_module.m

M = tablesource_v2_module(NAME, DATATYPE, NUMROWS, NUMCOLS, ISCOMPLEX) The module maintains a user configurable 2D array (table) of user data (int, float, fract32). At the input pin it accepts multiple integer indices that are used as a column index selector of the multi-dimentional array. All the elements of the selected column are then output at the output wire. Arguments: NAME - Name of the module DATATYPE - String specifying the data type of the array elements. Also used for the data type of the output pin. Allowable values are 'int', 'float', or 'fract32' NUMROWS - Number of rows of the table NUMCOLS - Number of columns of the table ISCOMPLEX - Boolean indicating whether the table and output data is complex. By default, ISCOMPLEX = 0

Â