Music shield issues

Hi Rich,

Thanks for your updating.

I’v tested that on my 1G and 2G microSD card ok.

Yes, you are right. The music file is played sequentially.

I think to skip to the next directory not the next file is not very complicated. You need to understand the structure of function OpenFile(), and may do some changes on it.

Anther way implement the function you need is to built an music file table in initialization before playing any music.
For example:

[code]typedef struct ALBUM_TABLE_
//char albumName[ALBUM_NAME_LEN];//to save ram,reduce album name item as we do not display it
u8 totalTrackCnt;
addressType trackAddr[TRACK_MAX_NUMBER];//track file start block



Then you can establish an album table by changing OpenFile(). After all album and corresponding tracks is got, you can play any track in any album as you need. And you don’t need to look through the fat table every time playing music file as the start address of which has been recorded in the album table in initialization.

However it is just an general idea, and you must consider the ram space it needs, as it increases as the ALBUM_MAX_NUMBER increases.
The following main work of me may be the software optimization.

PS1: The arduino code for music shield is transplanted from “8051 Modular Player Code for VS1053”

PS2: To use the recording function, you need to press the play/stop button when power on, and release it as the green led light and stable. If you open an serial console on pc, it will give some instructive message.

May this helpful to you!



Okay thanks for the feedback, I will give it a shot. I am still seeing Fat-16 problems with long playing, 4-6hours of files on a 2G san disk card. The play got lost in the middle of a song, random loops and noise coming out. I hope it is not corrupted again as I have not recorded. I definitely need a randomize startup, as I am getting tired of a fixed start point. Good suggestions. Do you think there is any hope of FAT-32 working, I see code for it, I guess I just need to try. I have an 8 G card around somewhere, time to load it up.

On a mega I should be able to build a list of unique albums, and go from that. Names are not yet important, until I hitch up a display. For record, more feedback is needed for that feature to be usable. Without the serial line it is hopeless. I want to think of how to make it optional, without too much bloat, but it would be really useful. If memory becomes too big an issue, I have a flash chip or too I could use to store album data on, and then cache it. Or if file writing can be fixed to not corrupt, I would write an index file/playlist capability to the flash disk. Not sure if I should write that on the arduino, or optionally build it with a java client on the host. Check date, and if upto date use it. Can 2 files be open at once?

Is the board color changing? in the current web site it is still out of stock but the board is black?