1
0
Fork 0

Add back lost note->frequency conversion

This somehow got lost in db135ba34f.
This commit is contained in:
Robbert van der Helm 2022-06-22 19:40:25 +02:00
parent db135ba34f
commit 8018af419f

View file

@ -102,7 +102,7 @@ pub fn s2v_f32_hz_then_khz() -> Arc<dyn Fn(&str) -> Option<f32> + Send + Sync> {
Arc::new(move |string| {
// If the user inputs a note representation, then we'll use that
if let Some(midi_note_number) = note_formatter(string) {
return Some((midi_note_number.clamp(0, 127) as u8) as f32);
return Some(util::midi_note_to_freq(midi_note_number.clamp(0, 127) as u8) as f32);
}
let string = string.trim();