(8.D.2.6) DelayNChanMsecSmoothed
Overview
Module with different time delay for each channel specified in milliseconds
Discussion
This time delay module has multiple input and multiple output channels. The delay of each output channel can be independently set by the currentDelayTime array. The initial number of channels is specified at construction time and this also equals the length of the currentDelayTime array. Actual size of the currentDelayTime is updated in the prebuild function. Delays are specified in milliseconds and are in the range of [0 MAXDELAY].
At construction time, you specify the maximum delay (maxDelay) of the module. The variable, maxDelay determines the size of the internal state buffer. The size of the internal state buffer equals (maxDelay+1)*numChannels samples. The delay time per channel is specified by the currentDelayTime array.
delay = floor( currentDelay * SR ) / SR
Delays can be adjusted at run-time. The module applies smooth cross fading when adjusting the currentDelay at run-time.
Type Definition
typedef struct _ModuleDelayNChanMsecSmoothed
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
FLOAT32 maxDelayTime; // Maximum delay, in milliseconds.
FLOAT32 smoothingTime; // Time constant of the cross fading process
INT32 stateHeap; // Heap in which to allocate memory. Used to pass the value to internal delaynchan module.
INT32 maxDelay; // Max delay in samples. Used to pass the value to internal delaynchan module.
FLOAT32* currentDelayTime; // Current delay, in milliseconds.
awe_modDelayNChanSmoothedInstance *delay; // Module with different time delay for each channel specified in samples
} ModuleDelayNChanMsecSmoothedClass;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
maxDelayTime | float | const | 0 | 10 | 0:10 | msec |
smoothingTime | float | parameter | 0 | 10 | 0:1000 | msec |
stateHeap | int | const | 1 | 561 | Unrestricted | Â |
maxDelay | int | const | 1 | 480 | Unrestricted | Â |
currentDelayTime | float* | parameter | 0 | [1 x 1] | 0:10 | msec |
Pins
Input Pins
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
Scratch Pins
Channel count: 1
Block size: 32
Sample rate: 48000
MATLAB Usage
File Name: delaynchan_msec_smoothed_module.m
SYS=delaynchan_msec_smoothed_module(NAME, NUMCHANNELS, MAXDELAY, MEMHEAP)
Creates a multi-channel time delay in which the delay times are specified
in milliseconds. The module has a multichannel input pin
and an multichannel output pin. Each output channel is a delayed
version of the corresponding input channel with different delay times
for each channel. The module applies smooth transition between delay time
changes.
Arguments:
NAME - name of the module.
NUMCHANNELS - number of channels for the module.
MAXDELAY - maximum delay, in milliseconds.
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.
Â