diff --git a/examples/synth_mono/src/bw_example_synth_mono.c b/examples/synth_mono/src/bw_example_synth_mono.c index 0dbabe7..eb0ec0a 100644 --- a/examples/synth_mono/src/bw_example_synth_mono.c +++ b/examples/synth_mono/src/bw_example_synth_mono.c @@ -87,35 +87,37 @@ void bw_example_synth_mono_reset(bw_example_synth_mono *instance) { const float cutoff = 20.f + (20e3f - 20.f) * v * v * v; bw_svf_set_cutoff(&instance->vcf_coeffs, bw_clipf(cutoff, 20.f, 20e3f)); + float p, pi; bw_phase_gen_reset_coeffs(&instance->vco1_phase_gen_coeffs); - bw_phase_gen_reset_state(&instance->vco1_phase_gen_coeffs, &instance->vco1_phase_gen_state, 0.f); + bw_phase_gen_reset_state(&instance->vco1_phase_gen_coeffs, &instance->vco1_phase_gen_state, 0.f, &p, &pi); bw_osc_pulse_reset_coeffs(&instance->vco1_pulse_coeffs); bw_osc_tri_reset_coeffs(&instance->vco1_tri_coeffs); bw_gain_reset_coeffs(&instance->vco1_gain_coeffs); bw_phase_gen_reset_coeffs(&instance->vco2_phase_gen_coeffs); - bw_phase_gen_reset_state(&instance->vco2_phase_gen_coeffs, &instance->vco2_phase_gen_state, 0.f); + bw_phase_gen_reset_state(&instance->vco2_phase_gen_coeffs, &instance->vco2_phase_gen_state, 0.f, &p, &pi); bw_osc_pulse_reset_coeffs(&instance->vco2_pulse_coeffs); bw_osc_tri_reset_coeffs(&instance->vco2_tri_coeffs); bw_gain_reset_coeffs(&instance->vco2_gain_coeffs); bw_phase_gen_reset_coeffs(&instance->vco3_phase_gen_coeffs); - bw_phase_gen_reset_state(&instance->vco3_phase_gen_coeffs, &instance->vco3_phase_gen_state, 0.f); + bw_phase_gen_reset_state(&instance->vco3_phase_gen_coeffs, &instance->vco3_phase_gen_state, 0.f, &p, &pi); bw_osc_pulse_reset_coeffs(&instance->vco3_pulse_coeffs); bw_osc_tri_reset_coeffs(&instance->vco3_tri_coeffs); bw_gain_reset_coeffs(&instance->vco3_gain_coeffs); - bw_osc_filt_reset_state(&instance->osc_filt_state); + bw_osc_filt_reset_state(&instance->osc_filt_state, 0.f); bw_pink_filt_reset_state(&instance->pink_filt_coeffs, &instance->pink_filt_state); bw_gain_reset_coeffs(&instance->noise_gain_coeffs); 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_env_gen_reset_state(&instance->vcf_env_gen_coeffs, &instance->vcf_env_gen_state, 0); bw_svf_reset_coeffs(&instance->vcf_coeffs); - bw_svf_reset_state(&instance->vcf_coeffs, &instance->vcf_state, 0.f); + float lp, bp, hp; + bw_svf_reset_state(&instance->vcf_coeffs, &instance->vcf_state, 0.f, &lp, &bp, &hp); 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_env_gen_reset_state(&instance->vca_env_gen_coeffs, &instance->vca_env_gen_state, 0); bw_phase_gen_reset_coeffs(&instance->a440_phase_gen_coeffs); - bw_phase_gen_reset_state(&instance->a440_phase_gen_coeffs, &instance->a440_phase_gen_state, 0.f); + bw_phase_gen_reset_state(&instance->a440_phase_gen_coeffs, &instance->a440_phase_gen_state, 0.f, &p, &pi); bw_gain_reset_coeffs(&instance->gain_coeffs); bw_ppm_reset_coeffs(&instance->ppm_coeffs); - bw_ppm_reset_state(&instance->ppm_coeffs, &instance->ppm_state); + bw_ppm_reset_state(&instance->ppm_coeffs, &instance->ppm_state, 0.f); instance->note = 60; instance->gate = 0; instance->pitch_bend = 0.f; diff --git a/examples/synth_mono/vst3/Makefile b/examples/synth_mono/vst3/Makefile index 4296ac9..5fa53d4 100644 --- a/examples/synth_mono/vst3/Makefile +++ b/examples/synth_mono/vst3/Makefile @@ -4,3 +4,6 @@ NAME := bw_example_synth_mono SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_synth_mono.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/synthpp_mono/vst3/Makefile b/examples/synthpp_mono/vst3/Makefile index f4146f5..fdc83a1 100644 --- a/examples/synthpp_mono/vst3/Makefile +++ b/examples/synthpp_mono/vst3/Makefile @@ -4,3 +4,6 @@ NAME := bw_example_synthpp_mono SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_synthpp_mono.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_osc_filt.h b/include/bw_osc_filt.h index 8fb5de4..d67a031 100644 --- a/include/bw_osc_filt.h +++ b/include/bw_osc_filt.h @@ -35,6 +35,14 @@ *