make get_closest_keymap_pitch work with low pitches