Document toolboxDocument toolbox

(8.D.1.2) TableLookupIntInt

Overview

Table lookup where the input serves as an index into a lookup table

Discussion

Performs table lookup where the input pin is treated as an integer index. The length of the lookup table L is specified at instantiation time. The data on the input pin is clipped to the range [0 L-1] and then used as an index into the lookup table. The lookup table contains integer values and these are output.

Type Definition

typedef struct _ModuleTableLookupIntInt { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 L; // Number of entries in the table INT32* table; // Table of lookup values } ModuleTableLookupIntIntClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

L

int

const

0

8

Unrestricted

 

table

int*

parameter

0

[8 x 1]

Unrestricted

 

Pins

Input Pins

Name: in

Description: index

Data type: int

Channel range: Unrestricted

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: lookup value

Data type: int

MATLAB Usage

File Name: table_lookup_int_int_module.m

M = table_lookup_int_int_module(NAME, L) Creates a table lookup module for use in the Audio Weaver environment. The module has an integer input pin and uses this as an index to lookup values in a table. The output data and the data in the table are also integers. Arguments: NAME - name of the module. L - size of the table.

Â