Overview
Delays signals by a multiple of the blockSize
Discussion
A block delay module, where the delay is specified as an integer number of blocks. The delay is implemented such that delays as short as 0 blocks can be realized. The module has one multichannel input and one multichannel output. The module can operate on multiple channels and applies the same delay to each channel.
At construction time, specify the maximum delay (maxDelay) of the module. The variable, maxDelay determines the size of the internal state buffer. The size of the internal state buffer equals (maxBlockDelay+1)*blockSize*numChannels. In addition, the instantaneous delay is specified through the interface variable, currentBlockDelay. currentBlockDelay is in the range of [0 maxBlockDelay] and can be changed at run-time. Note that the module is not smoothly updating and you may get audible clicks when adjusting the currentBlockDelay at run-time.
Type Definition
Code Block |
---|
typedef struct _ModuleBlockDelayV2 { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 maxBlockDelay; // Maximum delay that can be realized, in blocks. The size of the delay buffer, (maxDelay+1)*blockSize*numChannels. INT32 currentBlockDelay; // Current block delay. 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. } ModuleBlockDelayV2Class; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
maxBlockDelay | int | const | 0 | 10 | 1:1000 | blocks |
currentBlockDelay | int | parameter | 0 | 0 | 0:1:10 | blocks |
stateIndex | int | state | 1 | 0 | Unrestricted | |
stateHeap | int | const | 1 | 2 | Unrestricted | |
state | float* | state | 1 | [1 x 352] | Unrestricted |
Pins
Input Pins
Name: in
Description: audio input
...
Complex support: Real and Complex
Output Pins
Name: out
Description: audio output
Data type: {float, int, fract32}
MATLAB Usage
File Name: block_delay_v2_module.m
...