Overview
Time delay in which the delay is specified in milliseconds
Discussion
A delay module, where the delay is specified in milliseconds. 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 time (maxDelayTime) of the module. The variable, maxDelayTime determines the size of the internal state buffer. The size of the internal state buffer equals (maxDelay+1)*numChannels. In addition, the instantaneous delay is specified through the interface variable, currentDelay. currentDelay is in the range of [0 maxDelayTime] and can be changed at run-time. The actual delay applied is in integer sample ammounts and so depends on the sample rate. delay = floor( currentDelay * SR ) / SR Note that the module is not smoothly updating and you may get audible clicks when adjusting the currentDelay at run-time.
Type Definition
Code Block |
---|
typedef struct _ModuleDelayMsec { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure FLOAT32 maxDelayTime; // Maximum delay, in milliseconds. FLOAT32 currentDelayTime; // Current delay. INT32 stateHeap; // Heap in which to allocate state buffer memory. awe_modDelayInstance *delay; // Time delay in which the delay is specified in samples } ModuleDelayMsecClass; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
maxDelayTime | float | const | 0 | 10 | 0:10 | msec |
currentDelayTime | float | parameter | 0 | 0 | 0:10 | msec |
stateHeap | int | const | 1 | 561 | Unrestricted |
Pins
Input Pins
Name: in
Description: Audio Input
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: Audio output
Data type: {float, int, fract32}
MATLAB Usage
File Name: delaymsec_module.m
...