From 07ff65597fe6e7c2214fde6e952db3e02de3c26d Mon Sep 17 00:00:00 2001 From: Stefano D'Angelo Date: Fri, 22 Sep 2023 14:52:45 +0200 Subject: [PATCH] finalized bw_comb + examples + better debug in bw_delay --- TODO | 1 + examples/fx_comb/src/bw_example_fx_comb.c | 2 +- examples/fx_comb/vst3/Makefile | 3 + examples/fxpp_comb/vst3/Makefile | 3 + include/bw_comb.h | 703 +++++++++++++++++++--- include/bw_delay.h | 54 +- 6 files changed, 655 insertions(+), 111 deletions(-) diff --git a/TODO b/TODO index 82cf7a5..c70e71e 100644 --- a/TODO +++ b/TODO @@ -18,6 +18,7 @@ finally: * thank scientific paper authors * change config.h in examples version 1.0.0 * "Templates must have C++ linkage"? +* state that mem_set() can/must be called on uninitialized state (before reset_state) build system: * single header generation (vs modules in bwp... to think about) diff --git a/examples/fx_comb/src/bw_example_fx_comb.c b/examples/fx_comb/src/bw_example_fx_comb.c index 4a711ae..544f7fd 100644 --- a/examples/fx_comb/src/bw_example_fx_comb.c +++ b/examples/fx_comb/src/bw_example_fx_comb.c @@ -38,7 +38,7 @@ void bw_example_fx_comb_mem_set(bw_example_fx_comb *instance, void *mem) { void bw_example_fx_comb_reset(bw_example_fx_comb *instance) { bw_comb_reset_coeffs(&instance->comb_coeffs); - bw_comb_reset_state(&instance->comb_coeffs, &instance->comb_state); + bw_comb_reset_state(&instance->comb_coeffs, &instance->comb_state, 0.f); } void bw_example_fx_comb_process(bw_example_fx_comb *instance, const float** x, float** y, int n_samples) { diff --git a/examples/fx_comb/vst3/Makefile b/examples/fx_comb/vst3/Makefile index b72ae23..2a07762 100644 --- a/examples/fx_comb/vst3/Makefile +++ b/examples/fx_comb/vst3/Makefile @@ -4,3 +4,6 @@ NAME := bw_example_fx_comb SOURCE := bw_example_fx_comb.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_comb/vst3/Makefile b/examples/fxpp_comb/vst3/Makefile index 9461b0c..f389815 100644 --- a/examples/fxpp_comb/vst3/Makefile +++ b/examples/fxpp_comb/vst3/Makefile @@ -4,3 +4,6 @@ NAME := bw_example_fxpp_comb SOURCE := bw_example_fxpp_comb.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_comb.h b/include/bw_comb.h index e6375ab..5bc4e21 100644 --- a/include/bw_comb.h +++ b/include/bw_comb.h @@ -33,7 +33,7 @@ * J. Audio Eng. Soc., vol. 45, no. 10, pp. 764-788, October 1997. * * Unlike in the original paper, the feedback signal is not subtracted but - * rather added to the input. + * rather added to the input. * }}} * changelog {{{ *