Skip to content

Commit a854e55

Browse files
committed
synthio: add midi_to_hz to docs
1 parent d2aca7e commit a854e55

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

shared-bindings/synthio/__init__.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ STATIC mp_obj_t synthio_from_file(size_t n_args, const mp_obj_t *pos_args, mp_ma
262262
}
263263
MP_DEFINE_CONST_FUN_OBJ_KW(synthio_from_file_obj, 1, synthio_from_file);
264264

265+
//| def midi_to_hz(midi_note: int) -> float:
266+
//| """Converts the given midi note (60 = middle C, 69 = concert A) to Hz"""
267+
//|
268+
/
265269
STATIC mp_obj_t midi_to_hz(mp_obj_t arg) {
266270
mp_int_t note = mp_arg_validate_int_range(mp_obj_get_int(arg), 1, 127, MP_QSTR_note);
267271
return mp_obj_new_float(common_hal_synthio_midi_to_hz_float(note));

0 commit comments

Comments
 (0)