| Mozzi version v1.1.0 sound synthesis library for Arduino |

Public Member Functions | List of all members
ControlDelay< NUM_BUFFER_SAMPLES, T > Class Template Reference

Control-rate delay line for delaying control signals. More...

`#include <ControlDelay.h>`

Inheritance diagram for ControlDelay< NUM_BUFFER_SAMPLES, T >:

## Public Member Functions
T | next (T in_value, unsigned int delaytime_cells)
| Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells. More...
T | next (T in_value)
| Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells. More...
void | set (unsigned int delaytime_cells)
| Set the delay time, measured in cells. More...
T | read (unsigned int delaytime_cells)
| Retrieve the signal in the delay line at the position delaytime_cells. More...

## Detailed Description

### template<unsigned int NUM_BUFFER_SAMPLES, class T = int>
class ControlDelay< NUM_BUFFER_SAMPLES, T >

Control-rate delay line for delaying control signals.

For example, this could be used to produce echo-like effects using multiple instances of the same voice, when AudioDelay would be too short for an actual audio echo. This is in fact just a wrapper of the AudioDelay code.

Template Parameters

  NUM_BUFFER_SAMPLES | is the length of the delay buffer in samples. This should be a power of two.
  the | type of numbers to use for the signal in the delay. The default is int8_t, but int could be useful when adding manual feedback. When using int, the input should be limited to 15 bits width, ie. -16384 to 16383.

Definition at line 29 of file ControlDelay.h.

## Member Function Documentation

## ◆ next() [1/2]

template<unsigned int NUM_BUFFER_SAMPLES, class T = int8_t>

T AudioDelay< NUM_BUFFER_SAMPLES, T >::next | ( | T | in_value,
|  | unsigned int | delaytime_cells
| ) |  |
| inline inherited

Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells.

Parameters

  in_value | the signal input.
  delaytime_cells | sets the delay time in terms of cells in the delay buffer.

Definition at line 59 of file AudioDelay.h.

## ◆ next() [2/2]

template<unsigned int NUM_BUFFER_SAMPLES, class T = int8_t>

T AudioDelay< NUM_BUFFER_SAMPLES, T >::next | ( | T | in_value | ) |
| inline inherited

Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells.

Parameters

  in_value | the signal input.

Definition at line 77 of file AudioDelay.h.

## ◆ read()

template<unsigned int NUM_BUFFER_SAMPLES, class T = int8_t>

T AudioDelay< NUM_BUFFER_SAMPLES, T >::read | ( | unsigned int | delaytime_cells | ) |
| inline inherited

Retrieve the signal in the delay line at the position delaytime_cells.

It doesn't change the stored internal value of _delaytime_cells.

Parameters

  delaytime_cells | indicates the delay time in terms of cells in the delay buffer.

Definition at line 104 of file AudioDelay.h.

## ◆ set()

template<unsigned int NUM_BUFFER_SAMPLES, class T = int8_t>

void AudioDelay< NUM_BUFFER_SAMPLES, T >::set | ( | unsigned int | delaytime_cells | ) |
| inline inherited

Set the delay time, measured in cells.

Parameters

  delaytime_cells | how many cells to delay the input signal by.

Definition at line 94 of file AudioDelay.h.