diff --git a/TODO b/TODO
index 1ea9bc7..b72b7bb 100644
--- a/TODO
+++ b/TODO
@@ -34,6 +34,7 @@ code:
* bw_satur gain compensation to divide by actual gain (derivative) rather than gain parameter?
* cite papers, thank authors
* process1 and multi-channel
+* add initial state (x0) to reset state of lp1, ap1, mm1, hs1, ls1, others? all?
build system:
* make makefiles handle paths with spaces etc
diff --git a/examples/fx_ap2/src/bw_example_fx_ap2.c b/examples/fx_ap2/src/bw_example_fx_ap2.c
index 72bc08e..b12088a 100644
--- a/examples/fx_ap2/src/bw_example_fx_ap2.c
+++ b/examples/fx_ap2/src/bw_example_fx_ap2.c
@@ -30,7 +30,7 @@ void bw_example_fx_ap2_set_sample_rate(bw_example_fx_ap2 *instance, float sample
void bw_example_fx_ap2_reset(bw_example_fx_ap2 *instance) {
bw_ap2_reset_coeffs(&instance->ap2_coeffs);
- bw_ap2_reset_state(&instance->ap2_coeffs, &instance->ap2_state);
+ bw_ap2_reset_state(&instance->ap2_coeffs, &instance->ap2_state, 0.f);
}
void bw_example_fx_ap2_process(bw_example_fx_ap2 *instance, const float** x, float** y, int n_samples) {
diff --git a/examples/fx_eq_3band/src/bw_example_fx_eq_3band.c b/examples/fx_eq_3band/src/bw_example_fx_eq_3band.c
index 982ea96..67c3c6f 100644
--- a/examples/fx_eq_3band/src/bw_example_fx_eq_3band.c
+++ b/examples/fx_eq_3band/src/bw_example_fx_eq_3band.c
@@ -34,11 +34,11 @@ void bw_example_fx_eq_3band_set_sample_rate(bw_example_fx_eq_3band *instance, fl
void bw_example_fx_eq_3band_reset(bw_example_fx_eq_3band *instance) {
bw_ls2_reset_coeffs(&instance->ls2_coeffs);
- bw_ls2_reset_state(&instance->ls2_coeffs, &instance->ls2_state);
+ bw_ls2_reset_state(&instance->ls2_coeffs, &instance->ls2_state, 0.f);
bw_peak_reset_coeffs(&instance->peak_coeffs);
- bw_peak_reset_state(&instance->peak_coeffs, &instance->peak_state);
+ bw_peak_reset_state(&instance->peak_coeffs, &instance->peak_state, 0.f);
bw_hs2_reset_coeffs(&instance->hs2_coeffs);
- bw_hs2_reset_state(&instance->hs2_coeffs, &instance->hs2_state);
+ bw_hs2_reset_state(&instance->hs2_coeffs, &instance->hs2_state, 0.f);
}
void bw_example_fx_eq_3band_process(bw_example_fx_eq_3band *instance, const float** x, float** y, int n_samples) {
diff --git a/examples/fx_mm2/src/bw_example_fx_mm2.c b/examples/fx_mm2/src/bw_example_fx_mm2.c
index 356c0db..e33ca5d 100644
--- a/examples/fx_mm2/src/bw_example_fx_mm2.c
+++ b/examples/fx_mm2/src/bw_example_fx_mm2.c
@@ -30,7 +30,7 @@ void bw_example_fx_mm2_set_sample_rate(bw_example_fx_mm2 *instance, float sample
void bw_example_fx_mm2_reset(bw_example_fx_mm2 *instance) {
bw_mm2_reset_coeffs(&instance->mm2_coeffs);
- bw_mm2_reset_state(&instance->mm2_coeffs, &instance->mm2_state);
+ bw_mm2_reset_state(&instance->mm2_coeffs, &instance->mm2_state, 0.f);
}
void bw_example_fx_mm2_process(bw_example_fx_mm2 *instance, const float** x, float** y, int n_samples) {
diff --git a/examples/fx_notch/src/bw_example_fx_notch.c b/examples/fx_notch/src/bw_example_fx_notch.c
index 7b885f3..15d0f5e 100644
--- a/examples/fx_notch/src/bw_example_fx_notch.c
+++ b/examples/fx_notch/src/bw_example_fx_notch.c
@@ -30,7 +30,7 @@ void bw_example_fx_notch_set_sample_rate(bw_example_fx_notch *instance, float sa
void bw_example_fx_notch_reset(bw_example_fx_notch *instance) {
bw_notch_reset_coeffs(&instance->notch_coeffs);
- bw_notch_reset_state(&instance->notch_coeffs, &instance->notch_state);
+ bw_notch_reset_state(&instance->notch_coeffs, &instance->notch_state, 0.f);
}
void bw_example_fx_notch_process(bw_example_fx_notch *instance, const float** x, float** y, int n_samples) {
diff --git a/examples/fx_svf/src/bw_example_fx_svf.c b/examples/fx_svf/src/bw_example_fx_svf.c
index dd180b1..513849d 100644
--- a/examples/fx_svf/src/bw_example_fx_svf.c
+++ b/examples/fx_svf/src/bw_example_fx_svf.c
@@ -30,7 +30,7 @@ void bw_example_fx_svf_set_sample_rate(bw_example_fx_svf *instance, float sample
void bw_example_fx_svf_reset(bw_example_fx_svf *instance) {
bw_svf_reset_coeffs(&instance->svf_coeffs);
- bw_svf_reset_state(&instance->svf_coeffs, &instance->svf_state);
+ bw_svf_reset_state(&instance->svf_coeffs, &instance->svf_state, 0.f);
}
void bw_example_fx_svf_process(bw_example_fx_svf *instance, const float** x, float** y, int n_samples) {
diff --git a/examples/synth_mono/src/bw_example_synth_mono.c b/examples/synth_mono/src/bw_example_synth_mono.c
index 2a9ef8a..f917b42 100644
--- a/examples/synth_mono/src/bw_example_synth_mono.c
+++ b/examples/synth_mono/src/bw_example_synth_mono.c
@@ -111,7 +111,7 @@ void bw_example_synth_mono_reset(bw_example_synth_mono *instance) {
bw_env_gen_reset_coeffs(&instance->vcf_env_gen_coeffs);
bw_env_gen_reset_state(&instance->vcf_env_gen_coeffs, &instance->vcf_env_gen_state);
bw_svf_reset_coeffs(&instance->vcf_coeffs);
- bw_svf_reset_state(&instance->vcf_coeffs, &instance->vcf_state);
+ bw_svf_reset_state(&instance->vcf_coeffs, &instance->vcf_state, 0.f);
bw_env_gen_reset_coeffs(&instance->vca_env_gen_coeffs);
bw_env_gen_reset_state(&instance->vca_env_gen_coeffs, &instance->vca_env_gen_state);
bw_phase_gen_reset_coeffs(&instance->a440_phase_gen_coeffs);
diff --git a/examples/synth_simple/src/bw_example_synth_simple.c b/examples/synth_simple/src/bw_example_synth_simple.c
index 3242a95..92b3f92 100644
--- a/examples/synth_simple/src/bw_example_synth_simple.c
+++ b/examples/synth_simple/src/bw_example_synth_simple.c
@@ -50,7 +50,7 @@ void bw_example_synth_simple_reset(bw_example_synth_simple *instance) {
bw_osc_pulse_reset_coeffs(&instance->osc_pulse_coeffs);
bw_osc_filt_reset_state(&instance->osc_filt_state);
bw_svf_reset_coeffs(&instance->svf_coeffs);
- bw_svf_reset_state(&instance->svf_coeffs, &instance->svf_state);
+ bw_svf_reset_state(&instance->svf_coeffs, &instance->svf_state, 0.f);
bw_env_gen_reset_coeffs(&instance->env_gen_coeffs);
bw_env_gen_reset_state(&instance->env_gen_coeffs, &instance->env_gen_state);
bw_gain_reset_coeffs(&instance->gain_coeffs);
diff --git a/include/bw_ap2.h b/include/bw_ap2.h
index 690a619..69af0f3 100644
--- a/include/bw_ap2.h
+++ b/include/bw_ap2.h
@@ -1,7 +1,7 @@
/*
* Brickworks
*
- * Copyright (C) 2022 Orastron Srl unipersonale
+ * Copyright (C) 2022, 2023 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.3.0 }}}
+ * version {{{ 0.4.0 }}}
* requires {{{ bw_config bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order allpass filter (180° shift at cutoff, approaching 360° shift
@@ -28,6 +28,11 @@
* }}}
* changelog {{{
*
+ * - Version 0.4.0:
+ *
+ * - Added initial input value to `bw_ap2_reset_state()`.
+ *
+ *
* - Version 0.3.0:
*
* - First release.
@@ -79,9 +84,10 @@ static inline void bw_ap2_reset_coeffs(bw_ap2_coeffs *BW_RESTRICT coeffs);
*
* #### bw_ap2_reset_state()
* ```>>> */
-static inline void bw_ap2_reset_state(const bw_ap2_coeffs *BW_RESTRICT coeffs, bw_ap2_state *BW_RESTRICT state);
+static inline void bw_ap2_reset_state(const bw_ap2_coeffs *BW_RESTRICT coeffs, bw_ap2_state *BW_RESTRICT state, float x0);
/*! <<<```
- * Resets the given `state` to its initial values using the given `coeffs`.
+ * Resets the given `state` to its initial values using the given `coeffs`
+ * and the quiescent/initial input value `x0`.
*
* #### bw_ap2_update_coeffs_ctrl()
* ```>>> */
@@ -157,8 +163,8 @@ static inline void bw_ap2_reset_coeffs(bw_ap2_coeffs *BW_RESTRICT coeffs) {
bw_svf_reset_coeffs(&coeffs->svf_coeffs);
}
-static inline void bw_ap2_reset_state(const bw_ap2_coeffs *BW_RESTRICT coeffs, bw_ap2_state *BW_RESTRICT state) {
- bw_svf_reset_state(&coeffs->svf_coeffs, &state->svf_state);
+static inline void bw_ap2_reset_state(const bw_ap2_coeffs *BW_RESTRICT coeffs, bw_ap2_state *BW_RESTRICT state, float x0) {
+ bw_svf_reset_state(&coeffs->svf_coeffs, &state->svf_state, x0);
}
static inline void bw_ap2_update_coeffs_ctrl(bw_ap2_coeffs *BW_RESTRICT coeffs) {
diff --git a/include/bw_hs2.h b/include/bw_hs2.h
index 46a2f63..869d3e0 100644
--- a/include/bw_hs2.h
+++ b/include/bw_hs2.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.3.0 }}}
+ * version {{{ 0.4.0 }}}
* requires {{{
* bw_config bw_common bw_gain bw_math bw_mm2 bw_one_pole bw_svf
* }}}
@@ -29,6 +29,11 @@
* }}}
* changelog {{{
*
+ * - Version 0.4.0:
+ *
+ * - Added initial input value to `bw_hs2_reset_state()`.
+ *
+ *
* - Version 0.3.0:
*
* - First release.
@@ -80,9 +85,10 @@ static inline void bw_hs2_reset_coeffs(bw_hs2_coeffs *BW_RESTRICT coeffs);
*
* #### bw_hs2_reset_state()
* ```>>> */
-static inline void bw_hs2_reset_state(const bw_hs2_coeffs *BW_RESTRICT coeffs, bw_hs2_state *BW_RESTRICT state);
+static inline void bw_hs2_reset_state(const bw_hs2_coeffs *BW_RESTRICT coeffs, bw_hs2_state *BW_RESTRICT state, float x0);
/*! <<<```
- * Resets the given `state` to its initial values using the given `coeffs`.
+ * Resets the given `state` to its initial values using the given `coeffs`
+ * and the quiescent/initial input value `x0`.
*
* #### bw_hs2_update_coeffs_ctrl()
* ```>>> */
@@ -210,8 +216,8 @@ static inline void bw_hs2_reset_coeffs(bw_hs2_coeffs *BW_RESTRICT coeffs) {
bw_mm2_reset_coeffs(&coeffs->mm2_coeffs);
}
-static inline void bw_hs2_reset_state(const bw_hs2_coeffs *BW_RESTRICT coeffs, bw_hs2_state *BW_RESTRICT state) {
- bw_mm2_reset_state(&coeffs->mm2_coeffs, &state->mm2_state);
+static inline void bw_hs2_reset_state(const bw_hs2_coeffs *BW_RESTRICT coeffs, bw_hs2_state *BW_RESTRICT state, float x0) {
+ bw_mm2_reset_state(&coeffs->mm2_coeffs, &state->mm2_state, x0);
}
static inline void bw_hs2_update_coeffs_ctrl(bw_hs2_coeffs *BW_RESTRICT coeffs) {
diff --git a/include/bw_ls2.h b/include/bw_ls2.h
index 63bbb4b..4b54470 100644
--- a/include/bw_ls2.h
+++ b/include/bw_ls2.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.3.0 }}}
+ * version {{{ 0.4.0 }}}
* requires {{{
* bw_config bw_common bw_gain bw_math bw_mm2 bw_one_pole bw_svf
* }}}
@@ -30,6 +30,11 @@
* }}}
* changelog {{{
*
+ * - Version 0.4.0:
+ *
+ * - Added initial input value to `bw_ls2_reset_state()`.
+ *
+ *
* - Version 0.3.0:
*
* - First release.
@@ -81,9 +86,10 @@ static inline void bw_ls2_reset_coeffs(bw_ls2_coeffs *BW_RESTRICT coeffs);
*
* #### bw_ls2_reset_state()
* ```>>> */
-static inline void bw_ls2_reset_state(const bw_ls2_coeffs *BW_RESTRICT coeffs, bw_ls2_state *BW_RESTRICT state);
+static inline void bw_ls2_reset_state(const bw_ls2_coeffs *BW_RESTRICT coeffs, bw_ls2_state *BW_RESTRICT state, float x0);
/*! <<<```
- * Resets the given `state` to its initial values using the given `coeffs`.
+ * Resets the given `state` to its initial values using the given `coeffs`
+ * and the quiescent/initial input value `x0`.
*
* #### bw_ls2_update_coeffs_ctrl()
* ```>>> */
@@ -209,8 +215,8 @@ static inline void bw_ls2_reset_coeffs(bw_ls2_coeffs *BW_RESTRICT coeffs) {
bw_mm2_reset_coeffs(&coeffs->mm2_coeffs);
}
-static inline void bw_ls2_reset_state(const bw_ls2_coeffs *BW_RESTRICT coeffs, bw_ls2_state *BW_RESTRICT state) {
- bw_mm2_reset_state(&coeffs->mm2_coeffs, &state->mm2_state);
+static inline void bw_ls2_reset_state(const bw_ls2_coeffs *BW_RESTRICT coeffs, bw_ls2_state *BW_RESTRICT state, float x0) {
+ bw_mm2_reset_state(&coeffs->mm2_coeffs, &state->mm2_state, x0);
}
static inline void bw_ls2_update_coeffs_ctrl(bw_ls2_coeffs *BW_RESTRICT coeffs) {
diff --git a/include/bw_mm2.h b/include/bw_mm2.h
index df17b7d..f5971ee 100644
--- a/include/bw_mm2.h
+++ b/include/bw_mm2.h
@@ -20,13 +20,18 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.3.0 }}}
+ * version {{{ 0.4.0 }}}
* requires {{{ bw_config bw_common bw_gain bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order multimode filter.
* }}}
* changelog {{{
*
+ * - Version 0.4.0:
+ *
+ * - Added initial input value to `bw_mm2_reset_state()`.
+ *
+ *
* - Version 0.3.0:
*
* - First release.
@@ -78,9 +83,10 @@ static inline void bw_mm2_reset_coeffs(bw_mm2_coeffs *BW_RESTRICT coeffs);
*
* #### bw_mm2_reset_state()
* ```>>> */
-static inline void bw_mm2_reset_state(const bw_mm2_coeffs *BW_RESTRICT coeffs, bw_mm2_state *BW_RESTRICT state);
+static inline void bw_mm2_reset_state(const bw_mm2_coeffs *BW_RESTRICT coeffs, bw_mm2_state *BW_RESTRICT state, float x0);
/*! <<<```
- * Resets the given `state` to its initial values using the given `coeffs`.
+ * Resets the given `state` to its initial values using the given `coeffs`
+ * and the quiescent/initial input value `x0`.
*
* #### bw_mm2_update_coeffs_ctrl()
* ```>>> */
@@ -232,8 +238,8 @@ static inline void bw_mm2_reset_coeffs(bw_mm2_coeffs *BW_RESTRICT coeffs) {
bw_gain_reset_coeffs(&coeffs->gain_hp_coeffs);
}
-static inline void bw_mm2_reset_state(const bw_mm2_coeffs *BW_RESTRICT coeffs, bw_mm2_state *BW_RESTRICT state) {
- bw_svf_reset_state(&coeffs->svf_coeffs, &state->svf_state);
+static inline void bw_mm2_reset_state(const bw_mm2_coeffs *BW_RESTRICT coeffs, bw_mm2_state *BW_RESTRICT state, float x0) {
+ bw_svf_reset_state(&coeffs->svf_coeffs, &state->svf_state, x0);
}
static inline void bw_mm2_update_coeffs_ctrl(bw_mm2_coeffs *BW_RESTRICT coeffs) {
diff --git a/include/bw_notch.h b/include/bw_notch.h
index 36627f8..8ceb9d5 100644
--- a/include/bw_notch.h
+++ b/include/bw_notch.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.3.0 }}}
+ * version {{{ 0.4.0 }}}
* requires {{{ bw_config 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,11 @@
* }}}
* changelog {{{
*
+ * - Version 0.4.0:
+ *
+ * - Added initial input value to `bw_notch_reset_state()`.
+ *
+ *
* - Version 0.3.0:
*
* - First release.
@@ -79,9 +84,10 @@ static inline void bw_notch_reset_coeffs(bw_notch_coeffs *BW_RESTRICT coeffs);
*
* #### bw_notch_reset_state()
* ```>>> */
-static inline void bw_notch_reset_state(const bw_notch_coeffs *BW_RESTRICT coeffs, bw_notch_state *BW_RESTRICT state);
+static inline void bw_notch_reset_state(const bw_notch_coeffs *BW_RESTRICT coeffs, bw_notch_state *BW_RESTRICT state, float x0);
/*! <<<```
- * Resets the given `state` to its initial values using the given `coeffs`.
+ * Resets the given `state` to its initial values using the given `coeffs`
+ * and the quiescent/initial input value `x0`.
*
* #### bw_notch_update_coeffs_ctrl()
* ```>>> */
@@ -157,8 +163,8 @@ static inline void bw_notch_reset_coeffs(bw_notch_coeffs *BW_RESTRICT coeffs) {
bw_svf_reset_coeffs(&coeffs->svf_coeffs);
}
-static inline void bw_notch_reset_state(const bw_notch_coeffs *BW_RESTRICT coeffs, bw_notch_state *BW_RESTRICT state) {
- bw_svf_reset_state(&coeffs->svf_coeffs, &state->svf_state);
+static inline void bw_notch_reset_state(const bw_notch_coeffs *BW_RESTRICT coeffs, bw_notch_state *BW_RESTRICT state, float x0) {
+ bw_svf_reset_state(&coeffs->svf_coeffs, &state->svf_state, x0);
}
static inline void bw_notch_update_coeffs_ctrl(bw_notch_coeffs *BW_RESTRICT coeffs) {
diff --git a/include/bw_peak.h b/include/bw_peak.h
index 37a4f28..5087c9d 100644
--- a/include/bw_peak.h
+++ b/include/bw_peak.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.3.0 }}}
+ * version {{{ 0.4.0 }}}
* requires {{{
* bw_config bw_common bw_gain bw_math bw_mm2 bw_one_pole bw_svf
* }}}
@@ -37,6 +37,11 @@
* }}}
* changelog {{{
*
+ * - Version 0.4.0:
+ *
+ * - Added initial input value to `bw_peak_reset_state()`.
+ *
+ *
* - Version 0.3.0:
*
* - First release.
@@ -88,9 +93,10 @@ static inline void bw_peak_reset_coeffs(bw_peak_coeffs *BW_RESTRICT coeffs);
*
* #### bw_peak_reset_state()
* ```>>> */
-static inline void bw_peak_reset_state(const bw_peak_coeffs *BW_RESTRICT coeffs, bw_peak_state *BW_RESTRICT state);
+static inline void bw_peak_reset_state(const bw_peak_coeffs *BW_RESTRICT coeffs, bw_peak_state *BW_RESTRICT state, float x0);
/*! <<<```
- * Resets the given `state` to its initial values using the given `coeffs`.
+ * Resets the given `state` to its initial values using the given `coeffs`
+ * and the quiescent/initial input value `x0`.
*
* #### bw_peak_update_coeffs_ctrl()
* ```>>> */
@@ -242,8 +248,8 @@ static inline void bw_peak_reset_coeffs(bw_peak_coeffs *BW_RESTRICT coeffs) {
bw_mm2_reset_coeffs(&coeffs->mm2_coeffs);
}
-static inline void bw_peak_reset_state(const bw_peak_coeffs *BW_RESTRICT coeffs, bw_peak_state *BW_RESTRICT state) {
- bw_mm2_reset_state(&coeffs->mm2_coeffs, &state->mm2_state);
+static inline void bw_peak_reset_state(const bw_peak_coeffs *BW_RESTRICT coeffs, bw_peak_state *BW_RESTRICT state, float x0) {
+ bw_mm2_reset_state(&coeffs->mm2_coeffs, &state->mm2_state, x0);
}
static inline void bw_peak_update_coeffs_ctrl(bw_peak_coeffs *BW_RESTRICT coeffs) {
diff --git a/include/bw_svf.h b/include/bw_svf.h
index 0141af5..455bcb9 100644
--- a/include/bw_svf.h
+++ b/include/bw_svf.h
@@ -20,14 +20,19 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 0.3.0 }}}
+ * version {{{ 0.4.0 }}}
* requires {{{ bw_config bw_common bw_math bw_one_pole }}}
* description {{{
* State variable filter (2nd order, 12 dB/oct) model with separated lowpass,
* bandpass, and highpass outputs.
* }}}
* changelog {{{
- *
+
+ * - Version 0.4.0:
+ *
+ * - Added initial input value to `bw_svf_reset_state()`.
+ *
+ *
* - Version 0.3.0:
*
* - Strenghtened algorithm for modulation.
@@ -93,9 +98,10 @@ static inline void bw_svf_reset_coeffs(bw_svf_coeffs *BW_RESTRICT coeffs);
*
* #### bw_svf_reset_state()
* ```>>> */
-static inline void bw_svf_reset_state(const bw_svf_coeffs *BW_RESTRICT coeffs, bw_svf_state *BW_RESTRICT state);
+static inline void bw_svf_reset_state(const bw_svf_coeffs *BW_RESTRICT coeffs, bw_svf_state *BW_RESTRICT state, float x0);
/*! <<<```
- * Resets the given `state` to its initial values using the given `coeffs`.
+ * Resets the given `state` to its initial values using the given `coeffs`
+ * and the quiescent/initial input value `x0`.
*
* #### bw_svf_update_coeffs_ctrl()
* ```>>> */
@@ -250,9 +256,9 @@ static inline void bw_svf_reset_coeffs(bw_svf_coeffs *BW_RESTRICT coeffs) {
_bw_svf_do_update_coeffs(coeffs, 1);
}
-static inline void bw_svf_reset_state(const bw_svf_coeffs *BW_RESTRICT coeffs, bw_svf_state *BW_RESTRICT state) {
+static inline void bw_svf_reset_state(const bw_svf_coeffs *BW_RESTRICT coeffs, bw_svf_state *BW_RESTRICT state, float x0) {
state->hp_z1 = 0.f;
- state->lp_z1 = 0.f;
+ state->lp_z1 = x0;
state->bp_z1 = 0.f;
state->cutoff_z1 = coeffs->cutoff;
}
diff --git a/include/bw_wah.h b/include/bw_wah.h
index 10e2b2a..4e4b7e4 100644
--- a/include/bw_wah.h
+++ b/include/bw_wah.h
@@ -31,6 +31,8 @@
*
* - Version 0.4.0:
*
+ * - Now specifying `0.f` as initial input value for
+ * `bw_svf_reset_state()`.
* - Fixed documentation for `bw_wah_state` and `bw_wah_reset_state()`.
*
*
@@ -163,7 +165,7 @@ static inline void bw_wah_reset_coeffs(bw_wah_coeffs *BW_RESTRICT coeffs) {
}
static inline void bw_wah_reset_state(const bw_wah_coeffs *BW_RESTRICT coeffs, bw_wah_state *BW_RESTRICT state) {
- bw_svf_reset_state(&coeffs->svf_coeffs, &state->svf_state);
+ bw_svf_reset_state(&coeffs->svf_coeffs, &state->svf_state, 0.f);
}
static inline void bw_wah_update_coeffs_ctrl(bw_wah_coeffs *BW_RESTRICT coeffs) {