Go Down

Topic: MP3/WAV Board With Ability To Start at a Given Timestamp?  (Read 177 times) previous topic - next topic

clm3s

I am looking for an MP3/WAV/Audio breakout board with the ability to start an audio file at a given time stamp. It should have a SD/microSD card slot for the audio files and the ability to be controlled by an Arduino. (Via serial/UART, etc.) I am flexible on the audio format if needed.

There are many audio breakout board out there but I can't find any that allow a command like this.

Anyone on this forum know of an audio breakout board that has this functionality?

Grumpy_Mike

Quote
to start an audio file at a given time stamp
Can you explain what you mean by that?
Do you mean a time stamp arrives from something external and that triggers the playing?

Or do you mean the sound starts playing from a point part the way through the file given by a time stamp?

clm3s

I mean the sound starts playing at some point part the way through the audio file, specified by a  given time stamp of some kind. As opposed to always starting at the beginning at 0:00 all the time.

Ideally, there should be a command to retrieve the current time stamp also. The time stamp doesn't necessarily need to be in the "0:00" format, just in a format that makes sense. (Frame, percentage, timestamp, etc.)

I want to create something that will allow me to play longer audio files, but not lose my place if I switch off the device or change files. The audio board doesn't have to remember all that as I plan to use a SD card shield through an Arduino to do that, but I don't want to restart a long audio file I might previously already been be an hour into. Sort of a "bookmark" for an audio player.

Grumpy_Mike

Quote
I mean the sound starts playing at some point part the way through the audio file, specified by a  given time stamp of some kind.
Files as such do not have a time stamp facility of any sort in them, so straight off the bat, no you can't do that.

Quote
Ideally, there should be a command to retrieve the current time stamp also. The time stamp doesn't necessarily need to be in the "0:00" format, just in a format that makes sense. (Frame, percentage, timestamp, etc.)
An MP3 file is compressed so it is not just a matter of counting the bytes from the SD card even if you could. The data is read out in chunks and these are not always the same size nor do they stand for the same time duration. It depends on how the MP3 files are encoded. There is no standard for encoding a MP3 file, just a number of encoding strategies that an encoder can use.

As far as I know there is no way to do what you want on an Arduino.

DrDooom

I work on something similar. But you probably will not find such a simple solution.

I use an esp32 and a VS1053 board. With the right library, you can simply read a sd card (from a separate sd card reader or from the built-in arduino mkrzero) and pass the raw data via SPI to the VS1053 board.
On the SD card you then save every few seconds the position in the audio file and done.

in the next playback, you just have to jump to the position and pass the data back to the VS1053 (at least works with MP3).

clm3s

Thank you for the recommendations! This is starting to sound possible!

So maybe something like this + an Arduino?

https://www.adafruit.com/product/1381

Go Up