I purchased a Music Maker Shield in August and have had no problem using it for music. A few days ago I put a sound effects wav file of World War I gunfire and explosions on the Music Maker Shield and was surprised that it only plays as static. I recorded the track at a lower volume and changed the format from wav. I get nothing but static. The same track plays fine in Windows and on the Audio Fx Sound Board. I have used the wav shield in the past for sound effects such as a cannon and it has worked fine. I was hoping the Music Maker Shield would offer two things -- stereo and would save time since it comes assembled. I use the Adafruit products at a local museum and they need lots of sound effects.
To be fair, it does play music so I guess I can't complain. I noticed there was a board revision in October. Is it possible the revised board would play the sound effects track? I can provide a short sample file if you want to test it.
Music Maker Mp3 Shield
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Music Maker Mp3 Shield
Please do post a sample file.
The hardware doesn't know one sound from another, so it should be able to play explosions just as easily as it plays drum tracks.
Check to make sure the file's volume is low enough that it doesn't overdrive the output system. If you need loundness, that's best done in a power amplifier.
The hardware doesn't know one sound from another, so it should be able to play explosions just as easily as it plays drum tracks.
Check to make sure the file's volume is low enough that it doesn't overdrive the output system. If you need loundness, that's best done in a power amplifier.
- craigd
- Posts: 42
- Joined: Fri Jun 11, 2010 6:11 pm
Re: Music Maker Mp3 Shield
Mike,
Thank you for your reply. I found the Arduino Shield section of your support site and noticed some discussion of the SD card re the Music Maker Mp3 Shield. My SD card was a relatively new Sandisk 4GB disk. However, I decided to save all the files on the SD card and reformat it. That solved the problem. So this seems something to look out for. If the Shield has trouble playing a file, consider reformatting the SD card.
I have another question. How do you play back flac files on the Music maker Mp3 Shield when the file format can only have a type of three characters. I think I tried fla, flc as file types but no luck.
Thanks again. Your products and support are excellent.
Thank you for your reply. I found the Arduino Shield section of your support site and noticed some discussion of the SD card re the Music Maker Mp3 Shield. My SD card was a relatively new Sandisk 4GB disk. However, I decided to save all the files on the SD card and reformat it. That solved the problem. So this seems something to look out for. If the Shield has trouble playing a file, consider reformatting the SD card.
I have another question. How do you play back flac files on the Music maker Mp3 Shield when the file format can only have a type of three characters. I think I tried fla, flc as file types but no luck.
Thanks again. Your products and support are excellent.
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Music Maker Mp3 Shield
Hmm.. I don't know what reformatting the card would change, but you learn not to argue with what works.
WRT playing FLAC files, the VS1053 doesn't care what file extension you use. It looks for a file header (which should be the first block of data in the file) that tells it what's coming.
What file options are you using.. bit depth, sampling rate, etc?
WRT playing FLAC files, the VS1053 doesn't care what file extension you use. It looks for a file header (which should be the first block of data in the file) that tells it what's coming.
What file options are you using.. bit depth, sampling rate, etc?
- mikeva
- Posts: 4
- Joined: Wed Jul 15, 2015 2:10 pm
Re: Music Maker Mp3 Shield
I just picked up a Music Maker too and not having any luck with FLAC. I've tried both the simple & interrupt sample code. It can do MP3 @ 320Kbps CBR without problems. I tried FLAC @ 44KHz/16bit/level 5 and it acts like it's playing, but I don't hear anything. I also tried 11KHz/8bit/level 5 just in case it was some kind of performance issue, but same behavior. Not sure what the problem might be.
- adafruit2
- Posts: 22196
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Music Maker Mp3 Shield
wow that's a good question! we've never actually played FLAC with it, not having any FLAC files :) however, it seems like you have to 'load in a patch'
http://www.vlsi.fi/en/products/vs1053.html
This person also agrees with that
https://bois083.BANNED.com/2014/11/1 ... oder-chip/
Here's the actual patches
http://www.vlsi.fi/en/support/software/ ... tches.html
only thing is, we dont have code for uploading the patches But that second link does have some example code
http://www.vlsi.fi/en/products/vs1053.html
This person also agrees with that
https://bois083.BANNED.com/2014/11/1 ... oder-chip/
Here's the actual patches
http://www.vlsi.fi/en/support/software/ ... tches.html
only thing is, we dont have code for uploading the patches But that second link does have some example code
- craigd
- Posts: 42
- Joined: Fri Jun 11, 2010 6:11 pm
Re: Music Maker Mp3 Shield
I made the original post in this thread about the Music Maker Mp3 Shield. I haven't had a chance to respond further until now. I had problems with a sound effects track that was about 10 minutes long and wav format. I had reformatted the SD card. I eventually discovered that the Music Maker MP3 shield would only play the track reliably in a compressed format . I switched to OGG. I also bought a newer shield but it basically works the same. A ten minute long wav track would play only as static.
I am disappointed with the Music Maker Mp3 shield. I have used the Wav shield many times and it is a solid product. I just wish it was stereo. I use the Music Maker shields in a museum triggered by motion sensors and play three random tracks of 24 in one case and just play the same sound effects track in another case. Both shields eventually freeze (in less than a day of running) and have to be powered down and then repowered. In my tests, the shields would eventually not be "discovered." I have concluded like another poster that there is a memory leak in the library - the VS1053 library. I only use the Playfullfile function. Playing a file in the background freezes up even more often. The library uses a great deal of the available programming memory. Perhaps the memory leak could be fixed or the library simplified to at least play a full file without freezing an Arduino Uno. If a fix, can't be found I will have to replace the Music maker Mp3 shields with Wav shields. This Mp3 Music Maker shield is promising but still needs some work to be reliable.
I am disappointed with the Music Maker Mp3 shield. I have used the Wav shield many times and it is a solid product. I just wish it was stereo. I use the Music Maker shields in a museum triggered by motion sensors and play three random tracks of 24 in one case and just play the same sound effects track in another case. Both shields eventually freeze (in less than a day of running) and have to be powered down and then repowered. In my tests, the shields would eventually not be "discovered." I have concluded like another poster that there is a memory leak in the library - the VS1053 library. I only use the Playfullfile function. Playing a file in the background freezes up even more often. The library uses a great deal of the available programming memory. Perhaps the memory leak could be fixed or the library simplified to at least play a full file without freezing an Arduino Uno. If a fix, can't be found I will have to replace the Music maker Mp3 shields with Wav shields. This Mp3 Music Maker shield is promising but still needs some work to be reliable.
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Music Maker Mp3 Shield
Did you collect any information on the memory leak?
A trace of free memory that also tracks calls to library routines would help zero in on the problem.
A trace of free memory that also tracks calls to library routines would help zero in on the problem.
- craigd
- Posts: 42
- Joined: Fri Jun 11, 2010 6:11 pm
Re: Music Maker Mp3 Shield
I am sorry that I did not trace the memory link. Both Music Maker Mp3 Shields are now in "production" at an exhibit at the museum. I can't remove them now for testing.
- mikeva
- Posts: 4
- Joined: Wed Jul 15, 2015 2:10 pm
Re: Music Maker Mp3 Shield
I found the bois083 article too. It seems to be the only article on the internet that discusses using the VS1053 to play FLAC. I'll try modifying his code for the Arduino to load the patch and see what happens. Although he says a 12MHz processor wasn't fast enough? I'm not sure this 16MHz Uno is going to do better.
- mikeva
- Posts: 4
- Joined: Wed Jul 15, 2015 2:10 pm
Re: Music Maker Mp3 Shield
Good news is the FLAC patch works. Bad news is that it's pretty choppy. Looking at this thread, I might be worth moving playData into the feedBuffer code so that we can do the SPI begin/end tran a little more efficiently?
http://www.vsdsp-forum.com/phpbb/viewto ... =11&t=1502
http://www.vsdsp-forum.com/phpbb/viewto ... =11&t=1502
- mikeva
- Posts: 4
- Joined: Wed Jul 15, 2015 2:10 pm
Re: Music Maker Mp3 Shield
The SD card also uses SPI -- so I guess it's not possible to read from the file & write to the VS1053 in the same transaction. I've noticed that when the FLAC's are choppy, the player is stuck in the feedBuffer loop.
I found two tracks that show roughly where the tipping point is... they're both CD quality. One FLAC is effectively 75KBps and it plays smoothly. Another FLAC is effectively 104KBps and it's choppy. I've read that the Arduino should be able to sustain 250KBps from an SD card...
I found two tracks that show roughly where the tipping point is... they're both CD quality. One FLAC is effectively 75KBps and it plays smoothly. Another FLAC is effectively 104KBps and it's choppy. I've read that the Arduino should be able to sustain 250KBps from an SD card...
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Music Maker Mp3 Shield
That varies significantly with the specific card you use. You'll also have processing latency that will add delays.
- craigd
- Posts: 42
- Joined: Fri Jun 11, 2010 6:11 pm
Re: Music Maker Mp3 Shield
I posted the original problem in this thread that the Music maker Mp3 shields eventually freeze (in less than a day of running.) I bought another shield and did further testing at last. I found that it was not a memory problem. I tracked remaining memory in the serial port and it did not change. However the shield stopped working after about 18 hours. I play three random tracks out of twenty three each time a motion sensor is triggered. When not triggered the sketch loops waiting for the motion sensor. I found that adding the following code after playing each full track fixes the problem. In effect I am starting the mp3 shield after each full track is played. The shield worked for over 48 hours and I think it would continue to work without freezing. I am also tracking the number of plays and millis since Arduino uno was started.
After :
musicPlayer.playFullFile(filename[ran]);
New code in loop():
playcount= playcount +1;
Serial.println(playcount);
Serial.println(millis());
if (! musicPlayer.begin())
{ // initialise the music player
Serial.println(F("no VS1053" )); // do you have the right pins defined?
while (1);
} // (! musicPlayer.begin())
After :
musicPlayer.playFullFile(filename[ran]);
New code in loop():
playcount= playcount +1;
Serial.println(playcount);
Serial.println(millis());
if (! musicPlayer.begin())
{ // initialise the music player
Serial.println(F("no VS1053" )); // do you have the right pins defined?
while (1);
} // (! musicPlayer.begin())
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Music Maker Mp3 Shield
Thank you for posting the follow-up. That's useful information.
Please be positive and constructive with your questions and comments.