Hi, I created a CircuitPython module for interfacing with the VS1053 chip (probably also works on VS1063). It allows you to play audio files through the SPI interface:
https://github.com/urish/vs1053-circuitpython
Is there any index of all community published CircuitPython modules or best practices for publishing such modules?
诪讚讛讬诐 !!
you know we actually have a vs1053 driver that we never finished
would you like to see if your code and our code can work together?? :)
转讜讚讛 :-)
I'd love to!
great! here's the repo, i just made it public, we started it a while ago but we didn't have a fast enough chip to really get it working - so it has languished.
please try it! if you could send any pull requests there, i could test and review it!
https://github.com/adafruit/Adafruit_CircuitPython_VS1053
Lovely, I booked some slot this weekend for testing it. Any specific song you would like me to test with? :-)
you can try any mp3 you like, just let us know what the bitrate is, because i think that will make some difference in playback. if its a public domain or creative-commons mp3 we can link to it from the guide as well.
Will do!
Update: I got the code from your repo to a working state - it plays the audio file through the VS1053, though, the playback is still choppy. I suspect that the SPIDevice wrapper is the culprint. I will do more testing this week and try to achieve similar performance to what I had with my driver.
Meanwhile, my WIP is available here:
https://github.com/urish/Adafruit_CircuitPython_VS1053
Uri
you may want to try: pushing more than 32 bytes of data to the VS1053 at a time, and/or only allowing a busy-loop of writes - like the function to play an mp3 just plays that mp3 in a loop rather than trying to go back to the user's script
When Tony ran into this issue I imagined we could add a C helper to CircuitPython that can auto-feed the SPI device on the user's behalf. I'm not sure that's what you need though. Keep in mind that adding a C helper is always an option.
I'm going to close this because we now have native MP3 playback.