controll music shield from mega to play selected songs

Arduino, Seeeduino Serials and mutants. Share your problems and experence on arduino compatible board such as seeeduino/stalker, etc.

controll music shield from mega to play selected songs

by gollasantu07 » Wed Mar 07, 2012 11:32 pm

hi one and all

i have got seeedstudio music shield and arduino mega ....

i could able to play the songs , but now my task is i want to pick my own selective file like passing arguments : play("track001.mp3)

so can any 1 help me out with the code .....

am using the same code from seeedstudio misic shield wiki....

only requirement is to add the ability to pick the selective file...
Newbie
Newbie
 
Posts: 1
Joined: Wed Mar 07, 2012 11:21 pm

Re: controll music shield from mega to play selected songs

by Frank.Chu » Thu Mar 08, 2012 11:52 am

Hi,
You can download MusicShieldNewSDLib.zip and Fat16 for Arduino1.0.zip from our wiki.http://www.seeedstudio.com/wiki/Music_Shield

Now there are two examples in MusicShieldNewSDLib.One is to play songs randomly and the other play the song with the name you select in the demo code.



Regards,
Frankie
User avatar
Newbie
Newbie
 
Posts: 21
Joined: Thu Aug 11, 2011 5:27 pm

Re: controll music shield from mega to play selected songs

by bdirgo » Thu Jul 12, 2012 12:41 pm

Hey Frankie,
I'm am trying to do the same thing in my code but using that library I get the following error when I am trying to compile the MusicPlayWithName example.
Code: Select all
C:\Users\Ben\Desktop\arduino-1.0.1\libraries\MusicShieldNewSDLib\player.cpp: In function 'int playFile()':
C:\Users\Ben\Desktop\arduino-1.0.1\libraries\MusicShieldNewSDLib\player.cpp:136: error: 'listoffset' was not declared in this scope
C:\Users\Ben\Desktop\arduino-1.0.1\libraries\MusicShieldNewSDLib\player.cpp:137: error: 'indexlist' was not declared in this scope


Could you tell me what I did wrong? I downloaded the fat16lib that you link to (fat16lib20111205). I have Arduino IDE 1.0.1

Thanks,
bdirgo
Newbie
Newbie
 
Posts: 2
Joined: Thu Jul 12, 2012 12:01 pm

Re: controll music shield from mega to play selected songs

by dev5 » Sun Jan 27, 2013 12:04 pm

bdirgo, did you ever get it working? I've managed to get mine playing all songs in order using the music_v1_14 library, but it can only play songs in order -- if I try calling PlayCurrentFile(), it can play the file but it doesn't return at the end of the song, just continues playing the next file and the next until it gets to the end of the SD card.

When I switch to the Demo 2 libraries, I can compile MusicPlayRandomly but it can't read the SD card -- it prints
error: Fat16::init
over serial -- and then loops forever with
error: open file failed

Same SD card that works with music_v1_14.
Newbie
Newbie
 
Posts: 2
Joined: Sun Jan 27, 2013 11:03 am

Re: controll music shield from mega to play selected songs

by Jacket Chen » Mon Jan 28, 2013 11:40 am

hey,you can download this attachment and have a try
Attachments
MusicPlayer_v1_7.zip
(30.34 KiB) Downloaded 167 times
No matter you are here or not, i am still here.
User avatar
First Lieutenant
First Lieutenant
 
Posts: 552
Joined: Thu Jun 21, 2012 4:25 pm
Location: China

Re: controll music shield from mega to play selected songs

by Jacket Chen » Mon Jan 28, 2013 11:41 am

Attention:Please delete your Music1.4 libraries firstly.
No matter you are here or not, i am still here.
User avatar
First Lieutenant
First Lieutenant
 
Posts: 552
Joined: Thu Jun 21, 2012 4:25 pm
Location: China

Re: controll music shield from mega to play selected songs

by dev5 » Sat Feb 02, 2013 1:55 am

Nope, MusicPlayer_v1_7 doesn't work for me -- I tried the playWithName example but it doesn't play anything. I hacked it to add some Serial.printlns, and it's successfully adding my filename to the playlist (and the filename is on the microSD card), but it fails when trying to open the file. BTW, that demo doesn't compile unless I change
#include "newSDLib.h"
tp
#include "newSDlib.h"
(note incorrect capitalization of Lib, which doesn't match the filename). I'm on Linux so filenames are case-sensitive.

Music_v1_14 is the only version of the libraries that I've gotten to work at all. I've managed to hack a version of the library that can play multiple songs, play them out of order, etc. I'd like to distribute it, since it seems like a lot of people have trouble using this music shield. But the readme.txt says:
Copyright (c) 2010 Seedstudio. All right reserved.
so I can't legally share this code with anyone else.

Would Seeed be willing to open their code so that people can actually get it working? Maybe give it a GPL license, or some other open license, or even make it public domain. It would make it a lot easier to use your hardware if it was possible to share working libraries and examples.
Newbie
Newbie
 
Posts: 2
Joined: Sun Jan 27, 2013 11:03 am


Who is online
Users browsing this forum: No registered users and 4 guests