Difference between revisions of "Component: Delay (DSP)"

From Flowcode Help
Jump to navigationJump to search
Line 35: Line 35:
  
 
[[File:DSPDelay.jpg]]
 
[[File:DSPDelay.jpg]]
 +
 +
 +
Note: 8-bit PICs can only reference an array of up to 256 elements. Anything more then this will cause compilation errors. There is a workaround documented on the user forums on how to get around this limitation but it adds overhead to the rest of the program.
  
 
==Downloadable macro reference==
 
==Downloadable macro reference==

Revision as of 16:03, 22 November 2013


Author Matrix Ltd
Version 1.2
Category DSP


Image Delay component

Allows an adjustable delay to be inserted into the DSP system

Examples

Here is a simple example file for the Delay component.

File:Delay.fcfx


The DelayADC component is used to set the amount of delay that the component provides 0-2550 samples in steps of 10 samples.


The Input ADC component is used to pass a variable value into the DSP chain to allow the delay to be simulated.


Here is a picture showing the scope response of the delay component.

DSPDelay.jpg


Note: 8-bit PICs can only reference an array of up to 256 elements. Anything more then this will cause compilation errors. There is a workaround documented on the user forums on how to get around this limitation but it adds overhead to the rest of the program.

Downloadable macro reference

DelayTick

Passes a single value from a buffer into the delay buffer and spits out a delayed value at the other end

Parameters

This macro has no parameters


Return value

This call does not return a value


Delay

Passes an entire buffer into the delay buffer and spits out a delayed version of the buffer at the other end

Parameters

This macro has no parameters


Return value

This call does not return a value


SetDelaySize

Specifies the number of values in the delay buffer to allow the length of the delay to be adjustable during runtime.

Parameters

UINT Delay_Count


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

Max Delay Count

This property is of type Signed integer and can be referenced with the variable name max_delay.

The maximum number of values to delay the incoming signal by

Initial Delay Count

This property is of type Signed integer and can be referenced with the variable name initial_delay.

The initial delay that will be used at startup

Buffer Manager

This property is of type Fixed list of ints and can be referenced with the variable name buffer_manager.

Specifies the DSP system buffer manager

Input

This property is of type Fixed list of ints and can be referenced with the variable name input_a.

Specifies the buffer which is used as the input to the delay

Output

This property is of type Fixed list of ints and can be referenced with the variable name output_c.

Specifies the buffer which is used as the output to the delay

Sample Rate (Hz)

This property is of type Floating point and can be referenced with the variable name sample_rate.

Sample rate used to generate some useful calculations

Max Delay (s)

This property is of type Floating point and can be referenced with the variable name del_max.

Maximum possible delay in seconds at the specified sample rate

Initial Delay (s)

This property is of type Floating point and can be referenced with the variable name del_initial.

Initial delay in seconds at the specified sample rate