Skip to main content
Skip table of contents

CoeffTable

Overview

Sets filter coefficients in other modules

Discussion

The Coeff Table module, also called the Param Set Table module, writes the values of one column of a statically defined table to an internal array of another module. A common use case is to update the coefficients of an FIR module based on changing conditions in the system.

The numCols variable determines the number of vectors that can be stored in the internal table, and the numRows variable determines the length of each vector. It is the responsibility of the user to ensure that the numRows variable matches the size of the target module's array. The integer value of the input pin is used to select which column to copy to the target module's array.

See the Param Set module documentation for more detail on how to specify the target module's array, and the meaning of each setBehavior type.

This module has been deprecated for Param Set Table V2

Type Definition

CODE
typedef struct _ModuleCoeffTable
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 index;                                  // current index to coeff table
    INT32 numRows;                                // the size of each vector
    INT32 numCols;                                // the number of vectors
    INT32 setBehavior;                            // Controls the behavior of the module
    FLOAT32* coeff;                               // 2-D coeff table.
    void * modPtr;                                // Points to the module to set
    void * varPtr;                                // Points to the variable to set within the module instance structure
} ModuleCoeffTableClass;

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

setBehavior

int

parameter

0

3

Unrestricted

coeff

float*

parameter

0

[5 x 1]

Unrestricted

modPtr

void *

parameter

1

Unrestricted

varPtr

void *

parameter

1

Unrestricted

Pins

Input Pins

Name: in

Description: column index

Data type: int

Channel range: 1

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

MATLAB Usage

File Name: coeff_table_module.m

CODE
 M=coeff_table_module(NAME, DATATYPE, NUMROWS, NUMCOLS, MODVAR)
 Coefficients table set module.  This module can reach into the instance structure
 of other modules and set filter coefficients.  Arguments:
    NAME - name of the module.
    DATATYPE - string specifying the data type of the variable and this
               is also used for the data type of the input pin.  Allowable
               values are'int'.
    NUMROWS - the dimension X of internal coefficient table.
    NUMCOLS - the dimension Y of internal coefficient table.
    MODVAR - specifies the module and variable name using the form:
              'MOD.VAR' where MOD is the module name and VAR is the 
              variable name.  You can also specify internal subsystems using
              'SUBSYS.MOD.VAR'.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.