Skip to content

Conversation

@duckythescientist
Copy link
Contributor

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.

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.
@tekktrik tekktrik requested a review from a team September 6, 2022 15:09
Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @duckythescientist.

The change looks good to me. I wasn't familiar with the spec, but confirmed the dotting syntax here: https://en.wikipedia.org/wiki/Ring_Tone_Text_Transfer_Language

Tested the fix successfully with:

adafruit_rtttl.play(board.SPEAKER,
                    "TestSong: d=4,o=5,b=148: 1c, 1e, 1f., 1c")

@FoamyGuy FoamyGuy merged commit 665778c into adafruit:main Sep 12, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Sep 13, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_HCSR04 to 0.4.14 from 0.4.13:
  > Merge pull request adafruit/Adafruit_CircuitPython_HCSR04#29 from tcfranks/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_ST7565 to 1.1.6 from 1.1.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_ST7565#5 from tcfranks/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_ST7735 to 1.2.8 from 1.2.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_ST7735#17 from tcfranks/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_ST7789 to 1.5.14 from 1.5.13:
  > Merge pull request adafruit/Adafruit_CircuitPython_ST7789#33 from tcfranks/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.22.11 from 2.22.10:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#174 from snkYmkrct/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_JWT to 1.2.13 from 1.2.12:
  > Merge pull request adafruit/Adafruit_CircuitPython_JWT#16 from tekktrik/dev/issue-12

Updating https://github.com/adafruit/Adafruit_CircuitPython_RTTTL to 2.4.19 from 2.4.18:
  > Merge pull request adafruit/Adafruit_CircuitPython_RTTTL#33 from duckythescientist/main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants