Overview
Sparse FIR filter which works together with the DelayStateWriter module
Discussion
This module implements a sparse FIR filter which is also known as a tapped delay line. This module stores only the coefficients and delay times and works in conjunction with an upstram delay_state_writer_module.m. The delay_state_writer_module.m holds the state variables and can be shared by multiple FIRSpareReaderModules.
...
The module only outputs a mono channel of data and the output blockSize must be a multiple of 8 samples. This last condition is checked by the module's prebuild function.
Type Definition
Code Block |
---|
typedef struct _ModuleFIRSparseReader { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 numTaps; // Number of non-zero coefficients (taps) in the filter INT32 dswObjectID; // Object ID of the upstream DelayStateWriter module INT32* tapDelay; // Current delay per tap INT32* tapDelayTarget; // Current delay per tap FLOAT32* tapCoeffs; // Coefficient applied to each tap output void * dswObjectPtr; // Points to the upstream DelayStateWriter module } ModuleFIRSparseReaderClass; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
numTaps | int | const | 0 | 20 | Unrestricted | |
dswObjectID | int | state | 1 | -1 | Unrestricted | |
tapDelay | int* | parameter | 0 | [20 x 1] | Unrestricted | samples |
tapDelayTarget | int* | state | 0 | [21 x 1] | Unrestricted | samples |
tapCoeffs | float* | parameter | 0 | [20 x 1] | Unrestricted | |
dswObjectPtr | void * | state | 1 | Unrestricted |
Pins
Input Pins
Name: ID
Description: audio input
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: audio output
Data type: float
MATLAB Usage
File Name: fir_sparse_reader_module.m
...