Skip to content

DelayReader

Overview

Reads the data from a delay_state_writer_module with a given delay

Discussion

This module reads the data from a delay_state_writer module. The input is a single channel, single block, integer, which is the output from a delay_state_writer module. The output has the same number of channels, blocksize, and sample rate as the input to the delay_state_writer module. The currentDelay value is how much to delay the samples that are stored in the delay_state_writer module. This can be a non-integer value, in which case interpolation is applied to the samples. 2 types of interpolations are possible - linear or cubic. Limitations of this module is that it has to be on the same hierarchy as the delay state writer module and that it has to be directly connected to the delay_state_writer module with nothing (except markers) in between.

Module Pack

Advanced

ClassID

classID = 1251

Type Definition

typedef struct _ModuleDelayReader
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
INT32 maxDelay;                               // Max Delay of the writer module (per channel)
FLOAT32 currentDelay;                         // Current delay
INT32 interpolationType;                      // Interpolation type - linear, cubic, etc
INT32 dswObjectID;                            // Object ID of the upstream DelayStateWriter module
void * dswObjectPtr;                          // Points to the upstream DelayStateWriter module
INT32 * dataType;                             // Internal state variable to hold data type
} ModuleDelayReaderClass;

Variables

Properties

Name Type Usage isHidden Default Value Range Units
maxDelay int const 0 100 Unrestricted samples
currentDelay float parameter 0 0 0:100 samples
interpolationType int parameter 0 0 0:1
dswObjectID int state 1 -1 Unrestricted
dswObjectPtr void * state 1 Unrestricted
dataType INT32 * state 1 Unrestricted

Pins

Input Pins

Name ID
Description audio input
Data type int
Channel range 1
Block size range 1
Sample rate range Unrestricted
Complex support Real

Output Pins

Name out
Description audio output
Data Type float

Matlab Usage

File Name: delay_reader_module.m 
 M=delay_reader_module(NAME, NUMCHANNELS, BLOCKSIZE, SAMPLERATE, DATATYPE, ISCOMPLEX) 
 Creates a delay reader module. Delay reader module reads the samples  
 stored in a delay_state_writer module that is the input to this module.  
 Supports using linear interpolation or cubic interpolation for  
 non-integer delay.  
 Arguments: 
   NAME - name of the module. 

 Limitations - this module must be connected to a DelayStateWriter module. 
 There cannot be anything except markers between these 2 modules. The 
 modules must be on the same subsystem hierarchy.  

Copyright (c) 2026 DSP Concepts, Inc.