1
0
Fork 0

Rename the midi_note_to_freq() argument name

To match the 'note' term used everywhere else.
This commit is contained in:
Robbert van der Helm 2022-07-06 16:33:33 +02:00
parent c36f29e3ca
commit e77eca88a5

View file

@ -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)]