adafruit / Adafruit_CircuitPython_RTTTL

Play RTTTL tunes in CircuitPython
MIT License
4 stars 12 forks source link

Fix timing of dotted notes #33

Closed duckythescientist closed 2 years ago

duckythescientist commented 2 years ago

Dotting a note lengthens it by 1/2. In the code, the duration parameter is actually a divisor of the length of the note (e.g. 1 is a whole note but 4 is a quarter note (1/4 the length)), so dotting should divide the duration by 1.5 instead of multiplying.