adafruit / Adafruit_CircuitPython_CircuitPlayground

CircuitPython library for Circuit Playground Express
MIT License
91 stars 71 forks source link

Tilting arpeggios example fails on higher frequency notes on CPB #78

Closed kattni closed 4 years ago

kattni commented 4 years ago

The example runs initially until it is tilted in a manner that results in a higher frequency tone.

Traceback (most recent call last):
  File "code.py", line 132, in <module>
  File "code.py", line 96, in run
  File "code.py", line 129, in change_tone_if_needed
  File "adafruit_circuitplayground/circuit_playground_base.py", line 922, in start_tone
ValueError: Sample rate too high. It must be less than 62500
jepler commented 4 years ago

I'm assuming the demo is https://github.com/dcbriccetti/Adafruit_CircuitPython_CircuitPlayground/blob/tilt-instrument/examples/advanced_examples/circuitplayground_tilting_arpeggios.py linked from https://blog.adafruit.com/2019/09/30/tilting-arpeggios-for-circuitpython-and-circuit-playground-express-circuitplaygroundexpress-circuitpython-electronicmusic-circuitpython/

kattni commented 4 years ago

@jepler Yes but the demo is also available in this repo under advanced examples.

jepler commented 4 years ago

@kattni thanks, I found it after wrestling with git for a little bit :)