Skip to main content
Skip table of contents

DelayciFract32

Overview

Cubic interpolated time delay Fractional version

Discussion

An interpolated Fractional delay module, where the delay is specified as a fractional number of samples. The delay is implemented such that delays as short as 0 samples can be realized. 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, 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. In addition, you specify the instantaneous delay through the interface variable .currentDelay. currentDelay is in the range [0 maxDelay] and can be changed at run-time. currentDelay can be specified as a fractional delay value. 4nd order cubic interpolation is used. Note that the module is not smoothly updating and you may get audible clicks when adjusting the currentDelay at run-time.

Type Definition

CODE
typedef struct _ModuleDelayciFract32
{
    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
    fract32 currentDelayFract32;                  // Current delay in Fract32 format
    FLOAT32 modDepth;                             // Maximum depth, in samples, of the modulation signal
    fract32 modDepthFract32;                      // Maximum depth, in samples, of the modulation signal
    INT32 postShift;                              // Number of bits to shift
    INT32 stateIndex;                             // Index of the oldest state variable in the array of state variables
    INT32 stateHeap;                              // Heap in which to allocate memory
    fract32* state;                               // State variable array
} ModuleDelayciFract32Class;

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

currentDelayFract32

fract32

derived

0

0

Unrestricted

modDepth

float

parameter

0

0

0:0.1:100

samples

modDepthFract32

fract32

derived

0

0

Unrestricted

postShift

int

derived

1

16

Unrestricted

stateIndex

int

state

1

0

Unrestricted

stateHeap

int

const

1

561

Unrestricted

state

fract32*

state

1

[1 x 101]

Unrestricted

Pins

Input Pins

Name: mod

Description: modulation input

Data type: fract32

Channel range: 1

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

Name: in

Description: audio input

Data type: fract32

Channel range: Unrestricted

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: fract32

MATLAB Usage

File Name: delayci_fract32_module.m

CODE
M=delayci_fract32_module(NAME, MAXDELAY, MEMHEAP)
 Creates a fractional sample time delay for use in the Audio Weaver.  Arguments:
 Arguments:
    NAME - name of the module.
    MAXDELAY - Maximum delay, in samples.
    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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.