Overview
Writes data into an internal 16-bit circular state buffer
Discussion
This module writes data from fract32 input to an internal 16-bit circular state buffer and outputs a pointer to its instance structure. The module is used inconjunction with downstream "reader" modules which pull data out of the circular state buffer. For example, you can use it with the fir_sparse_reader_fract16_module.m to create tapped delay lines which share a common state buffer.
...
The constructor argument MAXDELAY specifies the number of samples of delay, per channel. The size of the internal state buffer is (MAXDELAY + inBlockSize) * numInChannels samples where inBlockSize is the blockSize of the input pin. This buffer is large enough so that a new block of data can first be written into the buffer and then data as old as MAXDELAY samples can be read out.
Type Definition
Code Block |
---|
typedef struct _ModuleDelayStateWriter16 { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 maxDelay; // Maximum delay, per channel. INT32 stateLen; // Size of the internal state buffer. INT32 stateIndex; // Index of the oldest state variable in the array of state variables. INT32 stateHeap; // Heap in which to allocate memory. FLOAT32* state; // State variable array. } ModuleDelayStateWriter16Class; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
maxDelay | int | const | 0 | 100 | Unrestricted | samples |
stateLen | int | derived | 0 | 132 | Unrestricted | samples |
stateIndex | int | state | 1 | 0 | Unrestricted | |
stateHeap | int | const | 1 | 1 | Unrestricted | |
state | float* | state | 1 | [66 x 1] | Unrestricted |
Pins
Input Pins
Name: in
Description: audio input
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: ID
Description: Module objectID
Data type: int
MATLAB Usage
File Name: delay_state_writer16_module.m
...