diff --git a/TODO b/TODO
index 1bc11ac..be5821e 100644
--- a/TODO
+++ b/TODO
@@ -8,8 +8,7 @@ code:
* audio rate optional pulse width/slope inputs?
* should rather use backward Euler in bw_onepole?
* one pole process const input? (return also if const out)
-* check const restrict etc.
-* define BW_RESTRICT to __restrict or similar when the compiler supports it
+* check const restrict size_t etc.
* empty functions etc. to keep consistency and forward compatibility?
* float in [-1,1] for velocity, pitch bend, mod wheel
* should clip slope in triangle?
@@ -19,7 +18,6 @@ code:
* pan process with no out: should just reset coeffs?
* get_y_z1, common strategy?
* sqrt(0) and corner cases, common strategy?
-* use BW_SIZE_T, check constant types
* 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?
@@ -50,9 +48,6 @@ code:
* bw_buf invert src dest order?
* check unititialized warnings
* voice alloc mode -> voice alloc priority
-* should remove bw_config?
-* use custom NDEBUG?
-* NULL (C) vs BW_SIZE_T (non-C)...?
* clearly specify that state is tied to a particular set of coeffs (1:N)
* modulation vs process (multi) no update (post 1.0.0)???
diff --git a/examples/common/ios/platform.h b/examples/common/ios/platform.h
index 8b13789..962b66f 100644
--- a/examples/common/ios/platform.h
+++ b/examples/common/ios/platform.h
@@ -1 +1,6 @@
+#ifndef PLATFORM_H
+#define PLATFORM_H
+#define NDEBUG
+
+#endif
diff --git a/examples/common/web/platform.h b/examples/common/web/platform.h
index 8483823..43bd66a 100644
--- a/examples/common/web/platform.h
+++ b/examples/common/web/platform.h
@@ -1,6 +1,7 @@
#ifndef PLATFORM_H
#define PLATFORM_H
+#define BW_NO_MATH_H
#define INFINITY (__builtin_inff())
#endif
diff --git a/examples/common/web/web.mk b/examples/common/web/web.mk
index 50f433d..ce47d05 100644
--- a/examples/common/web/web.mk
+++ b/examples/common/web/web.mk
@@ -1,6 +1,6 @@
CC := clang
CFLAGS := \
- -DNDEBUG \
+ -DBW_NO_DEBUG \
-I${ROOT_DIR}/../src \
-I${ROOT_DIR}/../../common/web \
-I${ROOT_DIR}/../../../include \
diff --git a/include/bw_ap1.h b/include/bw_ap1.h
index ac512c7..4d5eb39 100644
--- a/include/bw_ap1.h
+++ b/include/bw_ap1.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_lp1 bw_math bw_one_pole }}}
* description {{{
* First-order allpass filter (90° shift at cutoff, approaching 180° shift
@@ -28,6 +28,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_ap2.h b/include/bw_ap2.h
index f577a5e..693eeea 100644
--- a/include/bw_ap2.h
+++ b/include/bw_ap2.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order allpass filter (180° shift at cutoff, approaching 360° shift
@@ -28,6 +28,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_balance.h b/include/bw_balance.h
index cde2009..9c3cb42 100644
--- a/include/bw_balance.h
+++ b/include/bw_balance.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole }}}
* description {{{
* Stereo balance.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_bd_reduce.h b/include/bw_bd_reduce.h
index 3c3b472..c3ec583 100644
--- a/include/bw_bd_reduce.h
+++ b/include/bw_bd_reduce.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Bit depth reducer.
@@ -31,6 +31,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_buf.h b/include/bw_buf.h
index d0d301f..ae92112 100644
--- a/include/bw_buf.h
+++ b/include/bw_buf.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ utility }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common }}}
* description {{{
* Common operations on buffers.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Added debugging code.
@@ -67,55 +73,55 @@ extern "C" {
/*! api {{{
* #### bw_buf_fill()
* ```>>> */
-static inline void bw_buf_fill(float *dest, float k, BW_SIZE_T n_elems);
+static inline void bw_buf_fill(float *dest, float k, size_t n_elems);
/*! <<<```
* Sets the first `n_elems` in `dest` to `k`.
*
* #### bw_buf_neg()
* ```>>> */
-static inline void bw_buf_neg(float *dest, const float *src, BW_SIZE_T n_elems);
+static inline void bw_buf_neg(float *dest, const float *src, size_t n_elems);
/*! <<<```
* Inverts the sign of the first `n_elems` in `src` and stores the results in
* the first `n_elems` of `dest`.
*
* #### bw_buf_add()
* ```>>> */
-static inline void bw_buf_add(float *dest, const float *src, float k, BW_SIZE_T n_elems);
+static inline void bw_buf_add(float *dest, const float *src, float k, size_t n_elems);
/*! <<<```
* Adds `k` to the first `n_elems` in `src` and stores the results in the
* first `n_elems` of `dest`.
*
* #### bw_buf_scale()
* ```>>> */
-static inline void bw_buf_scale(float *dest, const float *src, float k, BW_SIZE_T n_elems);
+static inline void bw_buf_scale(float *dest, const float *src, float k, size_t n_elems);
/*! <<<```
* Multiplies the first `n_elems` in `src` by `k` and stores the results in
* the first `n_elems` of `dest`.
*
* #### bw_buf_mix()
* ```>>> */
-static inline void bw_buf_mix(float *dest, const float *src1, const float *src2, BW_SIZE_T n_elems);
+static inline void bw_buf_mix(float *dest, const float *src1, const float *src2, size_t n_elems);
/*! <<<```
* Adds the first `n_elems` of `src1` and `src2` and stores the results in
* the first `n_elems` of `dest`.
*
* #### bw_buf_mul()
* ```>>> */
-static inline void bw_buf_mul(float *dest, const float *src1, const float *src2, BW_SIZE_T n_elems);
+static inline void bw_buf_mul(float *dest, const float *src1, const float *src2, size_t n_elems);
/*! <<<```
* Multiplies the first `n_elems` of `src1` and `src2` and stores the results
* in the first `n_elems` of `dest`.
*
* #### bw_buf_fill_multi()
* ```>>> */
-static inline void bw_buf_fill_multi(float **dest, float k, BW_SIZE_T n_channels, BW_SIZE_T n_elems);
+static inline void bw_buf_fill_multi(float **dest, float k, size_t n_channels, size_t n_elems);
/*! <<<```
* Sets the first `n_elems` in each of the `n_channels` buffers `dest` to
* `k`.
*
* #### bw_buf_neg_multi()
* ```>>> */
-static inline void bw_buf_neg_multi(float **dest, const float **src, BW_SIZE_T n_channels, BW_SIZE_T n_elems);
+static inline void bw_buf_neg_multi(float **dest, const float **src, size_t n_channels, size_t n_elems);
/*! <<<```
* Inverts the sign of the first `n_elems` in each of the `n_channels`
* buffers `src` and stores the results in the first `n_elems` in each of the
@@ -123,7 +129,7 @@ static inline void bw_buf_neg_multi(float **dest, const float **src, BW_SIZE_T n
*
* #### bw_buf_add_multi()
* ```>>> */
-static inline void bw_buf_add_multi(float **dest, const float **src, float k, BW_SIZE_T n_channels, BW_SIZE_T n_elems);
+static inline void bw_buf_add_multi(float **dest, const float **src, float k, size_t n_channels, size_t n_elems);
/*! <<<```
* Adds `k` to the first `n_elems` in each of the `n_channels` buffers `src`
* and stores the results in the first `n_elems` in each of the `n_channels`
@@ -131,7 +137,7 @@ static inline void bw_buf_add_multi(float **dest, const float **src, float k, BW
*
* #### bw_buf_scale_multi()
* ```>>> */
-static inline void bw_buf_scale_multi(float **dest, const float **src, float k, BW_SIZE_T n_channels, BW_SIZE_T n_elems);
+static inline void bw_buf_scale_multi(float **dest, const float **src, float k, size_t n_channels, size_t n_elems);
/*! <<<```
* Multiplies the first `n_elems` in each of the `n_channels` buffers `src`
* by `k` and stores the results in the first `n_elems` in each of the
@@ -139,7 +145,7 @@ static inline void bw_buf_scale_multi(float **dest, const float **src, float k,
*
* #### bw_buf_mix_multi()
* ```>>> */
-static inline void bw_buf_mix_multi(float **dest, const float **src1, const float **src2, BW_SIZE_T n_channels, BW_SIZE_T n_elems);
+static inline void bw_buf_mix_multi(float **dest, const float **src1, const float **src2, size_t n_channels, size_t n_elems);
/*! <<<```
* Adds the first `n_elems` in each of the `n_channels` buffers `src1` and
* `src2` and stores the results in the first `n_elems` in each of the
@@ -147,7 +153,7 @@ static inline void bw_buf_mix_multi(float **dest, const float **src1, const floa
*
* #### bw_buf_mul_multi()
* ```>>> */
-static inline void bw_buf_mul_multi(float **dest, const float **src1, const float **src2, BW_SIZE_T n_channels, BW_SIZE_T n_elems);
+static inline void bw_buf_mul_multi(float **dest, const float **src1, const float **src2, size_t n_channels, size_t n_elems);
/*! <<<```
* Multiplies the first `n_elems` in each of the `n_channels` buffers `src1`
* and `src2` and stores the results in the first `n_elems` in each of the
@@ -159,109 +165,109 @@ static inline void bw_buf_mul_multi(float **dest, const float **src1, const floa
/* WARNING: This part of the file is not part of the public API. Its content may
* change at any time in future versions. Please, do not use it directly. */
-static inline void bw_buf_fill(float *dest, float k, BW_SIZE_T n_elems) {
+static inline void bw_buf_fill(float *dest, float k, size_t n_elems) {
BW_ASSERT(!(dest == NULL && n_elems != 0));
BW_ASSERT(!bw_is_nan(k));
- for (BW_SIZE_T i = 0; i < n_elems; i++)
+ for (size_t i = 0; i < n_elems; i++)
dest[i] = k;
BW_ASSERT_DEEP(!bw_has_nan(dest, n_elems));
}
-static inline void bw_buf_neg(float *dest, const float *src, BW_SIZE_T n_elems) {
+static inline void bw_buf_neg(float *dest, const float *src, size_t n_elems) {
BW_ASSERT(!((dest == NULL || src == NULL) && n_elems != 0));
BW_ASSERT_DEEP(!bw_has_nan(src, n_elems));
- for (BW_SIZE_T i = 0; i < n_elems; i++)
+ for (size_t i = 0; i < n_elems; i++)
dest[i] = -src[i];
BW_ASSERT_DEEP(!bw_has_nan(dest, n_elems));
}
-static inline void bw_buf_add(float *dest, const float *src, float k, BW_SIZE_T n_elems) {
+static inline void bw_buf_add(float *dest, const float *src, float k, size_t n_elems) {
BW_ASSERT(!((dest == NULL || src == NULL) && n_elems != 0));
BW_ASSERT_DEEP(!bw_has_nan(src, n_elems));
BW_ASSERT(!bw_is_nan(k));
- for (BW_SIZE_T i = 0; i < n_elems; i++)
+ for (size_t i = 0; i < n_elems; i++)
dest[i] = k + src[i];
BW_ASSERT_DEEP(!bw_has_nan(dest, n_elems));
}
-static inline void bw_buf_scale(float *dest, const float *src, float k, BW_SIZE_T n_elems) {
+static inline void bw_buf_scale(float *dest, const float *src, float k, size_t n_elems) {
BW_ASSERT(!((dest == NULL || src == NULL) && n_elems != 0));
BW_ASSERT_DEEP(!bw_has_nan(src, n_elems));
BW_ASSERT(!bw_is_nan(k));
- for (BW_SIZE_T i = 0; i < n_elems; i++)
+ for (size_t i = 0; i < n_elems; i++)
dest[i] = k * src[i];
BW_ASSERT_DEEP(!bw_has_nan(dest, n_elems));
}
-static inline void bw_buf_mix(float *dest, const float *src1, const float *src2, BW_SIZE_T n_elems) {
+static inline void bw_buf_mix(float *dest, const float *src1, const float *src2, size_t n_elems) {
BW_ASSERT(!((dest == NULL || src1 == NULL || src2 == NULL) && n_elems != 0));
BW_ASSERT_DEEP(!bw_has_nan(src1, n_elems));
BW_ASSERT_DEEP(!bw_has_nan(src2, n_elems));
- for (BW_SIZE_T i = 0; i < n_elems; i++)
+ for (size_t i = 0; i < n_elems; i++)
dest[i] = src1[i] + src2[i];
BW_ASSERT_DEEP(!bw_has_nan(dest, n_elems));
}
-static inline void bw_buf_mul(float *dest, const float *src1, const float *src2, BW_SIZE_T n_elems) {
+static inline void bw_buf_mul(float *dest, const float *src1, const float *src2, size_t n_elems) {
BW_ASSERT(!((dest == NULL || src1 == NULL || src2 == NULL) && n_elems != 0));
BW_ASSERT_DEEP(!bw_has_nan(src1, n_elems));
BW_ASSERT_DEEP(!bw_has_nan(src2, n_elems));
- for (BW_SIZE_T i = 0; i < n_elems; i++)
+ for (size_t i = 0; i < n_elems; i++)
dest[i] = src1[i] * src2[i];
BW_ASSERT_DEEP(!bw_has_nan(dest, n_elems));
}
-static inline void bw_buf_fill_multi(float **dest, float k, BW_SIZE_T n_channels, BW_SIZE_T n_elems) {
+static inline void bw_buf_fill_multi(float **dest, float k, size_t n_channels, size_t n_elems) {
BW_ASSERT(!(dest == NULL && n_channels != 0));
- for (BW_SIZE_T i = 0; i < n_channels; i++)
+ for (size_t i = 0; i < n_channels; i++)
bw_buf_fill(dest[i], k, n_elems);
}
-static inline void bw_buf_neg_multi(float **dest, const float **src, BW_SIZE_T n_channels, BW_SIZE_T n_elems) {
+static inline void bw_buf_neg_multi(float **dest, const float **src, size_t n_channels, size_t n_elems) {
BW_ASSERT(!((dest == NULL || src == NULL) && n_channels != 0));
- for (BW_SIZE_T i = 0; i < n_channels; i++)
+ for (size_t i = 0; i < n_channels; i++)
bw_buf_neg(dest[i], src[i], n_elems);
}
-static inline void bw_buf_add_multi(float **dest, const float **src, float k, BW_SIZE_T n_channels, BW_SIZE_T n_elems) {
+static inline void bw_buf_add_multi(float **dest, const float **src, float k, size_t n_channels, size_t n_elems) {
BW_ASSERT(!((dest == NULL || src == NULL) && n_channels != 0));
- for (BW_SIZE_T i = 0; i < n_channels; i++)
+ for (size_t i = 0; i < n_channels; i++)
bw_buf_add(dest[i], src[i], k, n_elems);
}
-static inline void bw_buf_scale_multi(float **dest, const float **src, float k, BW_SIZE_T n_channels, BW_SIZE_T n_elems) {
+static inline void bw_buf_scale_multi(float **dest, const float **src, float k, size_t n_channels, size_t n_elems) {
BW_ASSERT(!((dest == NULL || src == NULL) && n_channels != 0));
- for (BW_SIZE_T i = 0; i < n_channels; i++)
+ for (size_t i = 0; i < n_channels; i++)
bw_buf_scale(dest[i], src[i], k, n_elems);
}
-static inline void bw_buf_mix_multi(float **dest, const float **src1, const float **src2, BW_SIZE_T n_channels, BW_SIZE_T n_elems) {
+static inline void bw_buf_mix_multi(float **dest, const float **src1, const float **src2, size_t n_channels, size_t n_elems) {
BW_ASSERT(!((dest == NULL || src1 == NULL || src2 == NULL) && n_channels != 0));
- for (BW_SIZE_T i = 0; i < n_channels; i++)
+ for (size_t i = 0; i < n_channels; i++)
bw_buf_mix(dest[i], src1[i], src2[i], n_elems);
}
-static inline void bw_buf_mul_multi(float **dest, const float **src1, const float **src2, BW_SIZE_T n_channels, BW_SIZE_T n_elems) {
+static inline void bw_buf_mul_multi(float **dest, const float **src1, const float **src2, size_t n_channels, size_t n_elems) {
BW_ASSERT(!((dest == NULL || src1 == NULL || src2 == NULL) && n_channels != 0));
- for (BW_SIZE_T i = 0; i < n_channels; i++)
+ for (size_t i = 0; i < n_channels; i++)
bw_buf_mul(dest[i], src1[i], src2[i], n_elems);
}
diff --git a/include/bw_chorus.h b/include/bw_chorus.h
index 3b44a9a..a9aff37 100644
--- a/include/bw_chorus.h
+++ b/include/bw_chorus.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{
* bw_buf bw_comb bw_common bw_delay bw_gain bw_math bw_one_pole bw_osc_sin
* bw_phase_gen
@@ -36,6 +36,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
@@ -95,7 +101,7 @@ static inline void bw_chorus_set_sample_rate(bw_chorus_coeffs *BW_RESTRICT coeff
*
* #### bw_chorus_mem_req()
* ```>>> */
-static inline BW_SIZE_T bw_chorus_mem_req(const bw_chorus_coeffs *BW_RESTRICT coeffs);
+static inline size_t bw_chorus_mem_req(const bw_chorus_coeffs *BW_RESTRICT coeffs);
/*! <<<```
* Returns the size, in bytes, of contiguous memory to be supplied to
* `bw_chorus_mem_set()` using `coeffs`.
@@ -240,7 +246,7 @@ static inline void bw_chorus_set_sample_rate(bw_chorus_coeffs *BW_RESTRICT coeff
bw_comb_set_sample_rate(&coeffs->comb_coeffs, sample_rate);
}
-static inline BW_SIZE_T bw_chorus_mem_req(const bw_chorus_coeffs *BW_RESTRICT coeffs) {
+static inline size_t bw_chorus_mem_req(const bw_chorus_coeffs *BW_RESTRICT coeffs) {
return bw_comb_mem_req(&coeffs->comb_coeffs);
}
diff --git a/include/bw_clip.h b/include/bw_clip.h
index 89886a6..c737eec 100644
--- a/include/bw_clip.h
+++ b/include/bw_clip.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Antialiased hard clipper with parametric bias and gain
@@ -38,6 +38,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_comb.h b/include/bw_comb.h
index 8394122..094ec91 100644
--- a/include/bw_comb.h
+++ b/include/bw_comb.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{
* bw_buf bw_common bw_delay bw_gain bw_math bw_one_pole
* }}}
@@ -37,6 +37,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
@@ -96,7 +102,7 @@ static inline void bw_comb_set_sample_rate(bw_comb_coeffs *BW_RESTRICT coeffs, f
*
* #### bw_comb_mem_req()
* ```>>> */
-static inline BW_SIZE_T bw_comb_mem_req(const bw_comb_coeffs *BW_RESTRICT coeffs);
+static inline size_t bw_comb_mem_req(const bw_comb_coeffs *BW_RESTRICT coeffs);
/*! <<<```
* Returns the size, in bytes, of contiguous memory to be supplied to
* `bw_comb_mem_set()` using `coeffs`.
@@ -219,9 +225,9 @@ struct _bw_comb_coeffs {
// Coefficients
float fs;
- BW_SIZE_T dffi;
+ size_t dffi;
float dfff;
- BW_SIZE_T dfbi;
+ size_t dfbi;
float dfbf;
// Parameters
@@ -258,7 +264,7 @@ static inline void bw_comb_set_sample_rate(bw_comb_coeffs *BW_RESTRICT coeffs, f
coeffs->fs = sample_rate;
}
-static inline BW_SIZE_T bw_comb_mem_req(const bw_comb_coeffs *BW_RESTRICT coeffs) {
+static inline size_t bw_comb_mem_req(const bw_comb_coeffs *BW_RESTRICT coeffs) {
return bw_delay_mem_req(&coeffs->delay_coeffs);
}
@@ -272,11 +278,11 @@ static inline void _bw_comb_do_update_coeffs(bw_comb_coeffs *BW_RESTRICT coeffs,
float delay_fb_cur = bw_one_pole_get_y_z1(&coeffs->smooth_delay_fb_state);
if (force || delay_ff_cur != coeffs->delay_ff) {
delay_ff_cur = bw_one_pole_process1_sticky_abs(&coeffs->smooth_coeffs, &coeffs->smooth_delay_ff_state, coeffs->delay_ff);
- const BW_SIZE_T len = bw_delay_get_length(&coeffs->delay_coeffs);
+ const size_t len = bw_delay_get_length(&coeffs->delay_coeffs);
const float dff = bw_maxf(coeffs->fs * delay_ff_cur, 0.f);
float dffif;
bw_intfracf(dff, &dffif, &coeffs->dfff);
- coeffs->dffi = (BW_SIZE_T)dffif;
+ coeffs->dffi = (size_t)dffif;
if (coeffs->dffi >= len) {
coeffs->dffi = len;
coeffs->dfff = 0.f;
@@ -284,11 +290,11 @@ static inline void _bw_comb_do_update_coeffs(bw_comb_coeffs *BW_RESTRICT coeffs,
}
if (force || delay_fb_cur != coeffs->delay_fb) {
delay_fb_cur = bw_one_pole_process1_sticky_abs(&coeffs->smooth_coeffs, &coeffs->smooth_delay_fb_state, coeffs->delay_fb);
- const BW_SIZE_T len = bw_delay_get_length(&coeffs->delay_coeffs);
+ const size_t len = bw_delay_get_length(&coeffs->delay_coeffs);
const float dfb = bw_maxf(coeffs->fs * delay_fb_cur, 1.f) - 1.f;
float dfbif;
bw_intfracf(dfb, &dfbif, &coeffs->dfbf);
- coeffs->dfbi = (BW_SIZE_T)dfbif;
+ coeffs->dfbi = (size_t)dfbif;
if (coeffs->dfbi >= len) {
coeffs->dfbi = len;
coeffs->dfbf = 0.f;
diff --git a/include/bw_common.h b/include/bw_common.h
index b78bdcc..e4e80e0 100644
--- a/include/bw_common.h
+++ b/include/bw_common.h
@@ -20,13 +20,27 @@
/*!
* module_type {{{ foundation }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* description {{{
* A common header to make sure that a bunch of basic definitions are
* available and consistent for all Brickworks modules.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Removed
BW_SIZE_T
and went for size_t
+ * instead.
+ * - Made control over inclusion of standard library headers more
+ * explicit via
BW_NO_STDLIB
,
+ * BW_NO_STDDEF_H
, BW_NO_STDINT_H
, and
+ * BW_NO_MATH_H
.
+ * - Introduced
BW_NO_DEBUG
to replace
+ * NDEBUG
and prevented useless inclusion of
+ * assert.h
.
+ * - Avoided using reserved identifiers.
+ *
+ *
* - Version 0.6.0:
*
* - Added
BW_ASSERT
, bw_is_inf()
,
@@ -63,45 +77,69 @@
* }}}
*/
-#ifndef _BW_COMMON_H
-#define _BW_COMMON_H
+#ifndef BW_COMMON_H
+#define BW_COMMON_H
/*! api {{{
- * #### NULL and BW_SIZE_T
- * If `NULL` or `BW_SIZE_T` are not defined, then `stddef.h` is `#include`d.
*
- * If `BW_SIZE_T` is not defined, then it is defined as `size_t`.
+ * #### Basic definitions
+ *
+ * Brickworks requires definitions of:
+ *
+ * * `NULL` and `size_t`, normally supplied by `stddef.h`;
+ * * `(u)int{8,16,32,64}_t`, `INT{8,16,32,64}_{MIN,MAX}`, and
+ * `UINT{8,16,32,64}_MAX`, normally supplied by `stdint.h`;
+ * * `INFINITY`, normally supplied by `math.h`.
+ *
+ * You can control whether those definitions are taken from said headers
+ * or you can supply them yourselves. In particular:
+ *
+ * * if `BW_NO_STDLIB` or `BW_NO_STDDEF_H` is defined, then `stddef.h` is not
+ * `#include`d;
+ * * if `BW_NO_STDLIB` or `BW_NO_STDINT_H` is defined, then `stdint.h` is not
+ * `#include`d;
+ * * if `BW_NO_STDLIB` or `BW_NO_MATH_H` is defined, then `math.h` is not
+ * `#include`d.
+ *
* >>> */
-#if !defined(NULL) || !defined(BW_SIZE_T)
+#if !defined(BW_NO_STDLIB) && !defined(BW_NO_STDDEF_H)
# include
-# if !defined(BW_SIZE_T)
-# define BW_SIZE_T size_t
-# endif
#endif
-/*! ...
- *
- * #### Exact-width integer types
- * If (u)int{8,16,32,64}_t
,
- * `INT{8,16,32,64}_{MIN,MAX}`, and `UINT{8,16,32,64}_MAX` are not defined,
- * then `stdint.h` is `#include`d (actually, only testing against
- * `INT32_MAX` but expecting the others to be finally defined).
- * >>> */
-#ifndef INT32_MAX
+
+#ifndef NULL
+# error NULL not defined
+#endif
+
+#if !defined(BW_NO_STDLIB) && !defined(BW_NO_STDINT_H)
# include
#endif
-/*! ...
- *
- * #### INFINITY
- * If `INFINITY` is not defined, then `math.h` is `#include`d.
- * >>> */
-#ifndef INFINITY
+
+#if !defined(INT8_MIN) || !defined(INT8_MAX) \
+ || !defined(INT16_MIN) || !defined(INT16_MAX) \
+ || !defined(INT32_MIN) || !defined(INT32_MAX) \
+ || !defined(INT64_MIN) || !defined(INT64_MAX) \
+ || !defined(UINT8_MAX) || !defined(UINT16_MAX) \
+ || !defined(UINT32_MAX) || !defined(UINT64_MAX)
+# error At least one definition in INT{8,16,32,64}_{MIN,MAX} or UINT{8,16,32,64}_MAX is missing
+#endif
+
+#if !defined(BW_NO_STDLIB) && !defined(BW_NO_MATH_H)
# include
#endif
+
+#ifndef INFINITY
+# error INFINITY not defined
+#endif
/*! ...
*
* #### BW_RESTRICT
- * If `BW_RESTRICT` is not defined, then it is defined as `restrict` if C99
- * is supported.
+ *
+ * `BW_RESTRICT` is a preprocessor definition that wraps the `restrict`
+ * keyword.
+ *
+ * If it is not defined already, then it gets defined as `restrict` if C99 is
+ * supported, otherwise it has no effect (typically when compiling C++ code).
+ *
* >>> */
#ifndef BW_RESTRICT
# if defined(__STDC__) && (__STDC_VERSION__ >= 199901L)
@@ -113,28 +151,35 @@
/*! ...
*
* #### BW_ASSERT and BW_ASSERT_DEEP
- * If `NDEBUG` is defined then "calls" to both `BW_ASSERT` and
+ *
+ * Both macros are `assert()`-like. `BW_ASSERT` is meant to perform
+ * rapid/basic validity checks (e.g., input pointer is not `NULL`, input
+ * `float` number is finite), while `BW_ASSERT_DEEP` should be used for
+ * deeper checks (e.g., validate data structures and internal states).
+ *
+ * If `BW_NO_DEBUG` is defined then "calls" to both `BW_ASSERT` and
* `BW_ASSERT_DEEP` will be stripped away by the preprocessor.
*
- * Whether `NDEBUG` is defined or not, "calls" to `BW_ASSERT_DEEP` will still
- * be stripped anyway if `BW_DEBUG_DEEP` is not defined.
+ * Whether `BW_NO_DEBUG` is defined or not, "calls" to `BW_ASSERT_DEEP` will
+ * still be stripped anyway if `BW_DEBUG_DEEP` is not defined.
*
- * In all other cases, `BW_ASSERT` and `BW_ASSERT_DEEP` can either be
- * provided by you, otherwise `BW_ASSERT` is defined as `assert` (and
- * `assert.h` is `#include`d) and `BW_ASSERT_DEEP` is defined as `BW_ASSERT`.
+ * Otherwise, `BW_ASSERT` and `BW_ASSERT_DEEP` can either be provided by you,
+ * otherwise `BW_ASSERT` is defined as `assert` (`assert.h` is `#include`d
+ * and `BW_NO_STDLIB` must not be defined -- please mid that `assert.h` is
+ * still influenced by `NDEBUG`), and `BW_ASSERT_DEEP` is defined as
+ * `BW_ASSERT`.
*
- * `BW_ASSERT` is meant to perform rapid/basic validity checks (e.g., input
- * pointer is not `NULL`, input `float` number is finite), while
- * `BW_ASSERT_DEEP` should be used for deeper checks (e.g., validate data
- * structures and internal states).
* >>> */
-#ifdef NDEBUG
+#ifdef BW_NO_DEBUG
# undef BW_ASSERT
# undef BW_ASSERT_DEEP
# define BW_ASSERT(ignore) ((void)0)
# define BW_ASSERT_DEEP(ignore) ((void)0)
#else
-# if !defined(BW_ASSERT) || !defined(BW_ASSERT_DEEP)
+# ifndef BW_ASSERT
+# ifdef BW_NO_STDLIB
+# error BW_NO_STDLIB defined but BW_ASSERT not defined
+# endif
# include
# endif
# ifndef BW_ASSERT
@@ -172,21 +217,21 @@ static inline char bw_is_finite(float x);
*
* #### bw_has_inf()
* ```>>> */
-static inline char bw_has_inf(const float *x, BW_SIZE_T n_elems);
+static inline char bw_has_inf(const float *x, size_t n_elems);
/*! <<<```
* Scans the fist `n_elems` in buffer `x` and returns non-`0` if it contains
* at least one positive or negative inifinity value, `0` otherwise.
*
* #### bw_has_nan()
* ```>>> */
-static inline char bw_has_nan(const float *x, BW_SIZE_T n_elems);
+static inline char bw_has_nan(const float *x, size_t n_elems);
/*! <<<```
* Scans the fist `n_elems` in buffer `x` and returns non-`0` if it contains
* at least one NaN value, `0` otherwise.
*
* #### bw_has_only_finite()
* ```>>> */
-static inline char bw_has_only_finite(const float *x, BW_SIZE_T n_elems);
+static inline char bw_has_only_finite(const float *x, size_t n_elems);
/*! <<<```
* Scans the fist `n_elems` in buffer `x` and returns non-`0` if it only
* finds finite values (neither NaN nor positive or negative infinity), `0`
@@ -222,23 +267,23 @@ static inline char bw_is_finite(float x) {
return (v.u & 0x7f800000) != 0x7f800000;
}
-static inline char bw_has_inf(const float *x, BW_SIZE_T n_elems) {
+static inline char bw_has_inf(const float *x, size_t n_elems) {
char ret = 0;
- for (BW_SIZE_T i = 0; i < n_elems && !ret; i++)
+ for (size_t i = 0; i < n_elems && !ret; i++)
ret = bw_is_inf(x[i]);
return ret;
}
-static inline char bw_has_nan(const float *x, BW_SIZE_T n_elems) {
+static inline char bw_has_nan(const float *x, size_t n_elems) {
char ret = 0;
- for (BW_SIZE_T i = 0; i < n_elems && !ret; i++)
+ for (size_t i = 0; i < n_elems && !ret; i++)
ret = bw_is_nan(x[i]);
return ret;
}
-static inline char bw_has_only_finite(const float *x, BW_SIZE_T n_elems) {
+static inline char bw_has_only_finite(const float *x, size_t n_elems) {
char ret = 1;
- for (BW_SIZE_T i = 0; i < n_elems && ret; i++)
+ for (size_t i = 0; i < n_elems && ret; i++)
ret = bw_is_finite(x[i]);
return ret;
}
diff --git a/include/bw_comp.h b/include/bw_comp.h
index d170b2a..42207ac 100644
--- a/include/bw_comp.h
+++ b/include/bw_comp.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{
* bw_common bw_env_follow bw_gain bw_math bw_one_pole
* }}}
@@ -29,6 +29,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_delay.h b/include/bw_delay.h
index 9a161d4..7cad509 100644
--- a/include/bw_delay.h
+++ b/include/bw_delay.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_buf bw_common bw_math }}}
* description {{{
* Interpolated delay line, not smoothed.
@@ -31,6 +31,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
@@ -89,7 +95,7 @@ static inline void bw_delay_set_sample_rate(bw_delay_coeffs *BW_RESTRICT coeffs,
*
* #### bw_delay_mem_req()
* ```>>> */
-static inline BW_SIZE_T bw_delay_mem_req(const bw_delay_coeffs *BW_RESTRICT coeffs);
+static inline size_t bw_delay_mem_req(const bw_delay_coeffs *BW_RESTRICT coeffs);
/*! <<<```
* Returns the size, in bytes, of contiguous memory to be supplied to
* `bw_delay_mem_set()` using `coeffs`.
@@ -114,7 +120,7 @@ static inline void bw_delay_reset_state(const bw_delay_coeffs *BW_RESTRICT coeff
*
* #### bw_delay_read()
* ```>>> */
-static float bw_delay_read(const bw_delay_coeffs *BW_RESTRICT coeffs, const bw_delay_state *BW_RESTRICT state, BW_SIZE_T di, float df);
+static float bw_delay_read(const bw_delay_coeffs *BW_RESTRICT coeffs, const bw_delay_state *BW_RESTRICT state, size_t di, float df);
/*! <<<```
* Returns the interpolated value read from the delay line identified by
* `coeffs` and `state` by applying a delay of `di` + `df` samples.
@@ -175,7 +181,7 @@ static inline void bw_delay_set_delay(bw_delay_coeffs *BW_RESTRICT coeffs, float
*
* #### bw_delay_get_length()
* ```>>> */
-static inline BW_SIZE_T bw_delay_get_length(const bw_delay_coeffs *BW_RESTRICT coeffs);
+static inline size_t bw_delay_get_length(const bw_delay_coeffs *BW_RESTRICT coeffs);
/*! <<<```
* Returns the length of the delay line in samples.
* }}} */
@@ -190,21 +196,21 @@ static inline BW_SIZE_T bw_delay_get_length(const bw_delay_coeffs *BW_RESTRICT c
struct _bw_delay_coeffs {
// Coefficients
- float fs;
- BW_SIZE_T len;
+ float fs;
+ size_t len;
- BW_SIZE_T di;
- float df;
+ size_t di;
+ float df;
// Parameters
- float max_delay;
- float delay;
- char delay_changed;
+ float max_delay;
+ float delay;
+ char delay_changed;
};
struct _bw_delay_state {
- float *buf;
- BW_SIZE_T idx;
+ float *buf;
+ size_t idx;
};
static inline void bw_delay_init(bw_delay_coeffs *BW_RESTRICT coeffs, float max_delay) {
@@ -214,10 +220,10 @@ static inline void bw_delay_init(bw_delay_coeffs *BW_RESTRICT coeffs, float max_
static inline void bw_delay_set_sample_rate(bw_delay_coeffs *BW_RESTRICT coeffs, float sample_rate) {
coeffs->fs = sample_rate;
- coeffs->len = (BW_SIZE_T)bw_ceilf(coeffs->fs * coeffs->max_delay) + 1;
+ coeffs->len = (size_t)bw_ceilf(coeffs->fs * coeffs->max_delay) + 1;
}
-static inline BW_SIZE_T bw_delay_mem_req(const bw_delay_coeffs *BW_RESTRICT coeffs) {
+static inline size_t bw_delay_mem_req(const bw_delay_coeffs *BW_RESTRICT coeffs) {
return coeffs->len * sizeof(float);
}
@@ -236,9 +242,9 @@ static inline void bw_delay_reset_state(const bw_delay_coeffs *BW_RESTRICT coeff
state->idx = 0;
}
-static float bw_delay_read(const bw_delay_coeffs *BW_RESTRICT coeffs, const bw_delay_state *BW_RESTRICT state, BW_SIZE_T di, float df) {
- const BW_SIZE_T n = (state->idx + (state->idx >= di ? 0 : coeffs->len)) - di;
- const BW_SIZE_T p = (n ? n : coeffs->len) - 1;
+static float bw_delay_read(const bw_delay_coeffs *BW_RESTRICT coeffs, const bw_delay_state *BW_RESTRICT state, size_t di, float df) {
+ const size_t n = (state->idx + (state->idx >= di ? 0 : coeffs->len)) - di;
+ const size_t p = (n ? n : coeffs->len) - 1;
return state->buf[n] + df * (state->buf[p] - state->buf[n]);
}
@@ -252,7 +258,7 @@ static inline void bw_delay_update_coeffs_ctrl(bw_delay_coeffs *BW_RESTRICT coef
if (coeffs->delay_changed) {
float i;
bw_intfracf(coeffs->fs * coeffs->delay, &i, &coeffs->df);
- coeffs->di = (BW_SIZE_T)i;
+ coeffs->di = (size_t)i;
coeffs->delay_changed = 0;
}
}
@@ -286,7 +292,7 @@ static inline void bw_delay_set_delay(bw_delay_coeffs *BW_RESTRICT coeffs, float
}
}
-static inline BW_SIZE_T bw_delay_get_length(const bw_delay_coeffs *BW_RESTRICT coeffs) {
+static inline size_t bw_delay_get_length(const bw_delay_coeffs *BW_RESTRICT coeffs) {
return coeffs->len;
}
diff --git a/include/bw_dist.h b/include/bw_dist.h
index 011d92e..45f25ba 100644
--- a/include/bw_dist.h
+++ b/include/bw_dist.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{
* bw_clip bw_common bw_gain bw_hp1 bw_lp1 bw_math bw_mm2 bw_one_pole bw_peak
* bw_satur bw_svf
@@ -32,6 +32,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_drive.h b/include/bw_drive.h
index ef1d881..d7bfa5d 100644
--- a/include/bw_drive.h
+++ b/include/bw_drive.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{
* bw_common bw_gain bw_math bw_mm2 bw_one_pole bw_peak bw_satur bw_svf
* }}}
@@ -31,6 +31,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_drywet.h b/include/bw_drywet.h
index 620e9da..69d5ebe 100644
--- a/include/bw_drywet.h
+++ b/include/bw_drywet.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole }}}
* description {{{
* Dry/wet mixer.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_env_follow.h b/include/bw_env_follow.h
index 9a50f4c..e71e638 100644
--- a/include/bw_env_follow.h
+++ b/include/bw_env_follow.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Envelope follower made of a full-wave rectifier followed by
@@ -28,6 +28,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_env_gen.h b/include/bw_env_gen.h
index 9a0faaa..8d291c3 100644
--- a/include/bw_env_gen.h
+++ b/include/bw_env_gen.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Linear ADSR envelope generator.
@@ -40,6 +40,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_fuzz.h b/include/bw_fuzz.h
index 0c81ac8..ff4cc10 100644
--- a/include/bw_fuzz.h
+++ b/include/bw_fuzz.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{
* bw_common bw_gain bw_hp1 bw_hs1 bw_lp1 bw_math bw_mm1 bw_one_pole bw_satur
* bw_svf
@@ -32,6 +32,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_gain.h b/include/bw_gain.h
index 5d73ef1..e579e74 100644
--- a/include/bw_gain.h
+++ b/include/bw_gain.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Gain.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_hp1.h b/include/bw_hp1.h
index 6d2e20d..e9416a3 100644
--- a/include/bw_hp1.h
+++ b/include/bw_hp1.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_lp1 bw_math bw_one_pole }}}
* description {{{
* First-order highpass filter (6 dB/oct) with gain asymptotically
@@ -28,6 +28,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_hs1.h b/include/bw_hs1.h
index b4e56eb..82c6ef6 100644
--- a/include/bw_hs1.h
+++ b/include/bw_hs1.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_gain bw_lp1 bw_math bw_mm1 bw_one_pole }}}
* description {{{
* First-order high shelf filter (6 dB/oct) with unitary DC gain.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_hs2.h b/include/bw_hs2.h
index b617871..dfde1b4 100644
--- a/include/bw_hs2.h
+++ b/include/bw_hs2.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_mm2 bw_one_pole bw_svf }}}
* description {{{
* Second-order high shelf filter (12 dB/oct) with unitary DC gain.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_lp1.h b/include/bw_lp1.h
index 164b31e..7b3a515 100644
--- a/include/bw_lp1.h
+++ b/include/bw_lp1.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* First-order lowpass filter (6 dB/oct) with unitary DC gain.
@@ -30,6 +30,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_ls1.h b/include/bw_ls1.h
index 7b0cbbd..bb04b40 100644
--- a/include/bw_ls1.h
+++ b/include/bw_ls1.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_gain bw_lp1 bw_math bw_mm1 bw_one_pole }}}
* description {{{
* First-order low shelf filter (6 dB/oct) with gain asymptotically
@@ -28,6 +28,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_ls2.h b/include/bw_ls2.h
index a8b1d16..8bd869f 100644
--- a/include/bw_ls2.h
+++ b/include/bw_ls2.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_mm2 bw_one_pole bw_svf }}}
* description {{{
* Second-order low shelf filter (12 dB/oct) with gain asymptotically
@@ -28,6 +28,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_mm1.h b/include/bw_mm1.h
index ca06b63..c1fdb09 100644
--- a/include/bw_mm1.h
+++ b/include/bw_mm1.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_gain bw_lp1 bw_math bw_one_pole }}}
* description {{{
* First-order multimode filter.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_mm2.h b/include/bw_mm2.h
index 08e01d0..cc2aa9e 100644
--- a/include/bw_mm2.h
+++ b/include/bw_mm2.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order multimode filter.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_noise_gate.h b/include/bw_noise_gate.h
index 5a30c40..7868b30 100644
--- a/include/bw_noise_gate.h
+++ b/include/bw_noise_gate.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_env_follow bw_math bw_one_pole }}}
* description {{{
* Noise gate with independent sidechain input.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_noise_gen.h b/include/bw_noise_gen.h
index 8dfb680..a27d558 100644
--- a/include/bw_noise_gen.h
+++ b/include/bw_noise_gen.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_rand }}}
* description {{{
* Generator of white noise with uniform distribution.
@@ -31,6 +31,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_notch.h b/include/bw_notch.h
index d7137d2..059f28f 100644
--- a/include/bw_notch.h
+++ b/include/bw_notch.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order notch filter with unitary gain at DC and asymptotically as
@@ -28,6 +28,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_one_pole.h b/include/bw_one_pole.h
index a99dcce..0fc990e 100644
--- a/include/bw_one_pole.h
+++ b/include/bw_one_pole.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* One-pole (6 dB/oct) lowpass filter with unitary DC gain, separate attack
@@ -30,6 +30,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* bw_one_pole_process()
and
@@ -172,7 +178,7 @@ static inline float bw_one_pole_process1_asym_sticky_rel(const bw_one_pole_coeff
*
* #### bw_one_pole_process()
* ```>>> */
-static inline void bw_one_pole_process(bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state *BW_RESTRICT state, const float *x, float *y, BW_SIZE_T n_samples);
+static inline void bw_one_pole_process(bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state *BW_RESTRICT state, const float *x, float *y, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the input buffer `x` and fills the
* first `n_samples` of the output buffer `y`, while using and updating both
@@ -182,7 +188,7 @@ static inline void bw_one_pole_process(bw_one_pole_coeffs *BW_RESTRICT coeffs, b
*
* #### bw_one_pole_process_multi()
* ```>>> */
-static inline void bw_one_pole_process_multi(bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state **BW_RESTRICT state, const float **x, float **y, BW_SIZE_T n_channels, BW_SIZE_T n_samples);
+static inline void bw_one_pole_process_multi(bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state **BW_RESTRICT state, const float **x, float **y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@@ -606,7 +612,7 @@ static inline float bw_one_pole_process1_asym_sticky_rel(const bw_one_pole_coeff
return y;
}
-static inline void bw_one_pole_process(bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state *BW_RESTRICT state, const float *x, float *y, BW_SIZE_T n_samples) {
+static inline void bw_one_pole_process(bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state *BW_RESTRICT state, const float *x, float *y, size_t n_samples) {
BW_ASSERT(coeffs != NULL);
BW_ASSERT_DEEP(bw_one_pole_coeffs_is_valid(coeffs));
BW_ASSERT_DEEP(coeffs->state >= _bw_one_pole_coeffs_state_reset_coeffs);
@@ -621,28 +627,28 @@ static inline void bw_one_pole_process(bw_one_pole_coeffs *BW_RESTRICT coeffs, b
if (coeffs->mA1u != coeffs->mA1d) {
if (coeffs->st2 != 0.f) {
if (coeffs->sticky_mode == bw_one_pole_sticky_mode_abs)
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
y[i] = bw_one_pole_process1_asym_sticky_abs(coeffs, state, x[i]);
else
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
y[i] = bw_one_pole_process1_asym_sticky_rel(coeffs, state, x[i]);
}
else {
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
y[i] = bw_one_pole_process1_asym(coeffs, state, x[i]);
}
}
else {
if (coeffs->st2 != 0.f) {
if (coeffs->sticky_mode == bw_one_pole_sticky_mode_abs)
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
y[i] = bw_one_pole_process1_sticky_abs(coeffs, state, x[i]);
else
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
y[i] = bw_one_pole_process1_sticky_rel(coeffs, state, x[i]);
}
else {
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
y[i] = bw_one_pole_process1(coeffs, state, x[i]);
}
}
@@ -650,28 +656,28 @@ static inline void bw_one_pole_process(bw_one_pole_coeffs *BW_RESTRICT coeffs, b
if (coeffs->mA1u != coeffs->mA1d) {
if (coeffs->st2 != 0.f) {
if (coeffs->sticky_mode == bw_one_pole_sticky_mode_abs)
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
bw_one_pole_process1_asym_sticky_abs(coeffs, state, x[i]);
else
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
bw_one_pole_process1_asym_sticky_rel(coeffs, state, x[i]);
}
else {
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
bw_one_pole_process1_asym(coeffs, state, x[i]);
}
}
else {
if (coeffs->st2 != 0.f) {
if (coeffs->sticky_mode == bw_one_pole_sticky_mode_abs)
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
bw_one_pole_process1_sticky_abs(coeffs, state, x[i]);
else
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
bw_one_pole_process1_sticky_rel(coeffs, state, x[i]);
}
else {
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
bw_one_pole_process1(coeffs, state, x[i]);
}
}
@@ -684,7 +690,7 @@ static inline void bw_one_pole_process(bw_one_pole_coeffs *BW_RESTRICT coeffs, b
BW_ASSERT_DEEP(!bw_has_nan(y, n_samples));
}
-static inline void bw_one_pole_process_multi(bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state **BW_RESTRICT state, const float **x, float **y, BW_SIZE_T n_channels, BW_SIZE_T n_samples) {
+static inline void bw_one_pole_process_multi(bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state **BW_RESTRICT state, const float **x, float **y, size_t n_channels, size_t n_samples) {
BW_ASSERT(coeffs != NULL);
BW_ASSERT_DEEP(bw_one_pole_coeffs_is_valid(coeffs));
BW_ASSERT_DEEP(coeffs->state >= _bw_one_pole_coeffs_state_reset_coeffs);
@@ -695,59 +701,59 @@ static inline void bw_one_pole_process_multi(bw_one_pole_coeffs *BW_RESTRICT coe
if (coeffs->mA1u != coeffs->mA1d) {
if (coeffs->st2 != 0.f) {
if (coeffs->sticky_mode == bw_one_pole_sticky_mode_abs)
- for (BW_SIZE_T j = 0; j < n_channels; j++)
+ for (size_t j = 0; j < n_channels; j++)
if (y[j] != NULL)
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
y[j][i] = bw_one_pole_process1_asym_sticky_abs(coeffs, state[j], x[j][i]);
else
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
bw_one_pole_process1_asym_sticky_abs(coeffs, state[j], x[j][i]);
else
- for (BW_SIZE_T j = 0; j < n_channels; j++)
+ for (size_t j = 0; j < n_channels; j++)
if (y[j] != NULL)
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
y[j][i] = bw_one_pole_process1_asym_sticky_rel(coeffs, state[j], x[j][i]);
else
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
bw_one_pole_process1_asym_sticky_rel(coeffs, state[j], x[j][i]);
}
else {
- for (BW_SIZE_T j = 0; j < n_channels; j++)
+ for (size_t j = 0; j < n_channels; j++)
if (y[j] != NULL)
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
y[j][i] = bw_one_pole_process1_asym(coeffs, state[j], x[j][i]);
else
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
bw_one_pole_process1_asym(coeffs, state[j], x[j][i]);
}
}
else {
if (coeffs->st2 != 0.f) {
if (coeffs->sticky_mode == bw_one_pole_sticky_mode_abs)
- for (BW_SIZE_T j = 0; j < n_channels; j++)
+ for (size_t j = 0; j < n_channels; j++)
if (y[j] != NULL)
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
y[j][i] = bw_one_pole_process1_sticky_abs(coeffs, state[j], x[j][i]);
else
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
bw_one_pole_process1_sticky_abs(coeffs, state[j], x[j][i]);
else
- for (BW_SIZE_T j = 0; j < n_channels; j++)
+ for (size_t j = 0; j < n_channels; j++)
if (y[j] != NULL)
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
y[j][i] = bw_one_pole_process1_sticky_rel(coeffs, state[j], x[j][i]);
else
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
bw_one_pole_process1_sticky_rel(coeffs, state[j], x[j][i]);
}
else {
- for (BW_SIZE_T j = 0; j < n_channels; j++)
+ for (size_t j = 0; j < n_channels; j++)
if (y[j] != NULL)
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
y[j][i] = bw_one_pole_process1(coeffs, state[j], x[j][i]);
else
- for (BW_SIZE_T i = 0; i < n_samples; i++)
+ for (size_t i = 0; i < n_samples; i++)
bw_one_pole_process1(coeffs, state[j], x[j][i]);
}
}
@@ -755,34 +761,34 @@ static inline void bw_one_pole_process_multi(bw_one_pole_coeffs *BW_RESTRICT coe
if (coeffs->mA1u != coeffs->mA1d) {
if (coeffs->st2 != 0.f) {
if (coeffs->sticky_mode == bw_one_pole_sticky_mode_abs)
- for (BW_SIZE_T i = 0; i < n_samples; i++)
- for (BW_SIZE_T j = 0; j < n_channels; j++)
+ for (size_t i = 0; i < n_samples; i++)
+ for (size_t j = 0; j < n_channels; j++)
bw_one_pole_process1_asym_sticky_abs(coeffs, state[j], x[j][i]);
else
- for (BW_SIZE_T i = 0; i < n_samples; i++)
- for (BW_SIZE_T j = 0; j < n_channels; j++)
+ for (size_t i = 0; i < n_samples; i++)
+ for (size_t j = 0; j < n_channels; j++)
bw_one_pole_process1_asym_sticky_rel(coeffs, state[j], x[j][i]);
}
else {
- for (BW_SIZE_T i = 0; i < n_samples; i++)
- for (BW_SIZE_T j = 0; j < n_channels; j++)
+ for (size_t i = 0; i < n_samples; i++)
+ for (size_t j = 0; j < n_channels; j++)
bw_one_pole_process1_asym(coeffs, state[j], x[j][i]);
}
}
else {
if (coeffs->st2 != 0.f) {
if (coeffs->sticky_mode == bw_one_pole_sticky_mode_abs)
- for (BW_SIZE_T i = 0; i < n_samples; i++)
- for (BW_SIZE_T j = 0; j < n_channels; j++)
+ for (size_t i = 0; i < n_samples; i++)
+ for (size_t j = 0; j < n_channels; j++)
bw_one_pole_process1_sticky_abs(coeffs, state[j], x[j][i]);
else
- for (BW_SIZE_T i = 0; i < n_samples; i++)
- for (BW_SIZE_T j = 0; j < n_channels; j++)
+ for (size_t i = 0; i < n_samples; i++)
+ for (size_t j = 0; j < n_channels; j++)
bw_one_pole_process1_sticky_rel(coeffs, state[j], x[j][i]);
}
else {
- for (BW_SIZE_T i = 0; i < n_samples; i++)
- for (BW_SIZE_T j = 0; j < n_channels; j++)
+ for (size_t i = 0; i < n_samples; i++)
+ for (size_t j = 0; j < n_channels; j++)
bw_one_pole_process1(coeffs, state[j], x[j][i]);
}
}
diff --git a/include/bw_osc_filt.h b/include/bw_osc_filt.h
index bbef7f6..d73db0d 100644
--- a/include/bw_osc_filt.h
+++ b/include/bw_osc_filt.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common }}}
* description {{{
* Post-filter to decolorate oscillator waveshapers when antialiasing is on.
@@ -33,6 +33,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_osc_pulse.h b/include/bw_osc_pulse.h
index 914e1f2..65e1719 100644
--- a/include/bw_osc_pulse.h
+++ b/include/bw_osc_pulse.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Pulse oscillator waveshaper with variable pulse width (actually, duty
@@ -31,6 +31,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_osc_saw.h b/include/bw_osc_saw.h
index adf4fea..f71d0cc 100644
--- a/include/bw_osc_saw.h
+++ b/include/bw_osc_saw.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Sawtooth oscillator waveshaper with PolyBLEP antialiasing.
@@ -30,6 +30,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_osc_sin.h b/include/bw_osc_sin.h
index 61d8717..e5525ad 100644
--- a/include/bw_osc_sin.h
+++ b/include/bw_osc_sin.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Sinusoidal oscillator waveshaper.
@@ -30,6 +30,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_osc_tri.h b/include/bw_osc_tri.h
index f199b66..78fcac9 100644
--- a/include/bw_osc_tri.h
+++ b/include/bw_osc_tri.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Triangle oscillator waveshaper with variable slope (increasing time over
@@ -31,6 +31,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_pan.h b/include/bw_pan.h
index ac6b9e6..5cb1469 100644
--- a/include/bw_pan.h
+++ b/include/bw_pan.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole }}}
* description {{{
* Stereo panner.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_peak.h b/include/bw_peak.h
index 55b4146..244f0ef 100644
--- a/include/bw_peak.h
+++ b/include/bw_peak.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_mm2 bw_one_pole bw_svf }}}
* description {{{
* Second-order peak filter with unitary gain at DC and asymptotically
@@ -35,6 +35,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_phase_gen.h b/include/bw_phase_gen.h
index 3c14405..e3d4f48 100644
--- a/include/bw_phase_gen.h
+++ b/include/bw_phase_gen.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Phase generator with portamento and exponential frequency modulation.
@@ -29,6 +29,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_phaser.h b/include/bw_phaser.h
index 75d56b7..1100134 100644
--- a/include/bw_phaser.h
+++ b/include/bw_phaser.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{
* bw_ap1 bw_common bw_lp1 bw_math bw_one_pole bw_osc_sin bw_phase_gen
* }}}
@@ -30,6 +30,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_pink_filt.h b/include/bw_pink_filt.h
index 2d4a56b..a9f0d79 100644
--- a/include/bw_pink_filt.h
+++ b/include/bw_pink_filt.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common }}}
* description {{{
* Pinking filter.
@@ -34,6 +34,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_ppm.h b/include/bw_ppm.h
index e7d002a..9e396fb 100644
--- a/include/bw_ppm.h
+++ b/include/bw_ppm.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_env_follow bw_math bw_one_pole }}}
* description {{{
* Digital peak programme meter with adjustable integration time constant.
@@ -30,6 +30,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_reverb.h b/include/bw_reverb.h
index 3bf0f4f..7b6e597 100644
--- a/include/bw_reverb.h
+++ b/include/bw_reverb.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{
* bw_buf bw_common bw_delay bw_drywet bw_gain bw_lp1 bw_math bw_one_pole
* bw_osc_sin bw_phase_gen
@@ -35,6 +35,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
@@ -85,7 +91,7 @@ static inline void bw_reverb_set_sample_rate(bw_reverb_coeffs *BW_RESTRICT coeff
*
* #### bw_reverb_mem_req()
* ```>>> */
-static inline BW_SIZE_T bw_reverb_mem_req(const bw_reverb_coeffs *BW_RESTRICT coeffs);
+static inline size_t bw_reverb_mem_req(const bw_reverb_coeffs *BW_RESTRICT coeffs);
/*! <<<```
* Returns the size, in bytes, of contiguous memory to be supplied to
* `bw_reverb_mem_set()` using `coeffs`.
@@ -233,30 +239,30 @@ struct _bw_reverb_coeffs {
// Coefficients
float fs;
float T;
- BW_SIZE_T id1;
- BW_SIZE_T id2;
- BW_SIZE_T id3;
- BW_SIZE_T id4;
- BW_SIZE_T dd2;
- BW_SIZE_T dd4;
- BW_SIZE_T d1;
- BW_SIZE_T d2;
- BW_SIZE_T d3;
- BW_SIZE_T d4;
- BW_SIZE_T dl1;
- BW_SIZE_T dl2;
- BW_SIZE_T dl3;
- BW_SIZE_T dl4;
- BW_SIZE_T dl5;
- BW_SIZE_T dl6;
- BW_SIZE_T dl7;
- BW_SIZE_T dr1;
- BW_SIZE_T dr2;
- BW_SIZE_T dr3;
- BW_SIZE_T dr4;
- BW_SIZE_T dr5;
- BW_SIZE_T dr6;
- BW_SIZE_T dr7;
+ size_t id1;
+ size_t id2;
+ size_t id3;
+ size_t id4;
+ size_t dd2;
+ size_t dd4;
+ size_t d1;
+ size_t d2;
+ size_t d3;
+ size_t d4;
+ size_t dl1;
+ size_t dl2;
+ size_t dl3;
+ size_t dl4;
+ size_t dl5;
+ size_t dl6;
+ size_t dl7;
+ size_t dr1;
+ size_t dr2;
+ size_t dr3;
+ size_t dr4;
+ size_t dr5;
+ size_t dr6;
+ size_t dr7;
float s;
float diff2;
@@ -338,33 +344,33 @@ static inline void bw_reverb_set_sample_rate(bw_reverb_coeffs *BW_RESTRICT coeff
bw_one_pole_reset_coeffs(&coeffs->smooth_coeffs);
coeffs->fs = sample_rate;
coeffs->T = 1.f / sample_rate;
- coeffs->id1 = (BW_SIZE_T)bw_roundf(coeffs->fs * (142.f / 29761.f));
- coeffs->id2 = (BW_SIZE_T)bw_roundf(coeffs->fs * (107.f / 29761.f));
- coeffs->id3 = (BW_SIZE_T)bw_roundf(coeffs->fs * (379.f / 29761.f));
- coeffs->id4 = (BW_SIZE_T)bw_roundf(coeffs->fs * (277.f / 29761.f));
- coeffs->dd2 = (BW_SIZE_T)bw_roundf(coeffs->fs * (1800.f / 29761.f));
- coeffs->dd4 = (BW_SIZE_T)bw_roundf(coeffs->fs * (2656.f / 29761.f));
- coeffs->d1 = (BW_SIZE_T)bw_roundf(coeffs->fs * (4453.f / 29761.f));
- coeffs->d2 = (BW_SIZE_T)bw_roundf(coeffs->fs * (3720.f / 29761.f));
- coeffs->d3 = (BW_SIZE_T)bw_roundf(coeffs->fs * (4217.f / 29761.f));
- coeffs->d4 = (BW_SIZE_T)bw_roundf(coeffs->fs * (3163.f / 29761.f));
- coeffs->dl1 = (BW_SIZE_T)bw_roundf(coeffs->fs * (266.f / 29761.f));
- coeffs->dl2 = (BW_SIZE_T)bw_roundf(coeffs->fs * (2974.f / 29761.f));
- coeffs->dl3 = (BW_SIZE_T)bw_roundf(coeffs->fs * (1913.f / 29761.f));
- coeffs->dl4 = (BW_SIZE_T)bw_roundf(coeffs->fs * (1996.f / 29761.f));
- coeffs->dl5 = (BW_SIZE_T)bw_roundf(coeffs->fs * (1990.f / 29761.f));
- coeffs->dl6 = (BW_SIZE_T)bw_roundf(coeffs->fs * (187.f / 29761.f));
- coeffs->dl7 = (BW_SIZE_T)bw_roundf(coeffs->fs * (1066.f / 29761.f));
- coeffs->dr1 = (BW_SIZE_T)bw_roundf(coeffs->fs * (353.f / 29761.f));
- coeffs->dr2 = (BW_SIZE_T)bw_roundf(coeffs->fs * (3627.f / 29761.f));
- coeffs->dr3 = (BW_SIZE_T)bw_roundf(coeffs->fs * (1228.f / 29761.f));
- coeffs->dr4 = (BW_SIZE_T)bw_roundf(coeffs->fs * (2673.f / 29761.f));
- coeffs->dr5 = (BW_SIZE_T)bw_roundf(coeffs->fs * (2111.f / 29761.f));
- coeffs->dr6 = (BW_SIZE_T)bw_roundf(coeffs->fs * (335.f / 29761.f));
- coeffs->dr7 = (BW_SIZE_T)bw_roundf(coeffs->fs * (121.f / 29761.f));
+ coeffs->id1 = (size_t)bw_roundf(coeffs->fs * (142.f / 29761.f));
+ coeffs->id2 = (size_t)bw_roundf(coeffs->fs * (107.f / 29761.f));
+ coeffs->id3 = (size_t)bw_roundf(coeffs->fs * (379.f / 29761.f));
+ coeffs->id4 = (size_t)bw_roundf(coeffs->fs * (277.f / 29761.f));
+ coeffs->dd2 = (size_t)bw_roundf(coeffs->fs * (1800.f / 29761.f));
+ coeffs->dd4 = (size_t)bw_roundf(coeffs->fs * (2656.f / 29761.f));
+ coeffs->d1 = (size_t)bw_roundf(coeffs->fs * (4453.f / 29761.f));
+ coeffs->d2 = (size_t)bw_roundf(coeffs->fs * (3720.f / 29761.f));
+ coeffs->d3 = (size_t)bw_roundf(coeffs->fs * (4217.f / 29761.f));
+ coeffs->d4 = (size_t)bw_roundf(coeffs->fs * (3163.f / 29761.f));
+ coeffs->dl1 = (size_t)bw_roundf(coeffs->fs * (266.f / 29761.f));
+ coeffs->dl2 = (size_t)bw_roundf(coeffs->fs * (2974.f / 29761.f));
+ coeffs->dl3 = (size_t)bw_roundf(coeffs->fs * (1913.f / 29761.f));
+ coeffs->dl4 = (size_t)bw_roundf(coeffs->fs * (1996.f / 29761.f));
+ coeffs->dl5 = (size_t)bw_roundf(coeffs->fs * (1990.f / 29761.f));
+ coeffs->dl6 = (size_t)bw_roundf(coeffs->fs * (187.f / 29761.f));
+ coeffs->dl7 = (size_t)bw_roundf(coeffs->fs * (1066.f / 29761.f));
+ coeffs->dr1 = (size_t)bw_roundf(coeffs->fs * (353.f / 29761.f));
+ coeffs->dr2 = (size_t)bw_roundf(coeffs->fs * (3627.f / 29761.f));
+ coeffs->dr3 = (size_t)bw_roundf(coeffs->fs * (1228.f / 29761.f));
+ coeffs->dr4 = (size_t)bw_roundf(coeffs->fs * (2673.f / 29761.f));
+ coeffs->dr5 = (size_t)bw_roundf(coeffs->fs * (2111.f / 29761.f));
+ coeffs->dr6 = (size_t)bw_roundf(coeffs->fs * (335.f / 29761.f));
+ coeffs->dr7 = (size_t)bw_roundf(coeffs->fs * (121.f / 29761.f));
}
-static inline BW_SIZE_T bw_reverb_mem_req(const bw_reverb_coeffs *BW_RESTRICT coeffs) {
+static inline size_t bw_reverb_mem_req(const bw_reverb_coeffs *BW_RESTRICT coeffs) {
return bw_delay_mem_req(&coeffs->predelay_coeffs)
+ bw_delay_mem_req(&coeffs->delay_id1_coeffs)
+ bw_delay_mem_req(&coeffs->delay_id2_coeffs)
@@ -506,10 +512,10 @@ static inline void bw_reverb_process1(const bw_reverb_coeffs *BW_RESTRICT coeffs
float dd1if, dd1f;
bw_intfracf(coeffs->fs * ((672.f / 29761.f) + coeffs->s), &dd1if, &dd1f);
- const BW_SIZE_T dd1i = (BW_SIZE_T)dd1if;
+ const size_t dd1i = (size_t)dd1if;
float dd3if, dd3f;
bw_intfracf(coeffs->fs * ((908.f / 29761.f) + coeffs->s), &dd3if, &dd3f);
- const BW_SIZE_T dd3i = (BW_SIZE_T)dd3if;
+ const size_t dd3i = (size_t)dd3if;
const float n24 = bw_delay_read(&coeffs->delay_dd1_coeffs, &state->delay_dd1_state, dd1i, dd1f);
const float n23 = s1 + 0.7f * n24;
diff --git a/include/bw_ringmod.h b/include/bw_ringmod.h
index 54fce07..683ba00 100644
--- a/include/bw_ringmod.h
+++ b/include/bw_ringmod.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Ring modulator with variable modulation amount.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_satur.h b/include/bw_satur.h
index a00d23b..75d8639 100644
--- a/include/bw_satur.h
+++ b/include/bw_satur.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Antialiased tanh-based saturation with parametric bias and gain
@@ -38,6 +38,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_slew_lim.h b/include/bw_slew_lim.h
index dad4136..e5d3aa3 100644
--- a/include/bw_slew_lim.h
+++ b/include/bw_slew_lim.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Slew-rate limiter with separate maximum increasing and decreasing rates.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_sr_reduce.h b/include/bw_sr_reduce.h
index c04a2eb..72e77af 100644
--- a/include/bw_sr_reduce.h
+++ b/include/bw_sr_reduce.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Sample rate reducer.
@@ -31,6 +31,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_src.h b/include/bw_src.h
index 5df4c06..3979302 100644
--- a/include/bw_src.h
+++ b/include/bw_src.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Aribtrary-ratio IIR sample rate converter.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_src_int.h b/include/bw_src_int.h
index d1c6276..1203891 100644
--- a/include/bw_src_int.h
+++ b/include/bw_src_int.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Integer-ratio IIR sample rate converter.
@@ -33,6 +33,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_svf.h b/include/bw_svf.h
index e273101..5323cb6 100644
--- a/include/bw_svf.h
+++ b/include/bw_svf.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* State variable filter (2nd order, 12 dB/oct) model with separated lowpass,
@@ -28,6 +28,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_trem.h b/include/bw_trem.h
index 1ce647a..c4ecd94 100644
--- a/include/bw_trem.h
+++ b/include/bw_trem.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{
* bw_common bw_math bw_one_pole bw_osc_sin bw_phase_gen bw_ringmod
* }}}
@@ -29,6 +29,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bw_voice_alloc.h b/include/bw_voice_alloc.h
index e4c84bc..7e80122 100644
--- a/include/bw_voice_alloc.h
+++ b/include/bw_voice_alloc.h
@@ -20,13 +20,19 @@
/*!
* module_type {{{ utility }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_note_queue }}}
* description {{{
* Basic voice allocator with low/high note priority.
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Now using
BW_SIZE_T
to count voices in
@@ -91,7 +97,7 @@ typedef struct {
*
* #### bw_voice_alloc()
* ```>>> */
-void bw_voice_alloc(const bw_voice_alloc_opts *BW_RESTRICT opts, bw_note_queue *BW_RESTRICT queue, void **BW_RESTRICT voices, BW_SIZE_T n_voices);
+void bw_voice_alloc(const bw_voice_alloc_opts *BW_RESTRICT opts, bw_note_queue *BW_RESTRICT queue, void **BW_RESTRICT voices, size_t n_voices);
/*! <<<```
* It performs voice allocation according to `opts` and using the events in
* `queue`.
@@ -105,7 +111,7 @@ void bw_voice_alloc(const bw_voice_alloc_opts *BW_RESTRICT opts, bw_note_queue *
/* WARNING: This part of the file is not part of the public API. Its content may
* change at any time in future versions. Please, do not use it directly. */
-void bw_voice_alloc(const bw_voice_alloc_opts *BW_RESTRICT opts, bw_note_queue *BW_RESTRICT queue, void **BW_RESTRICT voices, BW_SIZE_T n_voices) {
+void bw_voice_alloc(const bw_voice_alloc_opts *BW_RESTRICT opts, bw_note_queue *BW_RESTRICT queue, void **BW_RESTRICT voices, size_t n_voices) {
BW_ASSERT(opts != NULL);
BW_ASSERT(opts->priority == bw_voice_alloc_priority_low || opts->priority == bw_voice_alloc_priority_high);
BW_ASSERT(n_voices == 0 || opts->note_on != NULL);
@@ -118,7 +124,7 @@ void bw_voice_alloc(const bw_voice_alloc_opts *BW_RESTRICT opts, bw_note_queue *
for (unsigned char i = 0; i < queue->n_events; i++) {
bw_note_queue_event *ev = queue->events + i;
- for (BW_SIZE_T j = 0; j < n_voices; j++)
+ for (size_t j = 0; j < n_voices; j++)
if (!opts->is_free(voices[j]) && opts->get_note(voices[j]) == ev->note) {
if (!ev->status.pressed || ev->went_off)
opts->note_off(voices[j], ev->status.velocity);
@@ -128,15 +134,15 @@ void bw_voice_alloc(const bw_voice_alloc_opts *BW_RESTRICT opts, bw_note_queue *
}
if (ev->status.pressed) {
- for (BW_SIZE_T j = 0; j < n_voices; j++)
+ for (size_t j = 0; j < n_voices; j++)
if (opts->is_free(voices[j])) {
opts->note_on(voices[j], ev->note, ev->status.velocity);
goto next_event;
}
- BW_SIZE_T k = n_voices;
+ size_t k = n_voices;
int v = ev->note;
- for (BW_SIZE_T j = 0; j < n_voices; j++) {
+ for (size_t j = 0; j < n_voices; j++) {
int n = opts->get_note(voices[j]);
if (!queue->status[n].pressed && (k == n_voices || (opts->priority == bw_voice_alloc_priority_low ? n > v : n < v))) {
v = n;
@@ -148,7 +154,7 @@ void bw_voice_alloc(const bw_voice_alloc_opts *BW_RESTRICT opts, bw_note_queue *
continue;
}
- for (BW_SIZE_T j = 0; j < n_voices; j++) {
+ for (size_t j = 0; j < n_voices; j++) {
int n = opts->get_note(voices[j]);
if (opts->priority == bw_voice_alloc_priority_low ? n > v : n < v) {
v = n;
diff --git a/include/bw_wah.h b/include/bw_wah.h
index db69b1a..ae86170 100644
--- a/include/bw_wah.h
+++ b/include/bw_wah.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.6.0 }}}
+ * version {{{ 1.0.0 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Wah effect.
@@ -29,6 +29,12 @@
* }}}
* changelog {{{
*
+ * - Version 1.0.0:
+ *
+ * - Now using
size_t
instead of
+ * BW_SIZE_T
.
+ *
+ *
* - Version 0.6.0:
*
* - Removed dependency on bw_config.
diff --git a/include/bwpp_ap1.h b/include/bwpp_ap1.h
index 2af4ef3..e937362 100644
--- a/include/bwpp_ap1.h
+++ b/include/bwpp_ap1.h
@@ -29,7 +29,7 @@ namespace Brickworks {
/*! api {{{
* ##### Brickworks::AP1
* ```>>> */
-template
+template
class AP1 {
public:
AP1();
@@ -58,26 +58,26 @@ private:
bw_ap1_state *statesP[N_CHANNELS];
};
-template
+template
inline AP1::AP1() {
bw_ap1_init(&coeffs);
- for (BW_SIZE_T i = 0; i < N_CHANNELS; i++)
+ for (size_t i = 0; i < N_CHANNELS; i++)
statesP[i] = states + i;
}
-template
+template
inline void AP1::setSampleRate(float sampleRate) {
bw_ap1_set_sample_rate(&coeffs, sampleRate);
}
-template
+template
inline void AP1::reset(float x0) {
bw_ap1_reset_coeffs(&coeffs);
- for (BW_SIZE_T i = 0; i < N_CHANNELS; i++)
+ for (size_t i = 0; i < N_CHANNELS; i++)
bw_ap1_reset_state(&coeffs, states + i, x0);
}
-template
+template
inline void AP1::process(
std::array x,
std::array y,
@@ -85,7 +85,7 @@ inline void AP1::process(
bw_ap1_process_multi(&coeffs, statesP, x.data(), y.data(), N_CHANNELS, nSamples);
}
-template
+template
inline void AP1::setCutoff(float value) {
bw_ap1_set_cutoff(&coeffs, value);
}
diff --git a/include/bwpp_ap2.h b/include/bwpp_ap2.h
index 0de4246..9065b5c 100644
--- a/include/bwpp_ap2.h
+++ b/include/bwpp_ap2.h
@@ -29,7 +29,7 @@ namespace Brickworks {
/*! api {{{
* ##### Brickworks::AP2
* ```>>> */
-template
+template
class AP2 {
public:
AP2();
@@ -59,26 +59,26 @@ private:
bw_ap2_state *statesP[N_CHANNELS];
};
-template
+template
inline AP2::AP2() {
bw_ap2_init(&coeffs);
- for (BW_SIZE_T i = 0; i < N_CHANNELS; i++)
+ for (size_t i = 0; i < N_CHANNELS; i++)
statesP[i] = states + i;
}
-template
+template
inline void AP2::setSampleRate(float sampleRate) {
bw_ap2_set_sample_rate(&coeffs, sampleRate);
}
-template
+template
inline void AP2::reset(float x0) {
bw_ap2_reset_coeffs(&coeffs);
- for (BW_SIZE_T i = 0; i < N_CHANNELS; i++)
+ for (size_t i = 0; i < N_CHANNELS; i++)
bw_ap2_reset_state(&coeffs, states + i, x0);
}
-template
+template
inline void AP2::process(
std::array x,
std::array y,
@@ -86,12 +86,12 @@ inline void AP2::process(
bw_ap2_process_multi(&coeffs, statesP, x.data(), y.data(), N_CHANNELS, nSamples);
}
-template
+template
inline void AP2::setCutoff(float value) {
bw_ap2_set_cutoff(&coeffs, value);
}
-template
+template
inline void AP2::setQ(float value) {
bw_ap2_set_Q(&coeffs, value);
}
diff --git a/include/bwpp_balance.h b/include/bwpp_balance.h
index 64e76db..d11eb02 100644
--- a/include/bwpp_balance.h
+++ b/include/bwpp_balance.h
@@ -29,7 +29,7 @@ namespace Brickworks {
/*! api {{{
* ##### Brickworks::Balance
* ```>>> */
-template
+template
class Balance {
public:
Balance();
@@ -58,22 +58,22 @@ private:
bw_balance_coeffs coeffs;
};
-template
+template
inline Balance::Balance() {
bw_balance_init(&coeffs);
}
-template
+template
inline void Balance::setSampleRate(float sampleRate) {
bw_balance_set_sample_rate(&coeffs, sampleRate);
}
-template
+template
inline void Balance::reset() {
bw_balance_reset_coeffs(&coeffs);
}
-template
+template
inline void Balance::process(
std::array x_l,
std::array x_r,
@@ -83,7 +83,7 @@ inline void Balance::process(
bw_balance_process_multi(&coeffs, x_l.data(), x_r.data(), y_l.data(), y_r.data(), N_CHANNELS, nSamples);
}
-template
+template
inline void Balance::setBalance(float value) {
bw_balance_set_balance(&coeffs, value);
}
diff --git a/include/bwpp_bd_reduce.h b/include/bwpp_bd_reduce.h
index 679b0b5..d8c3514 100644
--- a/include/bwpp_bd_reduce.h
+++ b/include/bwpp_bd_reduce.h
@@ -29,7 +29,7 @@ namespace Brickworks {
/*! api {{{
* ##### Brickworks::BDReduce
* ```>>> */
-template
+template
class BDReduce {
public:
BDReduce();
@@ -55,17 +55,17 @@ private:
bw_bd_reduce_coeffs coeffs;
};
-template
+template
inline BDReduce::BDReduce() {
bw_bd_reduce_init(&coeffs);
}
-template
+template
inline void BDReduce::reset() {
bw_bd_reduce_reset_coeffs(&coeffs);
}
-template
+template
inline void BDReduce::process(
std::array x,
std::array y,
@@ -73,7 +73,7 @@ inline void BDReduce::process(
bw_bd_reduce_process_multi(&coeffs, x.data(), y.data(), N_CHANNELS, nSamples);
}
-template
+template
inline void BDReduce::setBitDepth(char value) {
bw_bd_reduce_set_bit_depth(&coeffs, value);
}
diff --git a/include/bwpp_buf.h b/include/bwpp_buf.h
index f02bf08..53fd4ed 100644
--- a/include/bwpp_buf.h
+++ b/include/bwpp_buf.h
@@ -29,7 +29,7 @@ namespace Brickworks {
/*! api {{{
* ##### Brickworks::bufFill
* ```>>> */
-template
+template
void bufFill(
std::array dest,
float k,
@@ -38,7 +38,7 @@ void bufFill(
*
* ##### Brickworks::bufNeg
* ```>>> */
-template
+template
void bufNeg(
std::array dest,
std::array src,
@@ -47,7 +47,7 @@ void bufNeg(
*
* ##### Brickworks::bufAdd
* ```>>> */
-template
+template
void bufAdd(
std::array dest,
std::array