From 8a85deb1e2d71e5395bbb9b84ef8593c4159da4e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 30 May 2023 09:26:14 -0500 Subject: [PATCH] synthio: shift 19 was too much for a note with amplitude 1 --- shared-module/synthio/Biquad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/synthio/Biquad.c b/shared-module/synthio/Biquad.c index 99d95959e0..d8cf0d7889 100644 --- a/shared-module/synthio/Biquad.c +++ b/shared-module/synthio/Biquad.c @@ -94,7 +94,7 @@ mp_obj_t common_hal_synthio_new_bpf(mp_float_t w0, mp_float_t Q) { return namedtuple_make_new((const mp_obj_type_t *)&synthio_biquad_type_obj, MP_ARRAY_SIZE(out_args), 0, out_args); } -#define BIQUAD_SHIFT (19) +#define BIQUAD_SHIFT (15) STATIC int32_t biquad_scale_arg_obj(mp_obj_t arg) { return (int32_t)MICROPY_FLOAT_C_FUN(round)(MICROPY_FLOAT_C_FUN(ldexp)(mp_obj_get_float(arg), BIQUAD_SHIFT)); }