Skip to content

Commit

Permalink
vinscant: the frequency is now correct
Browse files Browse the repository at this point in the history
  • Loading branch information
draxaris1010 committed Jun 20, 2024
1 parent 5563b65 commit d401ad3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vinscant/mpfiles/lib/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def __init__(self, melody: io.IOBase, pin: Pin) -> None:

@staticmethod
def midi_to_freq(note: int):
return 440 * 2**((float(note) - 69) / 12)
return 440 * 2**((float(note) - 69) / 12) / 2

def start(self):
self.timer.init(mode=Timer.PERIODIC, freq=1, callback=self.playNote)
Expand Down

0 comments on commit d401ad3

Please sign in to comment.