macropad.start_tone function goes wonky above around 1850...

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
RufusVS2020
 
Posts: 62
Joined: Thu Nov 19, 2020 6:31 pm

macropad.start_tone function goes wonky above around 1850...

Post by RufusVS2020 »

I created this simple ascending frequency program to diagnose some strangeness I was
seeing in start_tone and verified that the tone jumps randomly at 1850 and up.

Code: Select all


# strange how the sound jumps around at around 1800 and on up
# Tested with CircuitPython 7, not with 6
from time import sleep
from adafruit_macropad import MacroPad
macropad = MacroPad()
for freq in range(200,10000, 50):
    print(f"freq: {freq}")
    macropad.start_tone(freq)
    sleep(.45)
    macropad.stop_tone()
    sleep(.05)
    
Edit: I verified play_tone has the same result, with this loop:

Code: Select all

for freq in range(200,10000, 50):
    print(f"freq: {freq}")
    macropad.play_tone(freq, .45)
    sleep(.5)
I'll dig deeper but maybe smarter folks than I can take a look at this one...

User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

Re: macropad.start_tone function goes wonky above around 185

Post by danhalbert »

Thanks for the report. I've opened an issue to investigate this in more detail: https://github.com/adafruit/circuitpython/issues/5092

User avatar
RufusVS2020
 
Posts: 62
Joined: Thu Nov 19, 2020 6:31 pm

Re: macropad.start_tone function goes wonky above around 185

Post by RufusVS2020 »

I have since added a comment to that ticket:
Even frequencies 666 and 670 drop out, though adjacent frequencies seem fine.

Locked
Please be positive and constructive with your questions and comments.

Return to “AdaBox! Show us what you made!”