Overview
Recursive system implementing a feedback delay module
Discussion
This module implements a time-varying delay, with feedback gain control. The first input pin (mod) specifies the modulation factor; the second input pin is the multichannel audio signal. The module computes the instantaneous delay to apply on a sample-by-sample basis. The instantaneous delay is a floating-point value computed as:
...
The instantaneous delay time is a floating-point value and the module implements fractional sample interpolation using linear or cubic (third order) interpolation.
Type Definition
Code Block |
---|
typedef struct _ModuleFeedbackDelay { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 maxDelay; // Maximum delay that can be realized, in samples. The size of the delay buffer (maxDelay+1)*numChannels INT32 interpType; // Interpolation type. 0 - Linear, 1 - Cubic FLOAT32 currentDelay; // Current delay FLOAT32 modDepth; // Maximum depth, in samples, of the modulation signal FLOAT32 fGain; // Feedback gain. 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 } ModuleFeedbackDelayClass; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
maxDelay | int | const | 0 | 100 | 1:100000 | samples |
interpType | int | const | 0 | 0 | 0:1 | |
currentDelay | float | parameter | 0 | 0 | 0:100 | samples |
modDepth | float | parameter | 0 | 0 | 0:100 | samples |
fGain | float | parameter | 0 | 0.5 | 0:1 | |
stateIndex | int | state | 1 | 0 | Unrestricted | |
stateHeap | int | const | 1 | 561 | Unrestricted | |
state | float* | state | 1 | [1 x 101] | Unrestricted |
Pins
Input Pins
Name: mod
Description: modulation input
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: audio output
Data type: float
MATLAB Usage
File Name: feedback_delay_module.m
...