AllpassDelayi
Overview
Interpolated time allpass delay
Discussion
An allpass interpolated delay module where the delay time is taken from the first input pin. The second input pin is the audio to process. The module supports fractional delay times and uses linear interpolation between sample values. Delay times as small as 0 samples can be realized. If the delay time is exactly equal to 0, the module essentially runs in a bypass mode. The first input pin contains a single channel of data. The second input pin (audio) can be multichannel with the same processing applied to all channels. The delay line is incorporated into a first order allpass topology (transposed Direct Form II), with the feedback gain determined by the coef value, and the feedforward gain determined by -coef.
At construction time, you specify the maximum delay (maxDelay) of the module. maxDelay determines the size of the internal state buffer. To be precise, the size of the internal state buffer equals (maxDelay+1)*numChannels.
The delay time is determined by the value on the first input pin times the .modDepth parameter. In normal use, the delay input variable is in the range [0 1] while .modDepth is set to maxDelay. The delay time is updated every samples.
See also the allpass_delayci_module.m for similar functionality but with cubic interpolation.
Module Pack
Advanced
ClassID
classID = 1211
Type Definition
typedef struct _ModuleAllpassDelayi
{
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
FLOAT32 currentDelay; // Current delay
FLOAT32 modDepth; // Maximum depth, in samples, of the modulation signal
FLOAT32 coef; // Feedback/-feedforward coefficient for the allpass delay.
INT32 stateIndex; // Index of the oldest state variable in the array of state variables
FLOAT32* state; // State variable array
} ModuleAllpassDelayiClass;
Variables
Properties
| Name | Type | Usage | isHidden | Default Value | Range | Units |
|---|---|---|---|---|---|---|
| maxDelay | int | const | 0 | 100 | 1:100000 | samples |
| currentDelay | float | parameter | 0 | 0 | 0:0.1:100 | samples |
| modDepth | float | parameter | 0 | 0 | 0:0.1:100 | samples |
| coef | float | parameter | 0 | 0.5 | -1:1 | |
| stateIndex | int | state | 1 | 0 | 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: allpass_delayi_module.m
M=allpass_delayi_module(NAME, MAXDELAY)
Creates a fractional sample time delay for use in the Audio Weaver. Arguments:
Arguments:
NAME - name of the module.
MAXDELAY - Maximum delay, in samples.
Copyright (c) 2026 DSP Concepts, Inc.