From 213bac4209c110976bad64cd8bbee00512880a01 Mon Sep 17 00:00:00 2001 From: Stefano D'Angelo Date: Fri, 8 Sep 2023 23:19:03 +0200 Subject: [PATCH] finalized bw_ls2 + fixed bw_hs2 prewarp cutoff + examples --- examples/fx_eq_3band/vst3/Makefile | 3 + examples/fxpp_eq_3band/vst3/Makefile | 3 + include/bw_hs2.h | 17 +- include/bw_ls2.h | 639 ++++++++++++++++++++++++--- 4 files changed, 586 insertions(+), 76 deletions(-) diff --git a/examples/fx_eq_3band/vst3/Makefile b/examples/fx_eq_3band/vst3/Makefile index 1451f01..90459dc 100644 --- a/examples/fx_eq_3band/vst3/Makefile +++ b/examples/fx_eq_3band/vst3/Makefile @@ -4,3 +4,6 @@ NAME := bw_example_fx_eq_3band SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_eq_3band.c include ${ROOT_DIR}/../../common/vst3/vst3.mk + +CXXFLAGS += -DRELEASE=1 -DNDEBUG -DBW_NO_DEBUG +#CXXFLAGS += -DDEVELOPMENT=1 -DBW_DEBUG_DEEP diff --git a/examples/fxpp_eq_3band/vst3/Makefile b/examples/fxpp_eq_3band/vst3/Makefile index c863a52..1ab370c 100644 --- a/examples/fxpp_eq_3band/vst3/Makefile +++ b/examples/fxpp_eq_3band/vst3/Makefile @@ -4,3 +4,6 @@ NAME := bw_example_fxpp_eq_3band SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fxpp_eq_3band.cpp include ${ROOT_DIR}/../../common/vst3/vst3.mk + +CXXFLAGS += -DRELEASE=1 -DNDEBUG -DBW_NO_DEBUG +#CXXFLAGS += -DDEVELOPMENT=1 -DBW_DEBUG_DEEP diff --git a/include/bw_hs2.h b/include/bw_hs2.h index 215a549..7640401 100644 --- a/include/bw_hs2.h +++ b/include/bw_hs2.h @@ -213,8 +213,9 @@ static inline void bw_hs2_set_cutoff( * `value` must be finite and positive. * * By the time `bw_hs2_update_coeffs_ctrl()`, `bw_hs2_update_coeffs_audio()`, - * `bw_hs2_process()`, or `bw_hs2_process_multi()` is called, - * `cutoff * bw_sqrtf(bw_sqrtf(high_gain))` must be in [`1e-6f`, `1e12f`]. + * `bw_hs2_process1()`, `bw_hs2_process()`, or `bw_hs2_process_multi()` is + * called, `cutoff * bw_sqrtf(bw_sqrtf(high_gain))` must be in [`1e-6f`, + * `1e12f`]. * * Default value: `1e3f`. * @@ -268,8 +269,9 @@ static inline void bw_hs2_set_high_gain_lin( * `value` must be finite and non-negative. * * By the time `bw_hs2_update_coeffs_ctrl()`, `bw_hs2_update_coeffs_audio()`, - * `bw_hs2_process()`, or `bw_hs2_process_multi()` is called, - * `cutoff * bw_sqrtf(bw_sqrtf(high_gain))` must be in [`1e-6f`, `1e12f`]. + * `bw_hs2_process1()`, `bw_hs2_process()`, or `bw_hs2_process_multi()` is + * called, `cutoff * bw_sqrtf(bw_sqrtf(high_gain))` must be in [`1e-6f`, + * `1e12f`]. * * Default value: `1.f`. * @@ -285,8 +287,9 @@ static inline void bw_hs2_set_high_gain_dB( * `value` must be finite if positive. * * By the time `bw_hs2_update_coeffs_ctrl()`, `bw_hs2_update_coeffs_audio()`, - * `bw_hs2_process()`, or `bw_hs2_process_multi()` is called, - * `cutoff * bw_sqrtf(bw_sqrtf(high_gain))` must be in [`1e-6f`, `1e12f`]. + * `bw_hs2_process1()`, `bw_hs2_process()`, or `bw_hs2_process_multi()` is + * called, `cutoff * bw_sqrtf(bw_sqrtf(high_gain))` must be in [`1e-6f`, + * `1e12f`]. * * Default value: `0.f`. * @@ -659,7 +662,7 @@ static inline void bw_hs2_set_prewarp_freq( BW_ASSERT(bw_is_finite(value)); BW_ASSERT(value >= 1e-6f && value <= 1e12f); - bw_mm2_set_prewarp_freq(&coeffs->mm2_coeffs, value); + coeffs->prewarp_freq = value; BW_ASSERT_DEEP(bw_hs2_coeffs_is_valid(coeffs)); BW_ASSERT_DEEP(coeffs->state >= bw_hs2_coeffs_state_init); diff --git a/include/bw_ls2.h b/include/bw_ls2.h index d7880b9..dc69121 100644 --- a/include/bw_ls2.h +++ b/include/bw_ls2.h @@ -30,6 +30,12 @@ *