Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Overview

Delays signals by a multiple of the blockSize

Discussion

A block delay module, where the delay is specified as an integer number of blocks. The delay is implemented such that delays as short as 0 blocks 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, 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 (maxBlockDelay+1)*blockSize*numChannels. In addition, the instantaneous delay is specified through the interface variable, currentBlockDelay. currentBlockDelay is in the range of [0 maxBlockDelay] and can be changed at run-time. Note that the module is not smoothly updating and you may get audible clicks when adjusting the currentBlockDelay at run-time.

Type Definition

typedef struct _ModuleBlockDelayV2
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 maxBlockDelay;                          // Maximum delay that can be realized, in blocks. The size of the delay buffer, (maxDelay+1)*blockSize*numChannels.
    INT32 currentBlockDelay;                      // Current block delay.
    INT32 stateIndex;                             // Index of the oldest state variable in the array of state variables.
    INT32 stateHeap;                              // Heap in which to allocate memory.
    FLOAT32* state;                               // State variable array.
} ModuleBlockDelayV2Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

maxBlockDelay

int

const

0

10

1:1000

blocks

currentBlockDelay

int

parameter

0

0

0:1:10

blocks

stateIndex

int

state

1

0

Unrestricted

stateHeap

int

const

1

2

Unrestricted

state

float*

state

1

[1 x 352]

Unrestricted

Pins

Input Pins

Name: in

         Description: audio input

           Data type: {float, int, fract32}

       Channel range: Unrestricted

    Block size range: Unrestricted

   Sample rate range: Unrestricted

     Complex support: Real and Complex

Output Pins

Name: out

Description: audio output

Data type: {float, int, fract32}

MATLAB Usage

File Name: block_delay_v2_module.m

 M=block_delay_v2_module(NAME, MAXBLOCKDELAY, MEMHEAP)
 Creates a block delay module for use in the Audio Weaver environment. The
 module delays the input by a multiple of the block size.  
 
 Arguments:
    NAME - name of the module.
    MAXBLOCKDELAY - maximum delay, in blocks.
    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 (the default).
            'AWE_HEAP_FAST2SLOW' - use internal memory. If this fails
               then use external memory.

  • No labels