I just posted FEZ Music Shield Driver on Codeshare. Feel free to discuss and make suggestions here.
Fantastic! I’ve been following this subject on GHI’s forum for a long time now. I was wondering if it would be possible to add gapless playback? So if you would playback each track of i.e. Pink Floyd’s Dark Side of the Moon it would be played seamlessly?
Time to dust mine off. My son’s treehouse needs a sound system
@ djagab - Yes, it does play tracks seamlessly. I’ve been testing with a classical music album, and it plays just like a commercial player would.
I ran a test last night to play all 8 tracks of this album in a loop 20 times. Unfortunately after the 149th time it stopped playing. I’m not sure what the issue is, but I’ll look into it today.
May be it just got sick of the same music playing over and over
@ jasdev: Thanks for your reply. Good to know that gapless playback is supported. I remember this being an issue in the past. Did you use a music shield with the VS1063 or 1053?
And another feature request:
Report the duration and position of the file currently playing.
Look at the Skewworks example at:
I believe the line “[em]_position = Command_Read(SCI_DECODE_TIME);[/em]” does the trick.
@ Architect - LOL Good one!
@ djagab - Thanks, I hadn’t seen that driver before. I’ll have a look.
@ jasdev - Ohh, you are quick! I will see if it is possible to port to 4.2 and Spider. Not sure I can do it…
@ njbuch - Take a look at the original driver from @ godfather. I believe that his SPI and GPIO ports were setup for EMX/Spider. You could use my enhanced driver, and just reconfigure the I/O ports.
It would be great for me too if this functionality was available for the spider.
Unfortunately I don’t really know how to port the sources to 4.2 and spider.
So @ njbuch if you’re making any progresses I really would appreciate if you would share it.
If it is just a reconfiguration maybe the easiest way would be if @ jasdev would just revert the configurations that made his code work at the panda and we would test it…
@ D. Helfenstein - I’ve fixed several bugs, and it is more stable than it was before, but it still occasionally stops playing after playing hundreds of tracks. It’s not a memory leak problem, I checked that. I believe it is a race condition between threads.
Once I get this problem solved, I will move the Panda specific configuration settings into a separate header file, and create an EMX version of the header file for Cobra 1 and Spider.
I am putting all my eggs into jasdevs basket. I think he will manage to get through this challenge very well. I tried with the RLP stuff and gave up, I looked at jasdevs work and it looks really promising.
Keep up the good work jasdev!
I updated the driver to version 4.0, which includes these fixes:
[ul]Modified to use hardcoded EndFillBytes for MP3 and FLAC. This is a temporary fix until I can get the recommended method working.
Fixed thread race condition issues.
Fixed Panda II SPI clock prescalar settings to conform to VS1053b recommendations.
Fixed VS1053b clock multiplier settings to conform to manufacturer’s recommendations.
Moved file open code from MusicShield driver to the application layer. The MusicShield driver only deals with streams, regardless of their source.
Fixed issue with DREQ not going low, which caused the player to hang, usually when finishing a song.[/ul]
Great to hear that!
Now I hope you can find some time to make your driver work on the Spider under 4.2
njbuch and I are depending on you, at least I do!
@ D. Helfenstein - I don’t own a Spider, but I do have a Cobra 1. I can test it using the Cobra 1 on SPI 1. I will use GPIO pins that are on the same Gadgeteer connector as SPI 1, so it should work for the Spider.
I revised the RLP driver by replacing all SPI and GPIO references with symbolic #define’s located in the VSDriver.h file.
Not sure what to do now?
@ njbuch - You should be able to download the Cobra project from here:
Replace the VSDriver.h file with the one in this post:
And hopefully it will work!
Note: You also need to do the following:
- If you want to play FLAC files, download the VS1053b Patches w/ FLAC Decoder plug-in here:
- Create an SD with this file structure:
- Copy your music albums and tracks to the SD card.
- Modify Program.cs to match your music file locations/names, and whether you want to load the FLAC plugin.
Unfortunately I have problems building the native part of your project using your makefile:
First I just tried to compile the JDI.NETMF.Modules.Music directly from vs2012 but it gave me a strange Error:
The command “cd …Native
make rebuild” exited with code 2
So, the problem is the makefile but because VS2012 wouldn’t tell what the problem was with it I used the vs developer command prompt. This one tells me:
Makefile(26) : fatal error U1033: Syntaxfehler: “:” unerwartet
There seems to be something wrong with:
$(OBJS): %.o: %.c $(CC) -c $(CCFLAGS) $< -o ./Output/$@
I simply don’t know what to do…