Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

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 an integer index that is used as a column index selector of the table. All the elements of the selected column 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. Only the first element of the input pin is considered as the column selector. All other values are ignored.

Type Definition

Code Block
typedef struct _ModuleTablesource
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 index;                                  // current column index into the multi-dimensional array
    INT32 numRows;                                // the size of each vector
    INT32 numCols;                                // the number of vectors
    FLOAT32* coeff;                               // 2-D table.
} ModuleTablesourceClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

index

int

parameter

0

0

Unrestricted

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

...

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: Output data

Data type: float

MATLAB Usage

File Name: tablesource_module.m

...