(8.D.2.1) BlockDelay
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
typedef struct _ModuleBlockDelay
{
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.
FLOAT32* state; // State variable array.
} ModuleBlockDelayClass;
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 | Â |
state | float* | state | 1 | [1 x 352] | Unrestricted | Â |
Pins
Input Pins
Name: in
Description: audio input
Data type: {float, int, fract32}
Channel range: Unrestricted
Block size range: Unrestricted
Sample rate range: Unrestricted
Complex support: Real and Complex
Output Pins
Name: out
Description: audio output
Data type: {float, int, fract32}
MATLAB Usage
File Name: block_delay_module.m
M=block_delay_module(NAME, MAXBLOCKDELAY)
Creates a block delay module for use in the Audio Weaver environment. The
module delays the input by a multiple of the block size.
Arguments:
NAME - name of the module.
MAXBLOCKDELAY - maximum delay, in blocks.
Â