Overview
Table driven interpolation module with set function. Supports linear and smooth modes
Discussion
This module performs table lookup using unevenly spaced X and Y values.
...
If the input x falls outside of the range of values in the XY table then the input is clipped to the allowable range.
Type Definition
Code Block |
---|
typedef struct _ModuleTableInterpRuntime { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 maxPoints; // Maximum number of values in the lookup table. The total table size is [maxPoints 2]. INT32 numPoints; // Current number of interpolation values in use. INT32 order; // Order of the interpolation. This can be either 2 (for linear) or 4 (for pchip). INT32 updateActive; // Specifies whether the poly coefficients are updating (=1) or fixed (=0). FLOAT32* XY; // Samples of the lookup table. The first row is the x values and the second row is the f(x) values FLOAT32* polyCoeffs; // Interpolation coefficients returned by the grid control } ModuleTableInterpRuntimeClass; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
maxPoints | int | const | 0 | 8 | 4:1:1000 | |
numPoints | int | parameter | 0 | 4 | 4:1:8 | |
order | int | parameter | 0 | 2 | 2:2:4 | |
updateActive | int | parameter | 1 | 1 | 0:1 | |
XY | float* | parameter | 0 | [2 x 8] | Unrestricted | |
polyCoeffs | float* | state | 0 | [4 x 7] | Unrestricted |
Pins
Input Pins
Name: in
Description: audio input
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: audio output
Data type: float
MATLAB Usage
File Name: table_interp_runtime_module.m
...