From bd2a153eaeecaf2771fb95fdefd008138c1b3622 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 17 May 2023 16:37:12 -0500 Subject: [PATCH] synthio: there is a midi note 0 --- shared-bindings/synthio/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/synthio/__init__.c b/shared-bindings/synthio/__init__.c index 72104332af..18a7e8043e 100644 --- a/shared-bindings/synthio/__init__.c +++ b/shared-bindings/synthio/__init__.c @@ -273,7 +273,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(synthio_from_file_obj, 1, synthio_from_file); //| STATIC mp_obj_t midi_to_hz(mp_obj_t arg) { - mp_float_t note = mp_arg_validate_obj_float_range(arg, 1, 127, MP_QSTR_note); + mp_float_t note = mp_arg_validate_obj_float_range(arg, 0, 127, MP_QSTR_note); return mp_obj_new_float(common_hal_synthio_midi_to_hz_float(note)); } MP_DEFINE_CONST_FUN_OBJ_1(synthio_midi_to_hz_obj, midi_to_hz);