From e77eca88a5d325f6a36703cf2e8bc46174d0845e Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Wed, 6 Jul 2022 16:33:33 +0200 Subject: [PATCH] Rename the midi_note_to_freq() argument name To match the 'note' term used everywhere else. --- src/util.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util.rs b/src/util.rs index 17b3e295..c836e43e 100644 --- a/src/util.rs +++ b/src/util.rs @@ -46,8 +46,8 @@ pub fn gain_to_db(gain: f32) -> f32 { /// Convert a MIDI note ID to a frequency at A4 = 440 Hz equal temperament and middle C = note 60 = /// C4. -pub fn midi_note_to_freq(pitch: u8) -> f32 { - 2.0f32.powf((pitch as f32 - 69.0) / 12.0) * 440.0 +pub fn midi_note_to_freq(note: u8) -> f32 { + 2.0f32.powf((note as f32 - 69.0) / 12.0) * 440.0 } #[cfg(test)]