Versions Compared

Key

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

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

Code Block
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

...

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

...