Seeedstudio Forum

Electronics can be art.
It is currently Tue Oct 21, 2014 7:56 pm




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: controll music shield from mega to play selected songs
PostPosted: Wed Mar 07, 2012 11:32 pm 
Offline
Newbie
Newbie

Joined: Wed Mar 07, 2012 11:21 pm
Posts: 1
Honor: 0.00
Points: 1.00 Points
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...


Top
 Profile  
 
 Post subject: Re: controll music shield from mega to play selected songs
PostPosted: Thu Mar 08, 2012 11:52 am 
Offline
Newbie
Newbie
User avatar

Joined: Thu Aug 11, 2011 5:27 pm
Posts: 21
Honor: 0.00
Points: 21.00 Points
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


Top
 Profile  
 
 Post subject: Re: controll music shield from mega to play selected songs
PostPosted: Thu Jul 12, 2012 12:41 pm 
Offline
Newbie
Newbie

Joined: Thu Jul 12, 2012 12:01 pm
Posts: 2
Honor: 0.00
Points: 2.00 Points
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:
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


Top
 Profile  
 
 Post subject: Re: controll music shield from mega to play selected songs
PostPosted: Sun Jan 27, 2013 12:04 pm 
Offline
Newbie
Newbie

Joined: Sun Jan 27, 2013 11:03 am
Posts: 2
Honor: 0.00
Points: 2.00 Points
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.


Top
 Profile  
 
 Post subject: Re: controll music shield from mega to play selected songs
PostPosted: Mon Jan 28, 2013 11:40 am 
Offline
First Lieutenant
First Lieutenant
User avatar

Joined: Thu Jun 21, 2012 4:25 pm
Posts: 552
Location: China
Honor: 0.00
Points: 557.00 Points
hey,you can download this attachment and have a try


Attachments:
MusicPlayer_v1_7.zip [30.34 KiB]
Downloaded 164 times

_________________
No matter you are here or not, i am still here.
Top
 Profile  
 
 Post subject: Re: controll music shield from mega to play selected songs
PostPosted: Mon Jan 28, 2013 11:41 am 
Offline
First Lieutenant
First Lieutenant
User avatar

Joined: Thu Jun 21, 2012 4:25 pm
Posts: 552
Location: China
Honor: 0.00
Points: 557.00 Points
Attention:Please delete your Music1.4 libraries firstly.

_________________
No matter you are here or not, i am still here.


Top
 Profile  
 
 Post subject: Re: controll music shield from mega to play selected songs
PostPosted: Sat Feb 02, 2013 1:55 am 
Offline
Newbie
Newbie

Joined: Sun Jan 27, 2013 11:03 am
Posts: 2
Honor: 0.00
Points: 2.00 Points
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group  
Design By Poker Bandits