From 091c31998b11d32c68483db4b9c9b96fef2b5550 Mon Sep 17 00:00:00 2001 From: tomcombriat Date: Thu, 28 Nov 2024 18:49:13 +0100 Subject: [PATCH] Regen docs Added Mozzi logo Correct doc regen Correct doxygen --- AudioDelayFeedback.h | 2 +- ...udio_delay_2_audio_delay_8ino-example.html | 2 +- ...k_2_audio_delay_feedback_8ino-example.html | 2 +- extras/doc/html/_audio_delay_8h_source.html | 2 +- .../html/_audio_delay_feedback_8h_source.html | 770 +++++++++--------- extras/doc/html/_meta_oscil_8h_source.html | 407 ++++----- .../class_audio_delay_feedback-members.html | 34 +- .../doc/html/class_audio_delay_feedback.html | 257 +++--- extras/doc/html/class_audio_delay_feedback.js | 30 +- extras/doc/html/class_meta_oscil-members.html | 17 +- extras/doc/html/class_meta_oscil.html | 84 +- extras/doc/html/class_meta_oscil.js | 1 + extras/doc/html/files.html | 131 +-- extras/doc/html/files_dup.js | 1 + extras/doc/html/functions.html | 2 +- extras/doc/html/functions_func.html | 2 +- extras/doc/html/functions_func_n.html | 2 +- extras/doc/html/functions_func_r.html | 2 +- extras/doc/html/functions_func_s.html | 4 +- extras/doc/html/functions_func_w.html | 4 +- extras/doc/html/functions_n.html | 2 +- extras/doc/html/functions_r.html | 2 +- extras/doc/html/functions_s.html | 4 +- extras/doc/html/functions_w.html | 4 +- extras/doc/html/hierarchy.html | 93 +-- extras/doc/html/hierarchy.js | 3 +- extras/doc/html/mozzi-circle.png | Bin 0 -> 5915 bytes extras/doc/html/navtreedata.js | 8 +- extras/doc/html/navtreeindex0.js | 498 +++++------ extras/doc/html/navtreeindex1.js | 500 ++++++------ extras/doc/html/navtreeindex2.js | 96 +-- extras/doc/html/navtreeindex3.js | 114 +-- extras/doc/html/search/all_0.js | 2 +- extras/doc/html/search/all_10.js | 129 +-- extras/doc/html/search/all_11.js | 2 +- extras/doc/html/search/all_12.js | 12 +- extras/doc/html/search/all_13.js | 16 +- extras/doc/html/search/all_14.js | 4 +- extras/doc/html/search/all_8.js | 7 +- extras/doc/html/search/all_9.js | 22 +- extras/doc/html/search/all_a.js | 91 ++- extras/doc/html/search/all_b.js | 8 +- extras/doc/html/search/all_c.js | 14 +- extras/doc/html/search/all_d.js | 20 +- extras/doc/html/search/all_e.js | 196 ++--- extras/doc/html/search/all_f.js | 30 +- extras/doc/html/search/classes_0.js | 24 +- extras/doc/html/search/classes_1.js | 6 +- extras/doc/html/search/classes_2.js | 2 +- extras/doc/html/search/classes_3.js | 4 +- extras/doc/html/search/classes_4.js | 19 +- extras/doc/html/search/classes_5.js | 16 +- extras/doc/html/search/classes_6.js | 12 +- extras/doc/html/search/classes_7.js | 10 +- extras/doc/html/search/classes_8.js | 8 +- extras/doc/html/search/classes_9.js | 12 +- extras/doc/html/search/classes_a.js | 16 +- extras/doc/html/search/classes_b.js | 12 +- extras/doc/html/search/files_0.js | 2 +- extras/doc/html/search/files_1.js | 10 +- extras/doc/html/search/functions_0.js | 20 +- extras/doc/html/search/functions_1.js | 2 +- extras/doc/html/search/functions_10.js | 124 +-- extras/doc/html/search/functions_11.js | 2 +- extras/doc/html/search/functions_12.js | 10 +- extras/doc/html/search/functions_13.js | 10 +- extras/doc/html/search/functions_14.js | 4 +- extras/doc/html/search/functions_2.js | 6 +- extras/doc/html/search/functions_3.js | 4 +- extras/doc/html/search/functions_4.js | 4 +- extras/doc/html/search/functions_5.js | 36 +- extras/doc/html/search/functions_6.js | 18 +- extras/doc/html/search/functions_7.js | 2 +- extras/doc/html/search/functions_8.js | 4 +- extras/doc/html/search/functions_9.js | 4 +- extras/doc/html/search/functions_a.js | 16 +- extras/doc/html/search/functions_b.js | 8 +- extras/doc/html/search/functions_c.js | 6 +- extras/doc/html/search/functions_d.js | 18 +- extras/doc/html/search/functions_e.js | 120 +-- extras/doc/html/search/functions_f.js | 28 +- extras/doc/html/search/groups_0.js | 6 +- extras/doc/html/search/groups_1.js | 4 +- extras/doc/html/search/groups_2.js | 2 +- extras/doc/html/search/groups_3.js | 6 +- extras/doc/html/search/groups_4.js | 2 +- extras/doc/html/search/namespaces_0.js | 3 +- extras/doc/html/search/pages_0.js | 2 +- extras/doc/html/search/pages_1.js | 2 +- extras/doc/html/search/pages_2.js | 2 +- extras/doc/html/search/pages_3.js | 2 +- extras/doc/html/search/pages_4.js | 26 +- extras/doc/html/search/related_0.js | 2 +- extras/doc/html/search/related_1.js | 2 +- extras/doc/html/search/related_2.js | 2 +- extras/doc/html/search/related_3.js | 2 +- extras/doc/html/search/searchdata.js | 27 +- extras/doc/html/search/typedefs_0.js | 44 +- extras/doc/html/sin1024__int8_8py_source.html | 1 - 99 files changed, 2233 insertions(+), 2136 deletions(-) create mode 100644 extras/doc/html/mozzi-circle.png diff --git a/AudioDelayFeedback.h b/AudioDelayFeedback.h index eb6a865cc..83d2e64b0 100644 --- a/AudioDelayFeedback.h +++ b/AudioDelayFeedback.h @@ -32,7 +32,7 @@ with the input, do it in your sketch. AudioDelayFeedback uses more processing an than a plain AudioDelay, but allows for more dramatic effects with feedback. @tparam INTERP_TYPE a choice of LINEAR (default) or ALLPASS interpolation. LINEAR is better for sweeping delay times, ALLPASS may be better for reverb-like effects. -@tparam the type of numbers to use for the signal in the delay. The default is int8_t, but int16_t could be useful. Larger types (int32_t) might produce overflows as of v2.0.2. +@tparam su the type of numbers to use for the signal in the delay. The default is int8_t, but int16_t could be useful. Larger types (int32_t) might produce overflows as of v2.0.2. */ template class AudioDelayFeedback diff --git a/extras/doc/html/09_8_delays_2_audio_delay_2_audio_delay_8ino-example.html b/extras/doc/html/09_8_delays_2_audio_delay_2_audio_delay_8ino-example.html index 741cff921..b48af9927 100644 --- a/extras/doc/html/09_8_delays_2_audio_delay_2_audio_delay_8ino-example.html +++ b/extras/doc/html/09_8_delays_2_audio_delay_2_audio_delay_8ino-example.html @@ -149,7 +149,7 @@
}
AudioOutput updateAudio(){
-
char asig = aDel.next(aTriangle.next(), del_samps);
+
int8_t asig = aDel.next(aTriangle.next(), del_samps);
return MonoOutput::from8Bit(asig);
}
diff --git a/extras/doc/html/09_8_delays_2_audio_delay_feedback_2_audio_delay_feedback_8ino-example.html b/extras/doc/html/09_8_delays_2_audio_delay_feedback_2_audio_delay_feedback_8ino-example.html index e716a5758..33973f140 100644 --- a/extras/doc/html/09_8_delays_2_audio_delay_feedback_2_audio_delay_feedback_8ino-example.html +++ b/extras/doc/html/09_8_delays_2_audio_delay_feedback_2_audio_delay_feedback_8ino-example.html @@ -160,7 +160,7 @@
AudioOutput updateAudio(){
-
char asig = aTriangle.next(); // get this so it can be used twice without calling next() again
+
int8_t asig = aTriangle.next(); // get this so it can be used twice without calling next() again
//return asig/8 + aDel.next(asig, (uint16_t) del_samps); // mix some straight signal with the delayed signal
//return aDel.next(aTriangle.next(), (uint16_t) del_samps); // instead of the previous 2 lines for only the delayed signal
return MonoOutput::fromAlmostNBit(9, (asig >> 3) + aDel.next(asig, deltime)); // mix some straight signal with the delayed signal
diff --git a/extras/doc/html/_audio_delay_8h_source.html b/extras/doc/html/_audio_delay_8h_source.html index b2082fe5f..1a758abdb 100644 --- a/extras/doc/html/_audio_delay_8h_source.html +++ b/extras/doc/html/_audio_delay_8h_source.html @@ -164,7 +164,7 @@
63 
64  // why does delay jump if I read it before writing?
65  delay_array[_write_pos] = in_value; // write to buffer
-
66  int8_t delay_sig = delay_array[read_pos] ; // read the delay buffer
+
66  T delay_sig = delay_array[read_pos] ; // read the delay buffer
67 
68  return (T)delay_sig;
69  }
diff --git a/extras/doc/html/_audio_delay_feedback_8h_source.html b/extras/doc/html/_audio_delay_feedback_8h_source.html index ce2240cdc..9be75c559 100644 --- a/extras/doc/html/_audio_delay_feedback_8h_source.html +++ b/extras/doc/html/_audio_delay_feedback_8h_source.html @@ -117,393 +117,409 @@
16 
17 #include "mozzi_utils.h"
18 #include "meta.h"
-
19 
-
20 enum interpolation_types {LINEAR,ALLPASS};
-
21 
+
19 #include "IntegerType.h"
+
20 
+
21 enum interpolation_types {LINEAR,ALLPASS};
22 
-
23 /** Audio delay line with feedback for comb filter, flange, chorus and short echo effects.
-
24 @tparam NUM_BUFFER_SAMPLES is the length of the delay buffer in samples, and should be a
-
25 power of two. The maximum delay length which will fit in an atmega328 is half
-
26 that of a plain AudioDelay object, in this case 256 cells, or about 15
-
27 milliseconds. AudioDelayFeedback uses int16_t sized cells to accomodate the higher
-
28 amplitude of direct input to the delay as well as the feedback, without losing
-
29 precision. Output is only the delay line signal. If you want to mix the delay
-
30 with the input, do it in your sketch. AudioDelayFeedback uses more processing and memory
-
31 than a plain AudioDelay, but allows for more dramatic effects with feedback.
-
32 @tparam INTERP_TYPE a choice of LINEAR (default) or ALLPASS interpolation. LINEAR is better
-
33 for sweeping delay times, ALLPASS may be better for reverb-like effects.
-
34 */
-
35 template <uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
- -
37 {
-
38 
-
39 public:
-
40  /** Constructor.
-
41  */
- -
43  {}
-
44 
-
45 
-
46  /** Constructor.
-
47  @param delaytime_cells delay time expressed in cells.
-
48  For example, 128 cells delay at MOZZI_AUDIO_RATE 16384 would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
-
49  Put another way, num_cells = delay_seconds * MOZZI_AUDIO_RATE.
-
50  */
- -
52  {}
-
53 
-
54 
-
55  /** Constructor.
-
56  @param delaytime_cells delay time expressed in cells.
-
57  For example, 128 cells delay at MOZZI_AUDIO_RATE 16384 would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
-
58  Put another way, num_cells = delay_seconds * MOZZI_AUDIO_RATE.
-
59  @param feedback_level is the feedback level from -128 to 127 (representing -1 to 1).
-
60  */
-
61  AudioDelayFeedback(uint16_t delaytime_cells, int8_t feedback_level): write_pos(0), _feedback_level(feedback_level), _delaytime_cells(delaytime_cells)
-
62  {}
-
63 
-
64 
-
65 
-
66  /** Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells.
-
67  @param input the signal input.
-
68  @note slower than next(int8_t input, uint16_t delaytime_cells)
-
69  */
-
70  inline
- -
72  {
-
73  // chooses a different next() function depending on whether the
-
74  // the template parameter is LINEAR(default if none provided) or ALLPASS.
-
75  // See meta.h.
-
76  return next(input, Int2Type<INTERP_TYPE>());
-
77  }
-
78 
-
79 
-
80 
-
81  /** Input a value to the delay, retrieve the signal in the delay line at the position delaytime_cells, and add feedback from the output to the input.
-
82  @param input the signal input.
-
83  @param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
-
84  It doesn't change the stored internal value of _delaytime_cells.
-
85  @note Timing: 4us
-
86  */
-
87  inline
- -
89  {
-
90  //setPin13High();
-
91  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
-
92  uint16_t read_pos = (write_pos - delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
-
93  // < 1us to here
-
94  int16_t delay_sig = delay_array[read_pos]; // read the delay buffer
-
95  // with this line, the method takes 18us
-
96  //int8_t feedback_sig = (int8_t) min(max(((delay_sig * _feedback_level)/128),-128),127); // feedback clipped
-
97  // this line, the whole method takes 4us... Compiler doesn't optimise pow2 divides. Why?
-
98  int8_t feedback_sig = (int8_t) min(max(((delay_sig * _feedback_level)>>7),-128),127); // feedback clipped
-
99  delay_array[write_pos] = (int16_t) input + feedback_sig; // write to buffer
-
100  //setPin13Low();
-
101  return delay_sig;
-
102  }
-
103 
-
104 
-
105 
-
106  /** Input a value to the delay, retrieve the signal in the delay line at the interpolated fractional position delaytime_cells, and add feedback from the output to the input.
-
107  @param input the signal input.
-
108  @param delaytime_cells is a fractional number to set the delay time in terms of cells
-
109  or partial cells in the delay buffer. It doesn't change the stored internal
-
110  value of _delaytime_cells.
-
111  */
-
112  inline
- -
114  {
-
115  //setPin13High();
-
116  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
-
117 
-
118  uint16_t index = Q16n16_to_Q16n0(delaytime_cells);
-
119  uint16_t fraction = (uint16_t) delaytime_cells; // keeps low word
-
120 
-
121  uint16_t read_pos1 = (write_pos - index) & (NUM_BUFFER_SAMPLES - 1);
-
122  int16_t delay_sig1 = delay_array[read_pos1]; // read the delay buffer
-
123 
-
124  uint16_t read_pos2 = (write_pos - (index+1)) & (NUM_BUFFER_SAMPLES - 1);
-
125  int16_t delay_sig2 = delay_array[read_pos2]; // read the delay buffer
-
126 
-
127 
-
128  int16_t difference = delay_sig2 - delay_sig1;
-
129  int16_t delay_sig_fraction = (int16_t)((int32_t)((int32_t) fraction * difference) >> 16);
-
130 
-
131  int16_t delay_sig = delay_sig1+delay_sig_fraction;
+
23 
+
24 /** Audio delay line with feedback for comb filter, flange, chorus and short echo effects.
+
25 @tparam NUM_BUFFER_SAMPLES is the length of the delay buffer in samples, and should be a
+
26 power of two. The maximum delay length which will fit in an atmega328 is half
+
27 that of a plain AudioDelay object, in this case 256 cells, or about 15
+
28 milliseconds. AudioDelayFeedback uses int16_t sized cells to accomodate the higher
+
29 amplitude of direct input to the delay as well as the feedback, without losing
+
30 precision. Output is only the delay line signal. If you want to mix the delay
+
31 with the input, do it in your sketch. AudioDelayFeedback uses more processing and memory
+
32 than a plain AudioDelay, but allows for more dramatic effects with feedback.
+
33 @tparam INTERP_TYPE a choice of LINEAR (default) or ALLPASS interpolation. LINEAR is better
+
34 for sweeping delay times, ALLPASS may be better for reverb-like effects.
+
35 @tparam su the type of numbers to use for the signal in the delay. The default is int8_t, but int16_t could be useful. Larger types (int32_t) might produce overflows as of v2.0.2.
+
36 */
+
37 template <uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su=int8_t>
+ +
39 {
+
40 
+
41  typedef typename IntegerType<sizeof(su)+sizeof(su)>::signed_type return_type;
+
42 
+
43 public:
+
44  /** Constructor.
+
45  */
+ +
47  {}
+
48 
+
49 
+
50  /** Constructor.
+
51  @param delaytime_cells delay time expressed in cells.
+
52  For example, 128 cells delay at MOZZI_AUDIO_RATE 16384 would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
+
53  Put another way, num_cells = delay_seconds * MOZZI_AUDIO_RATE.
+
54  */
+ +
56  {}
+
57 
+
58 
+
59  /** Constructor.
+
60  @param delaytime_cells delay time expressed in cells.
+
61  For example, 128 cells delay at MOZZI_AUDIO_RATE 16384 would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
+
62  Put another way, num_cells = delay_seconds * MOZZI_AUDIO_RATE.
+
63  @param feedback_level is the feedback level from -128 to 127 (representing -1 to 1).
+
64  */
+
65  AudioDelayFeedback(uint16_t delaytime_cells, int8_t feedback_level): write_pos(0), _feedback_level(feedback_level), _delaytime_cells(delaytime_cells)
+
66  {}
+
67 
+
68 
+
69 
+
70  /** Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells.
+
71  @param input the signal input.
+
72  @note slower than next(int8_t input, uint16_t delaytime_cells)
+
73  */
+
74  inline
+
75  return_type next(su input)
+
76  {
+
77  // chooses a different next() function depending on whether the
+
78  // the template parameter is LINEAR(default if none provided) or ALLPASS.
+
79  // See meta.h.
+
80  return next(input, Int2Type<INTERP_TYPE>());
+
81  }
+
82 
+
83 
+
84 
+
85  /** Input a value to the delay, retrieve the signal in the delay line at the position delaytime_cells, and add feedback from the output to the input.
+
86  @param input the signal input.
+
87  @param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
+
88  It doesn't change the stored internal value of _delaytime_cells.
+
89  @note Timing: 4us
+
90  */
+
91  inline
+
92  return_type next(su input, uint16_t delaytime_cells)
+
93  {
+
94  //setPin13High();
+
95  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
+
96  uint16_t read_pos = (write_pos - delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
+
97  // < 1us to here
+
98  return_type delay_sig = delay_array[read_pos]; // read the delay buffer
+
99  // with this line, the method takes 18us
+
100  //int8_t feedback_sig = (int8_t) min(max(((delay_sig * _feedback_level)/128),-128),127); // feedback clipped
+
101  // this line, the whole method takes 4us... Compiler doesn't optimise pow2 divides. Why?
+
102  //int8_t feedback_sig = (int8_t) min(max(((delay_sig * _feedback_level)>>7),-128),127); // feedback clipped
+
103  su feedback_sig = (su) constrain( ((delay_sig * _feedback_level)>>7), -(1<<((sizeof(su)<<3)-1)), (1<<((sizeof(su)<<3)-1))-1);
+
104  delay_array[write_pos] = (return_type)input + feedback_sig; // write to buffer
+
105  //setPin13Low();
+
106  return delay_sig;
+
107  }
+
108 
+
109 
+
110 
+
111  /** Input a value to the delay, retrieve the signal in the delay line at the interpolated fractional position delaytime_cells, and add feedback from the output to the input.
+
112  @param input the signal input.
+
113  @param delaytime_cells is a fractional number to set the delay time in terms of cells
+
114  or partial cells in the delay buffer. It doesn't change the stored internal
+
115  value of _delaytime_cells.
+
116  */
+
117  inline
+
118  return_type next(su input, Q16n16 delaytime_cells)
+
119  {
+
120  //setPin13High();
+
121  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
+
122 
+
123  uint16_t index = Q16n16_to_Q16n0(delaytime_cells);
+
124  uint16_t fraction = (uint16_t) delaytime_cells; // keeps low word
+
125 
+
126  uint16_t read_pos1 = (write_pos - index) & (NUM_BUFFER_SAMPLES - 1);
+
127  return_type delay_sig1 = delay_array[read_pos1]; // read the delay buffer
+
128 
+
129  uint16_t read_pos2 = (write_pos - (index+1)) & (NUM_BUFFER_SAMPLES - 1);
+
130  return_type delay_sig2 = delay_array[read_pos2]; // read the delay buffer
+
131 
132 
-
133  //int16_t delay_sig = delay_sig1 + ((int32_t)delay_sig2*fraction)>>16;
-
134 
-
135  int8_t feedback_sig = (int8_t) min(max((((int16_t)(delay_sig * _feedback_level))>>7),-128),127); // feedback clipped
-
136  delay_array[write_pos] = (int16_t) input + feedback_sig; // write to buffer
-
137  //setPin13Low();
-
138  return delay_sig;
-
139  }
+
133  return_type difference = delay_sig2 - delay_sig1;
+
134  //int16_t delay_sig_fraction = (int16_t)((int32_t)((int32_t) fraction * difference) >> 16);
+
135  return_type delay_sig_fraction = (return_type)((typename IntegerType<sizeof(return_type)+sizeof(return_type)>::signed_type)((typename IntegerType<sizeof(return_type)+sizeof(return_type)>::signed_type)fraction * difference) >> 16);
+
136 
+
137  return_type delay_sig = delay_sig1+delay_sig_fraction;
+
138 
+
139  //int16_t delay_sig = delay_sig1 + ((int32_t)delay_sig2*fraction)>>16;
140 
-
141 
-
142  /** Input a value to the delay but don't change the delay time or retrieve the output signal.
-
143  @param input the signal input.
-
144  */
-
145  inline
-
146  void write(int8_t input)
-
147  {
-
148  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
-
149  delay_array[write_pos] = input;
-
150  }
-
151 
-
152 
-
153  /** Input a value to the delay but don't advance the write position, change the delay time or retrieve the output signal.
-
154  This can be useful for manually adding feedback to the delay line, "behind" the advancing write head.
-
155  @param input the signal input.
-
156  */
-
157  inline
-
158  void writeFeedback(int8_t input)
-
159  {
-
160  delay_array[write_pos] = input;
-
161  }
-
162 
-
163 
-
164  /** Input a value to the delay at an offset from the current write position. Don't advance the main
-
165  write position or change the stored delay time or retrieve the output signal.
-
166  @param input the signal input.
-
167  @param offset the number of cells behind the ordinary write position where the input will be written.
-
168  */
-
169  inline
-
170  void write(int8_t input, uint16_t offset)
-
171  {
-
172  uint16_t _pos = (write_pos + offset) & (NUM_BUFFER_SAMPLES - 1);
-
173  delay_array[_pos] = input;
-
174  }
-
175 
-
176 
-
177  /** Retrieve the signal in the delay line at the interpolated fractional position delaytime_cells.
-
178  It doesn't change the stored internal value of _delaytime_cells or feedback the output to the input.
-
179  @param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
-
180  */
-
181  inline
- -
183  {
-
184  return read(delaytime_cells, Int2Type<INTERP_TYPE>());
-
185  }
-
186 
-
187 
-
188  /** Retrieve the signal in the delay line at the current stored delaytime_cells.
-
189  It doesn't change the stored internal value of _delaytime_cells or feedback the output to the input.
-
190  */
-
191  inline
- -
193  {
-
194  return read(Int2Type<INTERP_TYPE>());
-
195  }
-
196 
-
197 
-
198  /** Set delay time expressed in samples.
-
199  @param delaytime_cells delay time expressed in cells, with each cell played per tick of MOZZI_AUDIO_RATE.
-
200  For example, 128 cells delay at MOZZI_AUDIO_RATE would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
-
201  Put another way, num_cells = delay_seconds * MOZZI_AUDIO_RATE.
-
202  */
-
203  inline
-
204  void setDelayTimeCells(uint16_t delaytime_cells)
-
205  {
-
206  _delaytime_cells = (uint16_t) delaytime_cells;
-
207  }
-
208 
-
209 
-
210  /** Set delay time expressed in samples, fractional Q16n16 for an interpolating delay.
-
211  @param delaytime_cells delay time expressed in cells, with each cell played per tick of MOZZI_AUDIO_RATE.
-
212  For example, 128 cells delay at MOZZI_AUDIO_RATE would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
-
213  Put another way, num_cells = delay_seconds * MOZZI_AUDIO_RATE.
-
214  */
-
215  inline
-
216  void setDelayTimeCells(Q16n16 delaytime_cells)
-
217  {
-
218  return setDelayTimeCells(delaytime_cells, Int2Type<INTERP_TYPE>());
-
219  }
-
220 
-
221 
-
222  /** Set delay time expressed in samples, fractional float for an interpolating delay.
-
223  @param delaytime_cells delay time expressed in cells, with each cell played per tick of MOZZI_AUDIO_RATE.
-
224  For example, 128 cells delay at MOZZI_AUDIO_RATE would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
-
225  Put another way, num_cells = delay_seconds * MOZZI_AUDIO_RATE.
-
226  */
-
227  inline
-
228  void setDelayTimeCells(float delaytime_cells)
-
229  {
-
230  return setDelayTimeCells(delaytime_cells, Int2Type<INTERP_TYPE>());
-
231  }
-
232 
-
233 
-
234  /** Set the feedback gain.
-
235  @param feedback_level is the feedback level from -128 to 127 (representing -1 to 1).
-
236  */
-
237  inline
-
238  void setFeedbackLevel(int8_t feedback_level)
-
239  {
-
240  _feedback_level = feedback_level;
-
241  }
-
242 
-
243 
-
244 
-
245 private:
- -
247  uint16_t write_pos;
-
248  int8_t _feedback_level;
-
249  uint16_t _delaytime_cells;
-
250  Q15n16 _coeff; // for allpass interpolation
+
141  //int8_t feedback_sig = (int8_t) min(max((((int16_t)(delay_sig * _feedback_level))>>7),-128),127); // feedback clipped
+
142  su feedback_sig = (su) constrain(((delay_sig * _feedback_level)>>7), -(1<<((sizeof(su)<<3)-1)), (1<<((sizeof(su)<<3)-1))-1);
+
143  delay_array[write_pos] = (return_type) input + feedback_sig; // write to buffer
+
144  //setPin13Low();
+
145  return delay_sig;
+
146  }
+
147 
+
148 
+
149  /** Input a value to the delay but don't change the delay time or retrieve the output signal.
+
150  @param input the signal input.
+
151  */
+
152  inline
+
153  void write(su input)
+
154  {
+
155  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
+
156  delay_array[write_pos] = input;
+
157  }
+
158 
+
159 
+
160  /** Input a value to the delay but don't advance the write position, change the delay time or retrieve the output signal.
+
161  This can be useful for manually adding feedback to the delay line, "behind" the advancing write head.
+
162  @param input the signal input.
+
163  */
+
164  inline
+
165  void writeFeedback(su input)
+
166  {
+
167  delay_array[write_pos] = input;
+
168  }
+
169 
+
170 
+
171  /** Input a value to the delay at an offset from the current write position. Don't advance the main
+
172  write position or change the stored delay time or retrieve the output signal.
+
173  @param input the signal input.
+
174  @param offset the number of cells behind the ordinary write position where the input will be written.
+
175  */
+
176  inline
+
177  void write(su input, uint16_t offset)
+
178  {
+
179  uint16_t _pos = (write_pos + offset) & (NUM_BUFFER_SAMPLES - 1);
+
180  delay_array[_pos] = input;
+
181  }
+
182 
+
183 
+
184  /** Retrieve the signal in the delay line at the interpolated fractional position delaytime_cells.
+
185  It doesn't change the stored internal value of _delaytime_cells or feedback the output to the input.
+
186  @param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
+
187  */
+
188  inline
+
189  return_type read(Q16n16 delaytime_cells)
+
190  {
+
191  return read(delaytime_cells, Int2Type<INTERP_TYPE>());
+
192  }
+
193 
+
194 
+
195  /** Retrieve the signal in the delay line at the current stored delaytime_cells.
+
196  It doesn't change the stored internal value of _delaytime_cells or feedback the output to the input.
+
197  */
+
198  inline
+
199  return_type read()
+
200  {
+
201  return read(Int2Type<INTERP_TYPE>());
+
202  }
+
203 
+
204 
+
205  /** Set delay time expressed in samples.
+
206  @param delaytime_cells delay time expressed in cells, with each cell played per tick of MOZZI_AUDIO_RATE.
+
207  For example, 128 cells delay at MOZZI_AUDIO_RATE would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
+
208  Put another way, num_cells = delay_seconds * MOZZI_AUDIO_RATE.
+
209  */
+
210  inline
+
211  void setDelayTimeCells(uint16_t delaytime_cells)
+
212  {
+
213  _delaytime_cells = (uint16_t) delaytime_cells;
+
214  }
+
215 
+
216 
+
217  /** Set delay time expressed in samples, fractional Q16n16 for an interpolating delay.
+
218  @param delaytime_cells delay time expressed in cells, with each cell played per tick of MOZZI_AUDIO_RATE.
+
219  For example, 128 cells delay at MOZZI_AUDIO_RATE would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
+
220  Put another way, num_cells = delay_seconds * MOZZI_AUDIO_RATE.
+
221  */
+
222  inline
+
223  void setDelayTimeCells(Q16n16 delaytime_cells)
+
224  {
+
225  return setDelayTimeCells(delaytime_cells, Int2Type<INTERP_TYPE>());
+
226  }
+
227 
+
228 
+
229  /** Set delay time expressed in samples, fractional float for an interpolating delay.
+
230  @param delaytime_cells delay time expressed in cells, with each cell played per tick of MOZZI_AUDIO_RATE.
+
231  For example, 128 cells delay at MOZZI_AUDIO_RATE would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
+
232  Put another way, num_cells = delay_seconds * MOZZI_AUDIO_RATE.
+
233  */
+
234  inline
+
235  void setDelayTimeCells(float delaytime_cells)
+
236  {
+
237  return setDelayTimeCells(delaytime_cells, Int2Type<INTERP_TYPE>());
+
238  }
+
239 
+
240 
+
241  /** Set the feedback gain.
+
242  @param feedback_level is the feedback level from -128 to 127 (representing -1 to 1).
+
243  */
+
244  inline
+
245  void setFeedbackLevel(int8_t feedback_level)
+
246  {
+
247  _feedback_level = feedback_level;
+
248  }
+
249 
+
250 
251 
-
252 
-
253 
-
254  /** Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells.
-
255  @param in_value the signal input.
-
256  */
-
257  inline
-
258  int16_t next(int8_t in_value, Int2Type<LINEAR>)
-
259  {
-
260  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
-
261  uint16_t read_pos = (write_pos - _delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
+
252 private:
+
253  return_type delay_array[NUM_BUFFER_SAMPLES];
+
254  uint16_t write_pos;
+
255  int8_t _feedback_level;
+
256  uint16_t _delaytime_cells;
+
257  Q15n16 _coeff; // for allpass interpolation
+
258  su last_in;
+
259  return_type last_out;
+
260 
+
261 
262 
-
263  int16_t delay_sig = delay_array[read_pos]; // read the delay buffer
-
264  int8_t feedback_sig = (int8_t) min(max(((delay_sig * _feedback_level)/128),-128),127); // feedback clipped
-
265  delay_array[write_pos] = (int16_t) in_value + feedback_sig; // write to buffer
-
266 
-
267  return delay_sig;
-
268  }
-
269 
-
270 
+
263  /** Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells.
+
264  @param in_value the signal input.
+
265  */
+
266  inline
+
267  return_type next(su in_value, Int2Type<LINEAR>)
+
268  {
+
269  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
+
270  uint16_t read_pos = (write_pos - _delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
271 
-
272  /** The delaytime_cells has to be set seperately, because it's slowish
-
273  and in this implementation the allpass interpolation mode doesn't slide
-
274  nicely from one delay time to another.
-
275  @param input an audio signal in
-
276  @return the delayed signal, including feedback
-
277  @note Timing: 10us
-
278  */
-
279  inline
-
280  int16_t next(int8_t input, Int2Type<ALLPASS>)
-
281  {
-
282  /*
-
283  http://www.scandalis.com/Jarrah/Documents/DelayLine.pdf
-
284  also https://ccrma.stanford.edu/~jos/Interpolation/Interpolation_4up.pdf
-
285  for desired fractional delay of d samples,
-
286  coeff = (1-d)/(1+d)
-
287  or
-
288  coeff = ((d-1)>1) + (((d-1)*(d-1))>>2) - (((d-1)*(d-1)*(d-1))>>3)
-
289  out = coeff * in + last_in - coeff * last_out
-
290  = coeff * (in-last_out) + last_in
-
291  */
-
292  //setPin13High();
-
293  static int8_t last_in;
-
294  static int16_t last_out;
-
295 
-
296  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
-
297 
-
298  uint16_t read_pos1 = (write_pos - _delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
-
299  int16_t delay_sig = delay_array[read_pos1]; // read the delay buffer
-
300 
-
301  int16_t interp = (int16_t)(_coeff * ((int16_t)input - last_out)>>16) + last_in; // Q15n16*Q15n0 + Q15n0 = Q15n16 + Q15n0 = Q15n16
-
302  delay_sig += interp;
+
272  return_type delay_sig = delay_array[read_pos]; // read the delay buffer
+
273  //int8_t feedback_sig = (int8_t) min(max(((delay_sig * _feedback_level)/128),-128),127); // feedback clipped
+
274  su feedback_sig = (su) constrain(((delay_sig * _feedback_level)>>7), -(1<<((sizeof(su)<<3)-1)), (1<<((sizeof(su)<<3)-1))-1);
+
275  delay_array[write_pos] = (return_type) in_value + feedback_sig; // write to buffer
+
276 
+
277  return delay_sig;
+
278  }
+
279 
+
280 
+
281 
+
282  /** The delaytime_cells has to be set seperately, because it's slowish
+
283  and in this implementation the allpass interpolation mode doesn't slide
+
284  nicely from one delay time to another.
+
285  @param input an audio signal in
+
286  @return the delayed signal, including feedback
+
287  @note Timing: 10us
+
288  */
+
289  inline
+
290  return_type next(su input, Int2Type<ALLPASS>)
+
291  {
+
292  /*
+
293  http://www.scandalis.com/Jarrah/Documents/DelayLine.pdf
+
294  also https://ccrma.stanford.edu/~jos/Interpolation/Interpolation_4up.pdf
+
295  for desired fractional delay of d samples,
+
296  coeff = (1-d)/(1+d)
+
297  or
+
298  coeff = ((d-1)>1) + (((d-1)*(d-1))>>2) - (((d-1)*(d-1)*(d-1))>>3)
+
299  out = coeff * in + last_in - coeff * last_out
+
300  = coeff * (in-last_out) + last_in
+
301  */
+
302  //setPin13High();
303 
-
304  int8_t feedback_sig = (int8_t) min(max(((delay_sig * _feedback_level)>>7),-128),127); // feedback clipped
-
305  delay_array[write_pos] = (int16_t) input + feedback_sig; // write to buffer
-
306 
-
307  last_in = input;
-
308  last_out = delay_sig;
-
309  //setPin13Low();
-
310  return delay_sig;
-
311  }
-
312 
+
304  /* I think these should **not** be static
+
305  static int8_t last_in;
+
306  static int16_t last_out;
+
307  */
+
308 
+
309  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
+
310 
+
311  uint16_t read_pos1 = (write_pos - _delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
+
312  return_type delay_sig = delay_array[read_pos1]; // read the delay buffer
313 
-
314 
-
315  // 20-25us
-
316  inline
-
317  void setDelayTimeCells(Q16n16 delaytime_cells, Int2Type<ALLPASS>)
-
318  {
-
319  /*
-
320  integer optimisation/approximation from
-
321  Van Duyne, Jaffe, Scandalis, Stilson 1997
-
322  http://www.scandalis.com/Jarrah/Documents/DelayLine.pdf
-
323  //coeff = -((d-1)>1) + (((d-1)*(d-1))>>2) - (((d-1)*(d-1)*(d-1))>>3) , d is fractional part
-
324  */
-
325  _delaytime_cells = delaytime_cells>>16; // whole integer part
-
326  Q15n16 dminus1 = - Q15n16_FIX1 + (uint16_t) delaytime_cells;
-
327  Q15n16 dminus1squared = (dminus1)*(dminus1)>>16;
-
328  _coeff = -(dminus1>>1) + (dminus1squared>>2) - (((dminus1squared*dminus1)>>16)>>3);
-
329  }
-
330 
-
331 
-
332  // 100us
-
333  inline
-
334  void setDelayTimeCells(float delaytime_cells, Int2Type<ALLPASS>)
-
335  {
-
336  //coeff = (1-d)/(1+d)
-
337  _delaytime_cells = (uint16_t) delaytime_cells;
-
338 
-
339  float fraction = delaytime_cells - _delaytime_cells;
-
340 
-
341  // modified from stk DelayA.cpp
-
342  float alpha_ = 1.0f + fraction; // fractional part
-
343  if ( alpha_ < 0.5f ) {
-
344  // (stk): The optimal range for alpha is about 0.5 - 1.5 in order to
-
345  // achieve the flattest phase delay response.
+
314  //int16_t interp = (int16_t)(_coeff * ((int16_t)input - last_out)>>16) + last_in; // Q15n16*Q15n0 + Q15n0 = Q15n16 + Q15n0 = Q15n16
+
315  return_type interp = (return_type)(_coeff * ((return_type)input - last_out)>>(sizeof(su)<<4)) + last_in;
+
316  delay_sig += interp;
+
317 
+
318  //int8_t feedback_sig = (int8_t) min(max(((delay_sig * _feedback_level)>>7),-128),127); // feedback clipped
+
319  su feedback_sig = (su) constrain(((delay_sig * _feedback_level)>>7), -(1<<((sizeof(su)<<3)-1)), (1<<((sizeof(su)<<3)-1))-1);
+
320  delay_array[write_pos] = (return_type) input + feedback_sig; // write to buffer
+
321 
+
322  last_in = input;
+
323  last_out = delay_sig;
+
324  //setPin13Low();
+
325  return delay_sig;
+
326  }
+
327 
+
328 
+
329 
+
330  // 20-25us
+
331  inline
+
332  void setDelayTimeCells(Q16n16 delaytime_cells, Int2Type<ALLPASS>)
+
333  {
+
334  /*
+
335  integer optimisation/approximation from
+
336  Van Duyne, Jaffe, Scandalis, Stilson 1997
+
337  http://www.scandalis.com/Jarrah/Documents/DelayLine.pdf
+
338  //coeff = -((d-1)>1) + (((d-1)*(d-1))>>2) - (((d-1)*(d-1)*(d-1))>>3) , d is fractional part
+
339  */
+
340  _delaytime_cells = delaytime_cells>>16; // whole integer part
+
341  Q15n16 dminus1 = - Q15n16_FIX1 + (uint16_t) delaytime_cells;
+
342  Q15n16 dminus1squared = (dminus1)*(dminus1)>>16;
+
343  _coeff = -(dminus1>>1) + (dminus1squared>>2) - (((dminus1squared*dminus1)>>16)>>3);
+
344  }
+
345 
346 
-
347  // something's not right about how I use _delaytime_cells and
-
348  // NUM_BUFFER_SAMPLES etc. in my ringbuffer compared to stk
-
349  _delaytime_cells += 1;
-
350  if ( _delaytime_cells >= NUM_BUFFER_SAMPLES ) _delaytime_cells -= NUM_BUFFER_SAMPLES;
-
351  alpha_ += 1.0f;
-
352  }
-
353  // otherwise this would use fraction instead of alpha
-
354  _coeff = float_to_Q15n16((1.f-alpha_)/(1.f+alpha_));
-
355  }
-
356 
-
357  // Retrieve the signal in the delay line at the position delaytime_cells.
-
358  // It doesn't change the stored internal value of _delaytime_cells or feedback the output to the input.
-
359  // param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
-
360  //
-
361  // inline
-
362  // int16_t read(uint16_t delaytime_cells, Int2Type<LINEAR>)
-
363  // {
-
364  // uint16_t read_pos = (write_pos - delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
-
365  // int16_t delay_sig = delay_array[read_pos]; // read the delay buffer
-
366  //
-
367  // return delay_sig;
-
368  // }
-
369 
-
370  /** Retrieve the signal in the delay line at the interpolated fractional position delaytime_cells.
-
371  It doesn't change the stored internal value of _delaytime_cells or feedback the output to the input.
-
372  @param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
-
373  */
-
374  inline
-
375  int16_t read(Q16n16 delaytime_cells, Int2Type<LINEAR>)
-
376  {
-
377  uint16_t index = (Q16n16)delaytime_cells >> 16;
-
378  uint16_t fraction = (uint16_t) delaytime_cells; // keeps low word
-
379 
-
380  uint16_t read_pos1 = (write_pos - index) & (NUM_BUFFER_SAMPLES - 1);
-
381  int16_t delay_sig1 = delay_array[read_pos1]; // read the delay buffer
-
382 
-
383  uint16_t read_pos2 = (write_pos - (index+1)) & (NUM_BUFFER_SAMPLES - 1);
-
384  int16_t delay_sig2 = delay_array[read_pos2]; // read the delay buffer
-
385 
-
386  /*
-
387  int16_t difference = delay_sig2 - delay_sig1;
-
388  int16_t delay_sig_fraction = ((int32_t) fraction * difference) >> 16;
-
389 
-
390  int16_t delay_sig = delay_sig1+delay_sig_fraction;
-
391  */
-
392  int16_t delay_sig = delay_sig1 + ((int32_t)delay_sig2*fraction)>>16;
-
393 
-
394  return delay_sig;
-
395  }
-
396 
+
347  // 100us
+
348  inline
+
349  void setDelayTimeCells(float delaytime_cells, Int2Type<ALLPASS>)
+
350  {
+
351  //coeff = (1-d)/(1+d)
+
352  _delaytime_cells = (uint16_t) delaytime_cells;
+
353 
+
354  float fraction = delaytime_cells - _delaytime_cells;
+
355 
+
356  // modified from stk DelayA.cpp
+
357  float alpha_ = 1.0f + fraction; // fractional part
+
358  if ( alpha_ < 0.5f ) {
+
359  // (stk): The optimal range for alpha is about 0.5 - 1.5 in order to
+
360  // achieve the flattest phase delay response.
+
361 
+
362  // something's not right about how I use _delaytime_cells and
+
363  // NUM_BUFFER_SAMPLES etc. in my ringbuffer compared to stk
+
364  _delaytime_cells += 1;
+
365  if ( _delaytime_cells >= NUM_BUFFER_SAMPLES ) _delaytime_cells -= NUM_BUFFER_SAMPLES;
+
366  alpha_ += 1.0f;
+
367  }
+
368  // otherwise this would use fraction instead of alpha
+
369  _coeff = float_to_Q15n16((1.f-alpha_)/(1.f+alpha_));
+
370  }
+
371 
+
372  // Retrieve the signal in the delay line at the position delaytime_cells.
+
373  // It doesn't change the stored internal value of _delaytime_cells or feedback the output to the input.
+
374  // param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
+
375  //
+
376  // inline
+
377  // int16_t read(uint16_t delaytime_cells, Int2Type<LINEAR>)
+
378  // {
+
379  // uint16_t read_pos = (write_pos - delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
+
380  // int16_t delay_sig = delay_array[read_pos]; // read the delay buffer
+
381  //
+
382  // return delay_sig;
+
383  // }
+
384 
+
385  /** Retrieve the signal in the delay line at the interpolated fractional position delaytime_cells.
+
386  It doesn't change the stored internal value of _delaytime_cells or feedback the output to the input.
+
387  @param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
+
388  */
+
389  inline
+
390  return_type read(Q16n16 delaytime_cells, Int2Type<LINEAR>)
+
391  {
+
392  uint16_t index = (Q16n16)delaytime_cells >> 16;
+
393  uint16_t fraction = (uint16_t) delaytime_cells; // keeps low word
+
394 
+
395  uint16_t read_pos1 = (write_pos - index) & (NUM_BUFFER_SAMPLES - 1);
+
396  return_type delay_sig1 = delay_array[read_pos1]; // read the delay buffer
397 
-
398 };
-
399 
-
400 /**
-
401 @example 09.Delays/AudioDelayFeedback/AudioDelayFeedback.ino
-
402 This is an example of how to use the AudioDelayFeedback class.
-
403 */
-
404 
-
405 #endif // #ifndef AUDIODELAY_FEEDBACK_H_
+
398  uint16_t read_pos2 = (write_pos - (index+1)) & (NUM_BUFFER_SAMPLES - 1);
+
399  return_type delay_sig2 = delay_array[read_pos2]; // read the delay buffer
+
400 
+
401  /*
+
402  int16_t difference = delay_sig2 - delay_sig1;
+
403  int16_t delay_sig_fraction = ((int32_t) fraction * difference) >> 16;
+
404 
+
405  int16_t delay_sig = delay_sig1+delay_sig_fraction;
+
406  */
+
407  //int16_t delay_sig = delay_sig1 + ((int32_t)delay_sig2*fraction)>>16;
+
408  return_type delay_sig = delay_sig1 + ((typename IntegerType<sizeof(return_type)+sizeof(return_type)>::signed_type)delay_sig2*fraction)>>16;
+
409 
+
410  return delay_sig;
+
411  }
+
412 
+
413 
+
414 };
+
415 
+
416 /**
+
417 @example 09.Delays/AudioDelayFeedback/AudioDelayFeedback.ino
+
418 This is an example of how to use the AudioDelayFeedback class.
+
419 */
+
420 
+
421 #endif // #ifndef AUDIODELAY_FEEDBACK_H_
-

This is the complete list of members for AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >, including all inherited members.

+

This is the complete list of members for AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >, including all inherited members.

- - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
AudioDelayFeedback()AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
AudioDelayFeedback(uint16_t delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
AudioDelayFeedback(uint16_t delaytime_cells, int8_t feedback_level)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
next(int8_t input)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
next(int8_t input, uint16_t delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
next(int8_t input, Q16n16 delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
read(Q16n16 delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
read()AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
setDelayTimeCells(uint16_t delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
setDelayTimeCells(Q16n16 delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
setDelayTimeCells(float delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
setFeedbackLevel(int8_t feedback_level)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
write(int8_t input)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
write(int8_t input, uint16_t offset)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
writeFeedback(int8_t input)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >inline
AudioDelayFeedback()AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
AudioDelayFeedback(uint16_t delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
AudioDelayFeedback(uint16_t delaytime_cells, int8_t feedback_level)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
next(su input)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
next(su input, uint16_t delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
next(su input, Q16n16 delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
read(Q16n16 delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
read()AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
setDelayTimeCells(uint16_t delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
setDelayTimeCells(Q16n16 delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
setDelayTimeCells(float delaytime_cells)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
setFeedbackLevel(int8_t feedback_level)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
write(su input)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
write(su input, uint16_t offset)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
writeFeedback(su input)AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >inline
-
AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE > Class Template Reference
+
AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su > Class Template Reference
@@ -108,83 +108,84 @@

#include <AudioDelayFeedback.h>

Detailed Description

-

template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
-class AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >

+

template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>
+class AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >

Audio delay line with feedback for comb filter, flange, chorus and short echo effects.

Template Parameters
+
NUM_BUFFER_SAMPLESis the length of the delay buffer in samples, and should be a power of two. The maximum delay length which will fit in an atmega328 is half that of a plain AudioDelay object, in this case 256 cells, or about 15 milliseconds. AudioDelayFeedback uses int16_t sized cells to accomodate the higher amplitude of direct input to the delay as well as the feedback, without losing precision. Output is only the delay line signal. If you want to mix the delay with the input, do it in your sketch. AudioDelayFeedback uses more processing and memory than a plain AudioDelay, but allows for more dramatic effects with feedback.
INTERP_TYPEa choice of LINEAR (default) or ALLPASS interpolation. LINEAR is better for sweeping delay times, ALLPASS may be better for reverb-like effects.
suthe type of numbers to use for the signal in the delay. The default is int8_t, but int16_t could be useful. Larger types (int32_t) might produce overflows as of v2.0.2.
-

Definition at line 36 of file AudioDelayFeedback.h.

+

Definition at line 38 of file AudioDelayFeedback.h.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

AudioDelayFeedback ()
 Constructor.
 
 AudioDelayFeedback (uint16_t delaytime_cells)
 Constructor. More...
 
 AudioDelayFeedback (uint16_t delaytime_cells, int8_t feedback_level)
 Constructor. More...
 
int16_t next (int8_t input)
 Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells. More...
 
int16_t next (int8_t input, uint16_t delaytime_cells)
 Input a value to the delay, retrieve the signal in the delay line at the position delaytime_cells, and add feedback from the output to the input. More...
 
int16_t next (int8_t input, Q16n16 delaytime_cells)
 Input a value to the delay, retrieve the signal in the delay line at the interpolated fractional position delaytime_cells, and add feedback from the output to the input. More...
 
void write (int8_t input)
 Input a value to the delay but don't change the delay time or retrieve the output signal. More...
 
void writeFeedback (int8_t input)
 Input a value to the delay but don't advance the write position, change the delay time or retrieve the output signal. More...
 
void write (int8_t input, uint16_t offset)
 Input a value to the delay at an offset from the current write position. More...
 
int16_t read (Q16n16 delaytime_cells)
 Retrieve the signal in the delay line at the interpolated fractional position delaytime_cells. More...
 
int16_t read ()
 Retrieve the signal in the delay line at the current stored delaytime_cells. More...
 
void setDelayTimeCells (uint16_t delaytime_cells)
 Set delay time expressed in samples. More...
 
void setDelayTimeCells (Q16n16 delaytime_cells)
 Set delay time expressed in samples, fractional Q16n16 for an interpolating delay. More...
 
void setDelayTimeCells (float delaytime_cells)
 Set delay time expressed in samples, fractional float for an interpolating delay. More...
 
void setFeedbackLevel (int8_t feedback_level)
 Set the feedback gain. More...
 
AudioDelayFeedback ()
 Constructor.
 
 AudioDelayFeedback (uint16_t delaytime_cells)
 Constructor. More...
 
 AudioDelayFeedback (uint16_t delaytime_cells, int8_t feedback_level)
 Constructor. More...
 
return_type next (su input)
 Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells. More...
 
return_type next (su input, uint16_t delaytime_cells)
 Input a value to the delay, retrieve the signal in the delay line at the position delaytime_cells, and add feedback from the output to the input. More...
 
return_type next (su input, Q16n16 delaytime_cells)
 Input a value to the delay, retrieve the signal in the delay line at the interpolated fractional position delaytime_cells, and add feedback from the output to the input. More...
 
void write (su input)
 Input a value to the delay but don't change the delay time or retrieve the output signal. More...
 
void writeFeedback (su input)
 Input a value to the delay but don't advance the write position, change the delay time or retrieve the output signal. More...
 
void write (su input, uint16_t offset)
 Input a value to the delay at an offset from the current write position. More...
 
return_type read (Q16n16 delaytime_cells)
 Retrieve the signal in the delay line at the interpolated fractional position delaytime_cells. More...
 
return_type read ()
 Retrieve the signal in the delay line at the current stored delaytime_cells. More...
 
void setDelayTimeCells (uint16_t delaytime_cells)
 Set delay time expressed in samples. More...
 
void setDelayTimeCells (Q16n16 delaytime_cells)
 Set delay time expressed in samples, fractional Q16n16 for an interpolating delay. More...
 
void setDelayTimeCells (float delaytime_cells)
 Set delay time expressed in samples, fractional float for an interpolating delay. More...
 
void setFeedbackLevel (int8_t feedback_level)
 Set the feedback gain. More...
 

Constructor & Destructor Documentation

- -

◆ AudioDelayFeedback() [1/2]

+ +

◆ AudioDelayFeedback() [1/2]

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>
- + @@ -206,23 +207,23 @@

Definition at line 51 of file AudioDelayFeedback.h.

+

Definition at line 55 of file AudioDelayFeedback.h.

- -

◆ AudioDelayFeedback() [2/2]

+ +

◆ AudioDelayFeedback() [2/2]

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>

AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::AudioDelayFeedback AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::AudioDelayFeedback ( uint16_t  delaytime_cells)
- + @@ -255,26 +256,26 @@

Definition at line 61 of file AudioDelayFeedback.h.

+

Definition at line 65 of file AudioDelayFeedback.h.

Member Function Documentation

- -

◆ next() [1/3]

+ +

◆ next() [1/3]

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>

AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::AudioDelayFeedback AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::AudioDelayFeedback ( uint16_t  delaytime_cells,
- + - + @@ -293,27 +294,27 @@

Note
slower than next(int8_t input, uint16_t delaytime_cells)
+
Note
slower than next(int8_t input, uint16_t delaytime_cells)
-

Definition at line 71 of file AudioDelayFeedback.h.

+

Definition at line 75 of file AudioDelayFeedback.h.

- -

◆ next() [2/3]

+ +

◆ next() [2/3]

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>

int16_t AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::next return_type AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::next (int8_t su  input)
- + - + @@ -344,25 +345,25 @@

Definition at line 113 of file AudioDelayFeedback.h.

+

Definition at line 118 of file AudioDelayFeedback.h.

- -

◆ next() [3/3]

+ +

◆ next() [3/3]

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>

int16_t AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::next return_type AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::next (int8_t su  input,
- + - + @@ -394,23 +395,23 @@

Note
Timing: 4us
-

Definition at line 88 of file AudioDelayFeedback.h.

+

Definition at line 92 of file AudioDelayFeedback.h.

- -

◆ read() [1/2]

+ +

◆ read() [1/2]

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>

int16_t AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::next return_type AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::next (int8_t su  input,
- + @@ -426,23 +427,23 @@

Definition at line 192 of file AudioDelayFeedback.h.

+

Definition at line 199 of file AudioDelayFeedback.h.

- -

◆ read() [2/2]

+ +

◆ read() [2/2]

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>

int16_t AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::read return_type AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::read ( )
- + @@ -464,23 +465,23 @@

Definition at line 182 of file AudioDelayFeedback.h.

+

Definition at line 189 of file AudioDelayFeedback.h.

- -

◆ setDelayTimeCells() [1/3]

+ +

◆ setDelayTimeCells() [1/3]

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>

int16_t AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::read return_type AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::read ( Q16n16  delaytime_cells)
- + @@ -502,23 +503,23 @@

Definition at line 228 of file AudioDelayFeedback.h.

+

Definition at line 235 of file AudioDelayFeedback.h.

- -

◆ setDelayTimeCells() [2/3]

+ +

◆ setDelayTimeCells() [2/3]

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>

void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::setDelayTimeCells void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::setDelayTimeCells ( float  delaytime_cells)
- + @@ -540,23 +541,23 @@

Definition at line 216 of file AudioDelayFeedback.h.

+

Definition at line 223 of file AudioDelayFeedback.h.

- -

◆ setDelayTimeCells() [3/3]

+ +

◆ setDelayTimeCells() [3/3]

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>

void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::setDelayTimeCells void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::setDelayTimeCells ( Q16n16  delaytime_cells)
- + @@ -578,23 +579,23 @@

Definition at line 204 of file AudioDelayFeedback.h.

+

Definition at line 211 of file AudioDelayFeedback.h.

- -

◆ setFeedbackLevel()

+ +

◆ setFeedbackLevel()

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>

void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::setDelayTimeCells void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::setDelayTimeCells ( uint16_t  delaytime_cells)
- + @@ -616,25 +617,25 @@

Definition at line 238 of file AudioDelayFeedback.h.

+

Definition at line 245 of file AudioDelayFeedback.h.

- -

◆ write() [1/2]

+ +

◆ write() [1/2]

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>

void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::setFeedbackLevel void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::setFeedbackLevel ( int8_t  feedback_level)
- + - + @@ -654,25 +655,25 @@

Definition at line 146 of file AudioDelayFeedback.h.

+

Definition at line 153 of file AudioDelayFeedback.h.

- -

◆ write() [2/2]

+ +

◆ write() [2/2]

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>

void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::write void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::write (int8_t su  input)
- + @@ -127,51 +127,52 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- + - + @@ -703,25 +704,25 @@

Definition at line 170 of file AudioDelayFeedback.h.

+

Definition at line 177 of file AudioDelayFeedback.h.

- -

◆ writeFeedback()

+ +

◆ writeFeedback()

-template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR>
+template<uint16_t NUM_BUFFER_SAMPLES, int8_t INTERP_TYPE = LINEAR, typename su = int8_t>

void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::write void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::write (int8_t su  input,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- + - + @@ -741,7 +742,7 @@

Definition at line 158 of file AudioDelayFeedback.h.

+

Definition at line 165 of file AudioDelayFeedback.h.

diff --git a/extras/doc/html/class_audio_delay_feedback.js b/extras/doc/html/class_audio_delay_feedback.js index dbf60cc69..f622fab7c 100644 --- a/extras/doc/html/class_audio_delay_feedback.js +++ b/extras/doc/html/class_audio_delay_feedback.js @@ -1,18 +1,18 @@ var class_audio_delay_feedback = [ - [ "AudioDelayFeedback", "class_audio_delay_feedback.html#a6e6352413ac4ee9b2bc03684b072fdc7", null ], - [ "AudioDelayFeedback", "class_audio_delay_feedback.html#a7d038aff13126acbca484b74b1ee5620", null ], - [ "AudioDelayFeedback", "class_audio_delay_feedback.html#a54d7f001d6a99bd3955fb7dab94fbfe8", null ], - [ "next", "class_audio_delay_feedback.html#a5a702d1a0a9b104beb0b18c80422500e", null ], - [ "next", "class_audio_delay_feedback.html#af9cc2cf135fa0f1a1f0d50ca7d9f89ea", null ], - [ "next", "class_audio_delay_feedback.html#a7c7745dd84f01dbdc9b6552a4c427f0b", null ], - [ "read", "class_audio_delay_feedback.html#a8b6cefa45ecaa174320effe25b9ce6c5", null ], - [ "read", "class_audio_delay_feedback.html#a77508ec1d8da719edbc7c34173c9d7cb", null ], - [ "setDelayTimeCells", "class_audio_delay_feedback.html#a7c54b49ae9f25baaf8714528295c53e2", null ], - [ "setDelayTimeCells", "class_audio_delay_feedback.html#a8e8344af6962ea061da8f70ed119b2bd", null ], - [ "setDelayTimeCells", "class_audio_delay_feedback.html#abcf71a86083db5a48ef71c1397247886", null ], - [ "setFeedbackLevel", "class_audio_delay_feedback.html#a2cd87a7dc91187ed439a8ec1d7e00d29", null ], - [ "write", "class_audio_delay_feedback.html#aa3232fec9e7f90169e8d8eab85f39394", null ], - [ "write", "class_audio_delay_feedback.html#aeeec669071403fc0a294724e775e3812", null ], - [ "writeFeedback", "class_audio_delay_feedback.html#a27e773a0ae0c2cee895fbcf18c1351e1", null ] + [ "AudioDelayFeedback", "class_audio_delay_feedback.html#adbc1ecd0dffe273cac87b8fc888e28f0", null ], + [ "AudioDelayFeedback", "class_audio_delay_feedback.html#a0412c5d62f72a881d95504d9d0018245", null ], + [ "AudioDelayFeedback", "class_audio_delay_feedback.html#a61f3c90f752d8b15c0f7a19e03bc4f03", null ], + [ "next", "class_audio_delay_feedback.html#a566593f5ea6d2d8bac9c45aa592f40fb", null ], + [ "next", "class_audio_delay_feedback.html#af94a6f68bc932e4e2ce99b3a43713825", null ], + [ "next", "class_audio_delay_feedback.html#a335ce266a8b40173f3279b96f9c6c050", null ], + [ "read", "class_audio_delay_feedback.html#aabcade306904f5f6ac43d12bb00606e6", null ], + [ "read", "class_audio_delay_feedback.html#adb77aac1acba3b0a31428345342a5205", null ], + [ "setDelayTimeCells", "class_audio_delay_feedback.html#ab6fb7260a540416018ebfac7aeac32f1", null ], + [ "setDelayTimeCells", "class_audio_delay_feedback.html#a2c5c805eb4d62e4650b08400409863a9", null ], + [ "setDelayTimeCells", "class_audio_delay_feedback.html#a3f49d5e601799487237266621245c7a4", null ], + [ "setFeedbackLevel", "class_audio_delay_feedback.html#a1408da9125a0d6c38ce89b11d7d93113", null ], + [ "write", "class_audio_delay_feedback.html#a5197399a986922eee160a455069dc93e", null ], + [ "write", "class_audio_delay_feedback.html#a93231df73010a40da2d4092b94a99f9d", null ], + [ "writeFeedback", "class_audio_delay_feedback.html#ae83d67ec86483bae489a6a17e8d0e5e3", null ] ]; \ No newline at end of file diff --git a/extras/doc/html/class_meta_oscil-members.html b/extras/doc/html/class_meta_oscil-members.html index 134273414..ddc9ebfd4 100644 --- a/extras/doc/html/class_meta_oscil-members.html +++ b/extras/doc/html/class_meta_oscil-members.html @@ -114,14 +114,15 @@

- - - - - - - - + + + + + + + + +
void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >::writeFeedback void AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >::writeFeedback (int8_t su  input)
setCutoffFreqs() (defined in MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setFreq(int frequency, bool apply=true)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setFreq(float frequency)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setFreq_Q16n16(Q16n16 frequency)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setFreq_Q24n8(Q24n8 frequency)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setOscils(Oscil< NUM_TABLE_CELLS, UPDATE_RATE > *first, T... elements)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setOscils() (defined in MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setPhase(unsigned int phase)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setPhaseFractional(unsigned long phase)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setPhaseInc(unsigned long phaseinc_fractional)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setTable(const int8_t *TABLE_NAME, byte rank)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setFreq(UFix< NI, NF, RANGE > frequency)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setFreq_Q16n16(Q16n16 frequency)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setFreq_Q24n8(Q24n8 frequency)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setOscils(Oscil< NUM_TABLE_CELLS, UPDATE_RATE > *first, T... elements)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setOscils() (defined in MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setPhase(unsigned int phase)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setPhaseFractional(unsigned long phase)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setPhaseInc(unsigned long phaseinc_fractional)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
setTable(const int8_t *TABLE_NAME, byte rank)MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >inline
@@ -163,6 +163,10 @@ + + + + @@ -226,7 +230,7 @@

Definition at line 38 of file MetaOscil.h.

+

Definition at line 39 of file MetaOscil.h.

@@ -266,7 +270,7 @@

Returns
the sample at the given table index.
-

Definition at line 203 of file MetaOscil.h.

+

Definition at line 218 of file MetaOscil.h.

@@ -298,7 +302,7 @@

Oscil in fractional format.

Returns
position in the wavetable, shifted left by OSCIL_F_BITS (which is 16 when this was written).
-

Definition at line 114 of file MetaOscil.h.

+

Definition at line 115 of file MetaOscil.h.

@@ -330,7 +334,7 @@

Returns
the next sample.
-

Definition at line 93 of file MetaOscil.h.

+

Definition at line 94 of file MetaOscil.h.

@@ -369,7 +373,7 @@

Returns
the phase increment value which will produce a given frequency.
-

Definition at line 210 of file MetaOscil.h.

+

Definition at line 225 of file MetaOscil.h.

@@ -408,7 +412,7 @@

Returns
a sample from the table.
-

Definition at line 125 of file MetaOscil.h.

+

Definition at line 126 of file MetaOscil.h.

@@ -457,7 +461,7 @@

Definition at line 84 of file MetaOscil.h.

+

Definition at line 85 of file MetaOscil.h.

@@ -507,12 +511,12 @@

Definition at line 71 of file MetaOscil.h.

+

Definition at line 72 of file MetaOscil.h.

-

◆ setFreq() [1/2]

+

◆ setFreq() [1/3]

@@ -545,12 +549,12 @@

Definition at line 170 of file MetaOscil.h.

+

Definition at line 171 of file MetaOscil.h.

-

◆ setFreq() [2/2]

+

◆ setFreq() [2/3]

@@ -593,7 +597,47 @@

Definition at line 131 of file MetaOscil.h.

+

Definition at line 132 of file MetaOscil.h.

+ +

+
+ +

◆ setFreq() [3/3]

+ +
+
+
+template<uint16_t NUM_TABLE_CELLS, uint16_t UPDATE_RATE, byte N_OSCIL>
+
+template<int8_t NI, int8_t NF, uint64_t RANGE>
+

Public Member Functions

void setFreq (float frequency)
 Set the MetaOsc frequency with a float. More...
 
template<int8_t NI, int8_t NF, uint64_t RANGE>
void setFreq (UFix< NI, NF, RANGE > frequency)
 Set the MetaOsc frequency with a UFix<NI,NF> fixed-point number format. More...
 
void setFreq_Q24n8 (Q24n8 frequency)
 Set the MetaOsc frequency with a Q24n8 fixed-point number format. More...
 
+ + + + +
+ + + + + + + + +
void MetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >::setFreq (UFix< NI, NF, RANGE > frequency)
+
+inline
+
+ +

Set the MetaOsc frequency with a UFix<NI,NF> fixed-point number format.

+

This falls back to using UFix<16,16> internally and is provided as a fallout for other UFix types..

Parameters
+ + +
frequencyto play the wave table.
+
+
+ +

Definition at line 183 of file MetaOscil.h.

@@ -631,7 +675,7 @@

Definition at line 190 of file MetaOscil.h.

+

Definition at line 205 of file MetaOscil.h.

@@ -669,7 +713,7 @@

Definition at line 180 of file MetaOscil.h.

+

Definition at line 194 of file MetaOscil.h.

@@ -719,7 +763,7 @@

Definition at line 57 of file MetaOscil.h.

+

Definition at line 58 of file MetaOscil.h.

@@ -757,7 +801,7 @@

Definition at line 103 of file MetaOscil.h.

+

Definition at line 104 of file MetaOscil.h.

@@ -795,7 +839,7 @@

Definition at line 108 of file MetaOscil.h.

+

Definition at line 109 of file MetaOscil.h.

@@ -833,7 +877,7 @@

Definition at line 216 of file MetaOscil.h.

+

Definition at line 231 of file MetaOscil.h.

@@ -882,7 +926,7 @@

Definition at line 98 of file MetaOscil.h.

+

Definition at line 99 of file MetaOscil.h.

diff --git a/extras/doc/html/class_meta_oscil.js b/extras/doc/html/class_meta_oscil.js index 94cb25741..22903ba57 100644 --- a/extras/doc/html/class_meta_oscil.js +++ b/extras/doc/html/class_meta_oscil.js @@ -12,6 +12,7 @@ var class_meta_oscil = [ "setCutoffFreqs", "class_meta_oscil.html#a7567da1ff25347c8d44fad66efe28af1", null ], [ "setFreq", "class_meta_oscil.html#a3a1bf4af017c5c39d736f78d3c3e1bee", null ], [ "setFreq", "class_meta_oscil.html#a1960b7c4012424058876085c76d1dfd9", null ], + [ "setFreq", "class_meta_oscil.html#aafb4c01a8ce6b4d880fd1ecf59bd3bfd", null ], [ "setFreq_Q16n16", "class_meta_oscil.html#a98794f84684b257079e79bd9f92d0892", null ], [ "setFreq_Q24n8", "class_meta_oscil.html#adcadf4935c390cd8d2eea9623365bf70", null ], [ "setOscils", "class_meta_oscil.html#afb893462be24c907f87bc6ee05595475", null ], diff --git a/extras/doc/html/files.html b/extras/doc/html/files.html index 1d7b8c0f1..c6fecbd6d 100644 --- a/extras/doc/html/files.html +++ b/extras/doc/html/files.html @@ -146,71 +146,72 @@

 known_16bit_timers.h
 Line.h
 LowPassFilter.h
 meta.h
 MetaOscil.h
 Metronome.h
 Mozzi.hThis is the main include file in Mozzi
 mozzi_analog.h
 mozzi_config_documentation.h
 mozzi_fixmath.cpp
 mozzi_fixmath.h
 mozzi_macros.h
 mozzi_midi.h
 mozzi_pgmspace.h
 mozzi_rand.h
 mozzi_rand_p.h
 mozzi_utils.h
 MozziConfigValues.hThis file keeps a list of named configuration values
 MozziGuts.h
 MozziGuts.hpp
 MozziGuts_impl_AVR.hpp
 MozziGuts_impl_ESP32.hpp
 MozziGuts_impl_ESP8266.hpp
 MozziGuts_impl_MBED.hpp
 MozziGuts_impl_RENESAS.hpp
 MozziGuts_impl_RENESAS_ADC.hpp
 MozziGuts_impl_RENESAS_analog.hpp
 MozziGuts_impl_RP2040.hpp
 MozziGuts_impl_SAMD.hpp
 MozziGuts_impl_STM32.hpp
 MozziGuts_impl_STM32duino.hpp
 MozziGuts_impl_STM32duino_analog.hpp
 MozziGuts_impl_TEENSY.hpp
 MozziGuts_impl_template.hppTemplate for implementation of new ports
 MozziHeadersOnly.hThis file provides declarations of the Mozzi Core Functions Mozzi functions, but no implementation
 mult16x16.h
 mult16x8.h
 mult32x16.h
 Oscil.h
 OverSample.h
 PDResonant.h
 Phasor.h
 Portamento.h
 primes.h
 RCpoll.h
 ResonantFilter.h
 ReverbTank.h
 RollingAverage.h
 RollingStat.h
 Sample.h
 SampleHuffman.h
 sin1024_int8.py
 sin8192_uint8.py
 sin_multi_levels_int8.py
 Skeleton_Multi_Unit2.cpp
 Smooth.h
 Stack.h
 StateVariable.h
 table_generator_template.py
 teensyPinMap.h
 triangle.py
 twi_nonblock.h
 twi_nonblock.hpp
 umpah_huff.h
 WaveFolder.h
 WavePacket.h
 WavePacketSample.h
 WaveShaper.h
 make_standard_tables.py
 meta.h
 MetaOscil.h
 Metronome.h
 Mozzi.hThis is the main include file in Mozzi
 mozzi_analog.h
 mozzi_config_documentation.h
 mozzi_fixmath.cpp
 mozzi_fixmath.h
 mozzi_macros.h
 mozzi_midi.h
 mozzi_pgmspace.h
 mozzi_rand.h
 mozzi_rand_p.h
 mozzi_utils.h
 MozziConfigValues.hThis file keeps a list of named configuration values
 MozziGuts.h
 MozziGuts.hpp
 MozziGuts_impl_AVR.hpp
 MozziGuts_impl_ESP32.hpp
 MozziGuts_impl_ESP8266.hpp
 MozziGuts_impl_MBED.hpp
 MozziGuts_impl_RENESAS.hpp
 MozziGuts_impl_RENESAS_ADC.hpp
 MozziGuts_impl_RENESAS_analog.hpp
 MozziGuts_impl_RP2040.hpp
 MozziGuts_impl_SAMD.hpp
 MozziGuts_impl_STM32.hpp
 MozziGuts_impl_STM32duino.hpp
 MozziGuts_impl_STM32duino_analog.hpp
 MozziGuts_impl_TEENSY.hpp
 MozziGuts_impl_template.hppTemplate for implementation of new ports
 MozziHeadersOnly.hThis file provides declarations of the Mozzi Core Functions Mozzi functions, but no implementation
 mult16x16.h
 mult16x8.h
 mult32x16.h
 Oscil.h
 OverSample.h
 PDResonant.h
 Phasor.h
 Portamento.h
 primes.h
 RCpoll.h
 ResonantFilter.h
 ReverbTank.h
 RollingAverage.h
 RollingStat.h
 Sample.h
 SampleHuffman.h
 sin1024_int8.py
 sin8192_uint8.py
 sin_multi_levels_int8.py
 Skeleton_Multi_Unit2.cpp
 Smooth.h
 Stack.h
 StateVariable.h
 table_generator_template.py
 teensyPinMap.h
 triangle.py
 twi_nonblock.h
 twi_nonblock.hpp
 umpah_huff.h
 WaveFolder.h
 WavePacket.h
 WavePacketSample.h
 WaveShaper.h
diff --git a/extras/doc/html/files_dup.js b/extras/doc/html/files_dup.js index 8a948b279..9b038dc87 100644 --- a/extras/doc/html/files_dup.js +++ b/extras/doc/html/files_dup.js @@ -45,6 +45,7 @@ var files_dup = [ "known_16bit_timers.h", "known__16bit__timers_8h_source.html", null ], [ "Line.h", "_line_8h_source.html", null ], [ "LowPassFilter.h", "_low_pass_filter_8h_source.html", null ], + [ "make_standard_tables.py", "make__standard__tables_8py_source.html", null ], [ "meta.h", "meta_8h_source.html", null ], [ "MetaOscil.h", "_meta_oscil_8h_source.html", null ], [ "Metronome.h", "_metronome_8h_source.html", null ], diff --git a/extras/doc/html/functions.html b/extras/doc/html/functions.html index b5d0c7db5..ec5161d30 100644 --- a/extras/doc/html/functions.html +++ b/extras/doc/html/functions.html @@ -110,7 +110,7 @@

- a -

 CAudioDelay< 256, int >
 CAudioDelay< NUM_BUFFER_SAMPLES, int >
 CControlDelay< NUM_BUFFER_SAMPLES, T >Control-rate delay line for delaying control signals
 CAudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >Audio delay line with feedback for comb filter, flange, chorus and short echo effects
 CAudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >Audio delay line with feedback for comb filter, flange, chorus and short echo effects
 CAutoRange< T >Keeps a running calculation of the range of the input values it receives
 CAutoRange< int >
 CAutoMapAutomatically map an input value to an output range without knowing the precise range of inputs beforehand
 CIntegerType< 4 >
 CIntegerType< 8 >
 CIntegerType< sizeof(AudioOutputStorage_t)>
 CIntegerType< sizeof(uint8_t)+sizeof(uint8_t)>
 CIntMapA faster version of Arduino's map() function
 CLine< T >For linear changes with a minimum of calculation at each step
 CLine< Q15n16 >
 CLine< Q16n16 >
 CLine< SFix< NI, NF > >
 CLine< UFix< NI, NF > >
 CLine< unsigned char >
 CLine< unsigned int >
 CLine< unsigned long >
 CMetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >MetaOscil is a wrapper for several Oscil
 CMidiToFreqPrivateInternal
 CMonoOutputThis struct encapsulates one frame of mono audio output
 CMozziPrivate::MozziRandPrivate
 COscil< NUM_TABLE_CELLS, UPDATE_RATE >Oscil plays a wavetable, cycling through the table to generate an audio or control signal
 COscil< 8192, MOZZI_AUDIO_RATE >
 COscil< COS8192_NUM_CELLS, MOZZI_AUDIO_RATE >
 COscil< SIN2048_NUM_CELLS, MOZZI_AUDIO_RATE >
 CPDResonantPDResonant is a simple midi instrument using Phase distortion used to simulate resonant filter, based on https://en.wikipedia.org/wiki/Phase_distortion_synthesis
 CPhasor< UPDATE_RATE >Phasor repeatedly generates a high resolution ramp at a variable frequency
 CPhasor< MOZZI_AUDIO_RATE >
 CPortamento< CONTROL_UPDATE_RATE >A simple portamento (pitch slide from one note to the next) effect, useful for note-based applications
 CRCpoll< SENSOR_PIN >A class for reading voltage on a digital pin, derived from http://arduino.cc/en/Tutorial/RCtime
 CResonantFilter< FILTER_TYPE, su >A generic resonant filter for audio signals
 CResonantFilter< LOWPASS, uint8_t >
 CMultiResonantFilter< su >A generic filter for audio signals that can produce lowpass, highpass, bandpass and notch outputs at runtime
 CReverbTankA reverb which sounds like the inside of a tin can
 CRollingAverage< T, WINDOW_LENGTH >Calculates a running average over a specified number of the most recent readings
 CRollingAverage< T,(1<<(RESOLUTION_INCREASE_BITS *2))>
 COverSample< T, RESOLUTION_INCREASE_BITS >Enables the resolution of analog inputs to be increased by oversampling and decimation
 CRollingStat< T, WINDOW_LENGTH >WARNING: this class is work in progress, don't use it yet
 CSample< NUM_TABLE_CELLS, UPDATE_RATE, INTERP >Sample is like Oscil, it plays a wavetable
 CSampleHuffmanA sample player for samples encoded with Huffman compression
 CSmooth< T >A simple infinite impulse response low pass filter for smoothing control or audio signals
 CSmooth< SFix< NI, NF > >
 CSmooth< UFix< NI, NF > >
 CStack< T, NUM_ITEMS >A simple stack, used internally for keeping track of analog input channels as they are read
 CStateVariable< FILTER_TYPE >State Variable Filter (approximation of Chamberlin version) Informed by pseudocode at http://www.musicdsp.org/showone.php?id=23 and
 CStereoOutputThis struct encapsulates one frame of mono audio output
 CWaveFolder< T >A simple wavefolder
 CWavePacket< ALGORITHM >Wavepacket synthesis, with two overlapping streams of wave packets
 CWavePacketSample< ALGORITHM >A WavePacket which allows a custom table to be set as the audio source for the wavepackets (or grains)
 CWaveShaper< T >WaveShaper maps values from its input to values in a table, which are returned as output
 CWaveShaper< char >Int8_t specialisation of WaveShaper template
 CWaveShaper< int >Int specialisation of WaveShaper template
 CIntegerType< sizeof(int8_t)+sizeof(int8_t)>
 CIntegerType< sizeof(uint8_t)+sizeof(uint8_t)>
 CIntMapA faster version of Arduino's map() function
 CLine< T >For linear changes with a minimum of calculation at each step
 CLine< Q15n16 >
 CLine< Q16n16 >
 CLine< SFix< NI, NF > >
 CLine< UFix< NI, NF > >
 CLine< unsigned char >
 CLine< unsigned int >
 CLine< unsigned long >
 CMetaOscil< NUM_TABLE_CELLS, UPDATE_RATE, N_OSCIL >MetaOscil is a wrapper for several Oscil
 CMidiToFreqPrivateInternal
 CMonoOutputThis struct encapsulates one frame of mono audio output
 CMozziPrivate::MozziRandPrivate
 COscil< NUM_TABLE_CELLS, UPDATE_RATE >Oscil plays a wavetable, cycling through the table to generate an audio or control signal
 COscil< 8192, MOZZI_AUDIO_RATE >
 COscil< COS8192_NUM_CELLS, MOZZI_AUDIO_RATE >
 COscil< SIN2048_NUM_CELLS, MOZZI_AUDIO_RATE >
 CPDResonantPDResonant is a simple midi instrument using Phase distortion used to simulate resonant filter, based on https://en.wikipedia.org/wiki/Phase_distortion_synthesis
 CPhasor< UPDATE_RATE >Phasor repeatedly generates a high resolution ramp at a variable frequency
 CPhasor< MOZZI_AUDIO_RATE >
 CPortamento< CONTROL_UPDATE_RATE >A simple portamento (pitch slide from one note to the next) effect, useful for note-based applications
 CRCpoll< SENSOR_PIN >A class for reading voltage on a digital pin, derived from http://arduino.cc/en/Tutorial/RCtime
 CResonantFilter< FILTER_TYPE, su >A generic resonant filter for audio signals
 CResonantFilter< LOWPASS, uint8_t >
 CMultiResonantFilter< su >A generic filter for audio signals that can produce lowpass, highpass, bandpass and notch outputs at runtime
 CReverbTankA reverb which sounds like the inside of a tin can
 CRollingAverage< T, WINDOW_LENGTH >Calculates a running average over a specified number of the most recent readings
 CRollingAverage< T,(1<<(RESOLUTION_INCREASE_BITS *2))>
 COverSample< T, RESOLUTION_INCREASE_BITS >Enables the resolution of analog inputs to be increased by oversampling and decimation
 CRollingStat< T, WINDOW_LENGTH >WARNING: this class is work in progress, don't use it yet
 CSample< NUM_TABLE_CELLS, UPDATE_RATE, INTERP >Sample is like Oscil, it plays a wavetable
 CSampleHuffmanA sample player for samples encoded with Huffman compression
 CSmooth< T >A simple infinite impulse response low pass filter for smoothing control or audio signals
 CSmooth< SFix< NI, NF > >
 CSmooth< UFix< NI, NF > >
 CStack< T, NUM_ITEMS >A simple stack, used internally for keeping track of analog input channels as they are read
 CStateVariable< FILTER_TYPE >State Variable Filter (approximation of Chamberlin version) Informed by pseudocode at http://www.musicdsp.org/showone.php?id=23 and
 CStereoOutputThis struct encapsulates one frame of mono audio output
 CWaveFolder< T >A simple wavefolder
 CWavePacket< ALGORITHM >Wavepacket synthesis, with two overlapping streams of wave packets
 CWavePacketSample< ALGORITHM >A WavePacket which allows a custom table to be set as the audio source for the wavepackets (or grains)
 CWaveShaper< T >WaveShaper maps values from its input to values in a table, which are returned as output
 CWaveShaper< char >Int8_t specialisation of WaveShaper template
 CWaveShaper< int >Int specialisation of WaveShaper template
diff --git a/extras/doc/html/hierarchy.js b/extras/doc/html/hierarchy.js index 1f33b5364..ba8198a19 100644 --- a/extras/doc/html/hierarchy.js +++ b/extras/doc/html/hierarchy.js @@ -10,7 +10,7 @@ var hierarchy = [ "AudioDelay< NUM_BUFFER_SAMPLES, int >", "class_audio_delay.html", [ [ "ControlDelay< NUM_BUFFER_SAMPLES, T >", "class_control_delay.html", null ] ] ], - [ "AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE >", "class_audio_delay_feedback.html", null ], + [ "AudioDelayFeedback< NUM_BUFFER_SAMPLES, INTERP_TYPE, su >", "class_audio_delay_feedback.html", null ], [ "AutoRange< T >", "group__sensortools.html#class_auto_range", null ], [ "AutoRange< int >", "group__sensortools.html", [ [ "AutoMap", "group__sensortools.html#class_auto_map", null ] @@ -29,6 +29,7 @@ var hierarchy = [ "IntegerType< 4 >", "struct_integer_type_3_014_01_4.html", null ], [ "IntegerType< 8 >", "struct_integer_type_3_018_01_4.html", null ], [ "IntegerType< sizeof(AudioOutputStorage_t)>", "group__util.html", null ], + [ "IntegerType< sizeof(int8_t)+sizeof(int8_t)>", "group__util.html", null ], [ "IntegerType< sizeof(uint8_t)+sizeof(uint8_t)>", "group__util.html", null ], [ "IntMap", "class_int_map.html", null ], [ "Line< T >", "class_line.html", null ], diff --git a/extras/doc/html/mozzi-circle.png b/extras/doc/html/mozzi-circle.png new file mode 100644 index 0000000000000000000000000000000000000000..90b431eda5d768a3d2fc30e8827863e432fc0ee8 GIT binary patch literal 5915 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
1 
-
2 
3 
4 import array
5 import os