adafruit / adafruit/Adafruit_CircuitPython_VS1053
RFC Any interest in collaborating?
- Dominant language
- Python
- Stars
- 5
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
I see this code is declared as not working for playback of music files.
I am developing an asynchronous VS1053 driver under MicroPython, based on your code. So far I have tested with MP3 files at 128kbps. It produces glitch-free music. By my calculations there should be plenty of headroom for higher bit rates.
I provide methods to read and write to the I/O pins and cancellation of a playing stream. These have tested OK.
I have the SD card working, but at present playback from the SD card fails: there is a concurrency issue which I haven't yet identified.
My solution differs from yours to support asynchronous behaviour and differences in coding style but I believe there is scope for sharing observations and ideas.
To kick things off I think there is a bug [here](https://github.com/adafruit/Adafruit_CircuitPython_VS1053/blob/0676a052d65a169ca15f42006c1f5f129634b0be/adafruit_vs1053.py#L157) with the indices. It should read
```python
return (self._SCI_SPI_BUFFER[2] << 8) | self._SCI_SPI_BUFFER[3]
```
A significant omission addressed by my driver is the sequence at the end of playback of a track. I would be interested in discussing the strategy for altering the SPI baudrate - my reading of the datasheet suggests a different approach (which works on my hardware instance).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with adafruit_vs1053.py at line 157 and verify the reported buffer-index issue against the VS1053 behavior. Then review the discussion about end-of-track playback, SD-card concurrency, and SPI baud-rate changes; the issue needs an agreed scope and validation approach before completion can be defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- audio-video-rtc, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100