pub fn frequency_to_midi_note(frequency: f32) -> PulseResult<u8>
Converts a frequency in Hz to a MIDI note number.