TRACK TITLE FOR MUSIC MAKER MP3 SHIELD?

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Zlshep
 
Posts: 16
Joined: Wed Aug 04, 2021 12:02 pm

TRACK TITLE FOR MUSIC MAKER MP3 SHIELD?

Post by Zlshep »

Hi all, I have looked extensively at the documentation available for the Music Maker MP3 Shield for Arduino. I am looking for a way to get the track title from the metadata, as opposed to the name of the file itself. something like:

Code: Select all

char trackname[16];
trackname = musicPlayer.trackTitle(filename);
lcd.print(trackname);
Does anyone have any advice on how to get the track title for an MP3 file with this board? Any advice at all would be appreciated - I cannot seem to find anything online.

User avatar
Zlshep
 
Posts: 16
Joined: Wed Aug 04, 2021 12:02 pm

Re: TRACK TITLE FOR MUSIC MAKER MP3 SHIELD?

Post by Zlshep »

Please if anyone has any advice I would really appreciate it! I THINK it can be done by manually reading the SD card but I just don't even know where to start with that. If anyone has any advice that would be so helpful.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: TRACK TITLE FOR MUSIC MAKER MP3 SHIELD?

Post by mikeysklar »

Looking through the Adafruit_VS1053 library does not show any support for read the ID3 tag information to the point of extracting a trackname.

I came across an Arduino Forum thread of users manually read the ID3 after the ~128 bytes for ID3v1. Seems easy enough to fool around with:

https://forum.arduino.cc/t/accessing-id ... ile/191852
https://forum.arduino.cc/t/how-to-get-t ... a/927476/7

Code: Select all

File myFile;

void setup() {
myFile = SD.open(filechar, FILE_READ);
    unsigned long tagdata = myFile.size();
    myFile.seek(tagdata - 125);
    String tracktitle = "";
    int j = 0;
    for(j = 0; j < 16; j++){
      tracktitle += (char)myFile.read();

    }
    myFile.close();
    lcd.begin(16, 2);
    lcd.print(tracktitle);
}

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

Return to “Arduino”