diff --git a/code/tuner/main.py b/code/tuner/main.py index 5e26195..3ea6bbf 100644 --- a/code/tuner/main.py +++ b/code/tuner/main.py @@ -18,7 +18,7 @@ NOTES = "A B♭/A♯ B C D♭/C♯ D E♭/D♯ E F F♯/G♭ G A♭/G♯".split( # Get the note and octave using known note forumla def calculate_note(frequency): if frequency > 0: - note_num = round(math.log2(frequency / 440) * 12) + note_num = round(math.log2(frequency / A4) * 12) octave = math.floor(4 + note_num / 12) rel_note = note_num % 12 note = NOTES[rel_note]