Document toolboxDocument toolbox

(8.D.1.2) TableLookupIntFloat

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 floating-point values and these are output.

When bypassed the module is still active and continues to perform the look up function.

Type Definition

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

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

L

int

const

0

8

Unrestricted

 

table

float*

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

MATLAB Usage

File Name: table_lookup_int_float_module.m

M = table_lookup_int_float_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 floating-point values. Arguments: NAME - name of the module. L - size of the table.

Â