Work in Progress...Basic Stamp2 MP3 Player and ID3 Tag Reader
· I'm working on a project using the VMusic2 MP3 player.· The user interface is an IR remote using the Sony TV protocol.· I've been trying to extract data from the ID3 tags which are embedded in most MP3 files.· I had trouble consistently reading the song title data using the SERIN function.· I decided to·prepend··each song title with the "@" symbol (ASCII code 64).· I did this by editing the song title using my PC.· Now I can locate the song titles by using the WAIT(64) formatter in my SERIN statements.· The MP3 file names also had to be changed to conform to the 8+3 rule;this means a maximum of eight characters followed by the .MP3 extension.· I store song groups in seperate folders so I can navigate by album as well as by track.· The LCD will display up to fourteen characters followed by two periods.· This indicates that a song title has been truncated because it exceeds fourteen characters.· If the title is displayed complete no periods are displayed
after the title.· My goal is to display more ID3 tag information including elapsed time and album or
artist information.· Any tips or feedback will be appreciated.· Thank you.
Post Edited (Mikerocontroller) : 1/20/2009 4:59:47 AM GMT
after the title.· My goal is to display more ID3 tag information including elapsed time and album or
artist information.· Any tips or feedback will be appreciated.· Thank you.
Post Edited (Mikerocontroller) : 1/20/2009 4:59:47 AM GMT
bs2
![](/plugins/FileUpload/images/file.png)
10K
Comments
In any event I haven’t worked with the new module so I am not familiar with how it sends the tag data. The firmware specification indicates the 5 lines are sent immediately following the ‘playing’ message, however it is unclear if they’re sent back-to-back or not. This would determine whether the BASIC Stamp has enough time to get them all. By the way, if you used the 4x20 LCD you could fetch more characters from the module because you still have 6 bytes of variable RAM left. This would give you 20 characters instead of 14.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
(minutes) : (seconds) in decimal.· Thank you.
04:15 at which point it resets itself back to 00:00. I like to blame myself before I blame the equipment. Do you
see something that I'm overlooking? If there is a more efficient way to go from point A to point B please let me know....
·· time VAR Word
SERIN VMusic2,Baud,[noparse][[/noparse]WAIT("T $"),HEX4 time]···· ' extract 4-byte hexadecimal string from VMusic2
time=(time/60)*100+(time//60)······················· ' convert to "clock format" (minutes:seconds)
SEROUT LCD,Baud,[noparse][[/noparse]148,DEC1 time DIG 3,DEC1 time DIG 2,58,DEC1 time DIG 1,DEC1 time DIG 0]
···································································'display to LCD like this:· 02:59
Post Edited (Mikerocontroller) : 1/22/2009 4:45:15 AM GMT
The datasheet shows:
54 20 01 00 0D
54 20 02 00 0D
54 20 03 00 0D
54 20 04 00 0D
Is this data sent every second? Is it always in this format? If so you can simplify your LCD SEROUT routines a bit.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
firmware PDF file but I haven't had time to read it yet. I'm at work so I have to go now! Thanks, Chris.
P.S. yes the data is updated every second. This is the IPA time format: T $01 00 CR (10 bytes)
The time is a 16-bit value (expressed in seconds) according to the firmware documentation.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
···· "T"· "space"· "$"·· "0"·· "0"·· "space"·· "$"· "0"·· "0"··· "space"··· "CR"
· This entire string is updated every second.·· As you can see the data is sent in "literal" ASC format.· Back to work I must go!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
My project was supposed to be a 3rd birthday present for my daughter, who turned 3 last month
A handheld MP3 player with some special buttons. Apart from regular control buttons, I was going to put a few buttons for specific songs so she could play 'spoonful of sugar' without having to look for it by hitting the next button a hundred times.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
~~ dRu ~~
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
········
····
I would like to see the code that has the track run time, maybe I can get it working better for you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tim J Lewis
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering