Mozzi  version v2.0
sound synthesis library for Arduino
ControlDelay.h
1 /*
2  * ControlDelay.h
3  *
4  * This file is part of Mozzi.
5  *
6  * Copyright 2012-2024 Tim Barrass and the Mozzi Team
7  *
8  * Mozzi is licensed under the GNU Lesser General Public Licence (LGPL) Version 2.1 or later.
9  *
10  */
11 
12 #ifndef CONTROLDELAY_H_
13 #define CONTROLDELAY_H_
14 
15 #include "AudioDelay.h"
16 
17 /**
18 @brief Control-rate delay line for delaying control signals.
19 For example, this could be used to produce echo-like effects using multiple
20 instances of the same voice, when AudioDelay would be too short for an actual
21 audio echo. This is in fact just a wrapper of the AudioDelay code.
22 @tparam NUM_BUFFER_SAMPLES is the length of the delay buffer in samples. This should
23 be a power of two.
24 @tparam the type of numbers to use for the signal in the delay. The default is int8_t, but int could be useful
25 when adding manual feedback. When using int, the input should be limited to 15 bits width, ie. -16384 to 16383.
26 */
27 
28 template <unsigned int NUM_BUFFER_SAMPLES, class T = int>
29 class ControlDelay: public AudioDelay<NUM_BUFFER_SAMPLES, T>
30 {
31 };
32 
33 /**
34 @example 02.Control/Control_Echo_Theremin/Control_Echo_Theremin.ino
35 This is an example of how to use the ControlDelay class.
36 */
37 
38 #endif // #ifndef CONTROLDELAY_H_