diff --git a/TODO b/TODO
index 34784b9..aa7f013 100644
--- a/TODO
+++ b/TODO
@@ -7,14 +7,11 @@ code:
* osc post filter (and one pole init, slew rate, etc.) val from input? set state instead?
* audio rate optional pulse width/slope inputs?
* empty functions etc. to keep consistency and forward compatibility?
-* float in [-1,1] for velocity, pitch bend, mod wheel
* should clip slope in triangle?
* common smoothing policy (as control rate as possible?) - smoothing control?
* svf bandpass out polarity too confusing (inverted in mm2)?
-* pan process with no out: should just reset coeffs?
* get_y_z1, common strategy?
* bw_satur gain compensation to divide by actual gain (derivative) rather than gain parameter?
-* cite papers, thank authors
* add initial state (x0) to reset state of lp1, ap1, mm1, hs1, ls1, others? all?
* bw_comb: should also modulate feedback?
* bw_comb: integer target delay values?
@@ -69,6 +66,8 @@ code:
* heavy debug (e.g. also stripping restrict) vs light debug vs release vs optimized makefile rules
* smaller optimized modules (e.g., simple one pole)
* one pole, slew lim, maybe others: process const input? (return also if const out)
+* pan process with no out: should just reset coeffs?
+* float in [0,1] or [-1,1] for velocity, pitch bend, mod wheel in examples
build system:
* make makefiles handle paths with spaces etc
diff --git a/include/bw_clip.h b/include/bw_clip.h
index 543d56c..8fd9277 100644
--- a/include/bw_clip.h
+++ b/include/bw_clip.h
@@ -35,6 +35,13 @@
* As a side effect, antialiasing causes attenuation at higher frequencies
* (about 3 dB at 0.5 × Nyquist frequency and rapidly increasing at higher
* frequencies).
+ *
+ * The antialiasing technique used here is described in
+ *
+ * J. D. Parker, V. Zavalishin, and E. Le Bivic, "Reducing the Aliasing of
+ * Nonlinear Waveshaping Using Continuous-Time Convolution", Proc. 19th Intl.
+ * Conf. Digital Audio Effects (DAFx-16), pp. 137-144, Brno, Czech Republic,
+ * September 2016.
* }}}
* changelog {{{
*
diff --git a/include/bw_note_queue.h b/include/bw_note_queue.h
index 8949e66..1e20282 100644
--- a/include/bw_note_queue.h
+++ b/include/bw_note_queue.h
@@ -79,8 +79,8 @@ typedef struct {
/*! <<<```
* Note status:
* * `pressed`: whether the note is pressed (non-`0`) or not (`0`);
- * * `velocity`: velocity in [`0.f`, `1.f`], otherwise negative to indicate
- * unknown / not available.
+ * * `velocity`: velocity in [`0.f`, `1.f`] or otherwise negative to
+ * indicate unknown / not available.
*
* #### bw_note_queue_event
* ```>>> */
diff --git a/include/bw_osc_pulse.h b/include/bw_osc_pulse.h
index 9e05947..256326e 100644
--- a/include/bw_osc_pulse.h
+++ b/include/bw_osc_pulse.h
@@ -28,6 +28,12 @@
*
* It turns a normalized phase signal, such as that geneated by
* [bw\_phase\_gen](bw_phase_gen), into a pulse wave.
+ *
+ * The antialiasing algorithm is based on
+ *
+ * V. Valimaki and A. Huovilainen, "Antialiasing Oscillators in Subtractive
+ * Synthesis", IEEE Signal Processing Magazine, vol. 24, no. 2, pp. 116-125,
+ * March 2007.
* }}}
* changelog {{{
*
diff --git a/include/bw_osc_saw.h b/include/bw_osc_saw.h
index 87bc752..c5558d1 100644
--- a/include/bw_osc_saw.h
+++ b/include/bw_osc_saw.h
@@ -27,6 +27,12 @@
*
* It turns a normalized phase signal, such as that geneated by
* [bw\_phase\_gen](bw_phase_gen), into a sawtooth wave.
+ *
+ * The antialiasing algorithm is based on
+ *
+ * V. Valimaki and A. Huovilainen, "Antialiasing Oscillators in Subtractive
+ * Synthesis", IEEE Signal Processing Magazine, vol. 24, no. 2, pp. 116-125,
+ * March 2007.
* }}}
* changelog {{{
*
diff --git a/include/bw_osc_tri.h b/include/bw_osc_tri.h
index a9d121e..2020cfa 100644
--- a/include/bw_osc_tri.h
+++ b/include/bw_osc_tri.h
@@ -28,6 +28,12 @@
*
* It turns a normalized phase signal, such as that geneated by
* [bw\_phase\_gen](bw_phase_gen), into a triangle wave.
+ *
+ * The antialiasing algorithm is based on
+ *
+ * V. Valimaki and A. Huovilainen, "Antialiasing Oscillators in Subtractive
+ * Synthesis", IEEE Signal Processing Magazine, vol. 24, no. 2, pp. 116-125,
+ * March 2007.
* }}}
* changelog {{{
*
diff --git a/include/bw_pan.h b/include/bw_pan.h
index cdc4ca4..ede7674 100644
--- a/include/bw_pan.h
+++ b/include/bw_pan.h
@@ -23,7 +23,7 @@
* version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole }}}
* description {{{
- * Stereo panner.
+ * Stereo panner with -3 dB center pan law.
* }}}
* changelog {{{
*
diff --git a/include/bw_pink_filt.h b/include/bw_pink_filt.h
index 8a90d5d..42a1a71 100644
--- a/include/bw_pink_filt.h
+++ b/include/bw_pink_filt.h
@@ -31,6 +31,12 @@
* 3 dB/oct from about 0.000046 × Nyquist frequency to about 0.9 × Nyquist
* frequency. It can be used to turn white noise into pink noise (hence the
* name).
+ *
+ * The filter design is based on
+ *
+ * P. P. La Pastina and S. D'Angelo, "Optimal Integer Order Approximation of
+ * Fractional Order Filters", Proc. 24th Intl. Conf. Digital Audio Effects
+ * (DAFx20in21), pp. 89-96, Vienna, Austria, September 2021.
* }}}
* changelog {{{
*
diff --git a/include/bw_rand.h b/include/bw_rand.h
index 11f6c22..1c51ac5 100644
--- a/include/bw_rand.h
+++ b/include/bw_rand.h
@@ -31,6 +31,14 @@
* All functions in this module are [reentrant](api#reentrant-function),
* [RT-safe](api#rt-safe-function), [thread-safe](api#thread-safe-function),
* and have [no side effects](api#no-side-effects).
+ *
+ * The algorithms are based on the ["simplified" Permuted Congruential
+ * Generator (PCG)](https://nullprogram.com/blog/2017/09/21/#permuted-congruential-generator-pcg)
+ * by Chris Wellons, which is itself taken from
+ *
+ * M. E. O'Neill, "PCG: A Family of Simple Fast Space-Efficient Statistically
+ * Good Algorithms for Random Number Generation", September 2014, available
+ * at https://www.cs.hmc.edu/tr/hmc-cs-2014-0905.pdf.
* }}}
* changelog {{{
*
diff --git a/include/bw_satur.h b/include/bw_satur.h
index fadc0d7..d9f2ce1 100644
--- a/include/bw_satur.h
+++ b/include/bw_satur.h
@@ -35,6 +35,13 @@
* As a side effect, antialiasing causes attenuation at higher frequencies
* (about 3 dB at 0.5 × Nyquist frequency and rapidly increasing at higher
* frequencies).
+ *
+ * The antialiasing technique used here is described in
+ *
+ * J. D. Parker, V. Zavalishin, and E. Le Bivic, "Reducing the Aliasing of
+ * Nonlinear Waveshaping Using Continuous-Time Convolution", Proc. 19th Intl.
+ * Conf. Digital Audio Effects (DAFx-16), pp. 137-144, Brno, Czech Republic,
+ * September 2016.
* }}}
* changelog {{{
*
diff --git a/include/bw_src_int.h b/include/bw_src_int.h
index 650fa78..2dd9f12 100644
--- a/include/bw_src_int.h
+++ b/include/bw_src_int.h
@@ -25,7 +25,7 @@
* description {{{
* Integer-ratio IIR sample rate converter.
*
- * Multi-rate filtering inspired by
+ * The multi-rate filtering approach was inspired by
*
* M. Holters and J.Parker, "A Combined Model for a Bucket Brigade Device and
* its Input and Output Filters", 21st Intl. Conf. Digital Audio Effects
diff --git a/include/bw_svf.h b/include/bw_svf.h
index d57911c..2cb28b5 100644
--- a/include/bw_svf.h
+++ b/include/bw_svf.h
@@ -25,6 +25,13 @@
* description {{{
* State variable filter (2nd order, 12 dB/oct) model with separated lowpass,
* bandpass, and highpass outputs.
+ *
+ * The module implements a robust original algorithm design, which I later
+ * found to be probably related to the one described in
+ *
+ * A. Wishnick, "Time-Varying Filters for Musical Applications", Proc. 17th
+ * Intl. Conf. Digital Audio Effects (DAFx-14), Erlangen, Germany, September
+ * 2014.
* }}}
* changelog {{{
*
diff --git a/include/bw_voice_alloc.h b/include/bw_voice_alloc.h
index d97f20e..25c8b0c 100644
--- a/include/bw_voice_alloc.h
+++ b/include/bw_voice_alloc.h
@@ -29,6 +29,8 @@
*
* - Version 1.0.0:
*
+ * - Specified that velocity can be negative in
+ *
bw_voice_alloc_opts
.
* - Now using
size_t
instead of
* BW_SIZE_T
.
* - Added
const
and BW_RESTRICT
where
@@ -94,9 +96,11 @@ typedef struct {
* * `priority`: note priority;
* * `note_on`: note on callback, where `voice` is an opaque pointer to the
* chosen voice, `note` is the note number, and `velocity` is the note
- * velocity in [`0.f`, `1.f`];
+ * velocity in [`0.f`, `1.f`] or otherwise negative to indicate unknown /
+ * not available;
* * `note_off`: note off callback, where `voice` is an opaque pointer to
- * the chosen voice and `velocity` is the note velocity in [`0.f`, `1.f`];
+ * the chosen voice and `velocity` is the note velocity in [`0.f`, `1.f`]
+ * or otherwise negative to indicate unknown / not available;
* * `get_note`: callback that returns the note number associated to the
* given `voice`;
* * `is_free`: callback that returns whether the given `voice` is free