Feedback Delay V2
Overview
Recursive system implementing a feedback delay module (pre- or post)
Discussion
This module implements a fractonal sample 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 and is computed as:
delay[n] = currentDelay + mod[n] * modDepth
The modulation factor input is usually in the range [-1 +1], but this is not checked by the module.
The instantaneous delay time is a floating-point value and the module implements fractional sample interpolation using linear or cubic (third order) interpolation.
Output can be tapped prior to delay line input (prePost = 0) or after delay line output (prePost = 1).
Module Pack
awe-mod-dspc-snd
ClassID
classID = 41840
Type Definition
typedef struct _ModuleFeedbackDelayV2
{
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 prePost; // Pre- or postDelay. 0 - pre, 1 - post
INT32 interpType; // Interpolation type. 0 - Linear, 1 - Cubic
FLOAT32 currentDelay; // Current delay
FLOAT32 modDepth; // Maximum depth, in samples, of the modulation signal
FLOAT32 coef; // 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
} ModuleFeedbackDelayV2Class;
Variables
Properties
| Name | Type | Usage | isHidden | Default Value | Range | Units |
|---|---|---|---|---|---|---|
| maxDelay | int | const | 0 | 100 | 1:100000 | samples |
| prePost | int | parameter | 0 | 0 | 0:1 | |
| interpType | int | const | 0 | 0 | 0:1 | |
| currentDelay | float | parameter | 0 | 0 | 0:100 | samples |
| modDepth | float | parameter | 0 | 0 | 0:100 | samples |
| coef | 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 |
| Data type | float |
| Channel range | 1 |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real |
| Name | in |
| Description | audio input |
| Data type | float |
| Channel range | Unrestricted |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real |
Output Pins
| Name | out |
| Description | audio output |
| Data Type | float |
Matlab Usage
File Name: feedback_delay_v2_module.m
M = feedback_delay_v2_module(NAME, MAXDELAY, INTERP_TYPE, MEMHEAP)
Creates a fractional sample time delay with feedback gain for use in the
Audio Weaver.
Arguments:
NAME - name of the module.
MAXDELAY - Maximum delay, in samples.
INTERP_TYPE - Interpolation type. Linear or Cubic.
MEMHEAP - specifies the memory heap to use to allocate the main
state buffer. This is a string and follows the memory
allocation enumeration in Framework.h. Allowable values
are:
'AWE_HEAP_FAST' - always use internal DM memory.
'AWE_HEAP_FASTB' - always use internal PM memory.
'AWE_HEAP_SLOW' - always use external memory.
'AWE_HEAP_FAST2SLOW' - use internal memory. If this fails
then use external memory (the default).
'AWE_HEAP_FASTB2SLOW' - use internal memory. If this fails
then use external memory.
Copyright (c) 2026 DSP Concepts, Inc.