Shop OBEX P1 Docs P2 Docs Learn Events
IR Remote controlled VMUSIC2 MP3 Player — Parallax Forums

IR Remote controlled VMUSIC2 MP3 Player

Ron CzapalaRon Czapala Posts: 2,418
edited 2012-02-24 20:11 in Robotics
Hack A Day link

Parallax Project Resource Link



I took a VMUSIC2 module, a USB Propeller proto board, a Panasonic IR Detector and an old Sony camcorder remote control (RMT-811) and put them together to create a remote controlled MP3 player.

I used Tim Moore's Multiple serial port driver since it supported RTS/CTS hardware flow control which allowed me to easily capture the "status" information output from the VMUSIC2.

When a song starts playing, the 8.3 filename is displayed and then the ID3 Tag data contained within the MP3 file is displayed. This may include the track number, song title, artist, album and composer.
Then as the song plays, the track time is displayed (see below).

I use Tom Doyle's IR Remote object to drive the Panasonic IR Detector to capture the Sony IR Remote's codes allowing me to pause play, skip songs, stop, play etc.

The program currently starts playing songs randomly and I use the remote to skip but I plan on adding more fuctionality - there are many VMUSIC2 commands (and buttons on my remote) that will be useful. The VMUSIC2 commands are on page 52 of this FTDI Firmware document

I also intend to add a serial LCD display (two line or four line) to display the MP3 information and any menu type data I use for the remote operation.

[

Example of ID3 Tag info:
Playing MAISQU~1.MP3
01
Mais Que Nada
Sergio Mendes & Brasil '66
Four Sider
T $00 $00
T $01 $00
T $02 $00
600 x 800 - 77K

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-10-08 17:54
    Right On, Brother Czapala!
    Can you post a schematic?

    Send a link of this page to Hack-a-Day.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-10-08 18:47
    Here is the schematic out of the program (except I stuck 10k resistors between the VMUSIC RX,TX,CTS and RTS pins and the Propeller pins)

    I did fill out the hackaday form and linked this thread - Thanks for the suggestion

    attachment.php?attachmentid=85780
    VMusic schematic.jpg
    634 x 781 - 43K
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-10-09 16:31
    I made some more progress. I wrote some code to buffer, filter and parse the VMUSIC2 status information.

    I split out the song title and artist from the ID3 Tag and display it on a 2x16 serial display.

    NEW IR CODES:
    • fast forward or rewind 5 secs
    • adjust volume up or down
    • set playback mode - "play all MP3 files" or "play random MP3 files".
    • toggle LCD on or off
    • adjust LCD backlight brightness
    • skip forward whole directory
    • toggle debugging displays to Parallax Terminal on or off
    • scroll long song titles
    NOTE: When I first hooked up the VMUSIC2 I was a little disappointed because there was some annoying background noise.
    Not sure whether the switching power supply was the source - should have tried it with batteries I guess.
    I stuck a Radio Shack Ground Loop Isolator between the player module and the amplifier. Problem solved! Sounds clear as a bell...
  • ercoerco Posts: 20,244
    edited 2011-10-09 19:30
    Sweet music to my ears, Brother Ron! Nice project, hope you get HAD.


    Hack-A-Day, that it!
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-10-10 08:58
    erco wrote: »
    Sweet music to my ears, Brother Ron! Nice project, hope you get HAD.

    Hack-A-Day, that it!

    Thanks erco!

    I put almost 800 MP3s on a 4GB thumbdrive. I hit the random play button and enjoy my music...
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-10-10 09:35
    Sample some scenes, themes, other audio from movies and TV (Spatula City, Badges?), perhaps via youtube, and intersperse those in "shuffle" [random play].

    I'm getting inspired.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-10-10 09:48
    PJ Allen wrote: »
    Sample some scenes, themes, other audio from movies and TV (Spatula City, Badges?), perhaps via youtube, and intersperse those in "shuffle" [random play].

    I'm getting inspired.

    Speaking of YouTube, after I uploaded the first video in this thread, I noticed a notation that said "View copyright info". When I clicked it, this message appeared:
    Your video, VMusic2 MP3 Player - IR controlled , may include content that is owned or administered by these entities:
    • Entity: UMPG Publishing Content Type: Musical Composition

    I can't believe that playing little snippets of songs in my project would cause someone to attach copyright claims to my video!!!

    There are sooooo many YouTube videos where entire songs are featured along with slide show images that can be captured and provide "free" music but my little video drew this kind of attention.

    There was also a link to a dispute process
    There are very few valid reasons for disputing a claim. Please review the information below, because submitting an invalid dispute could result in penalties against your account.

    Invalid reasons to dispute a claim
    • I own the CD / DVD or bought the song online. Buying a song, CD, DVD, or other piece of media doesn't give you authorization to post that content on YouTube. The content owner still has the right to choose where it is distributed.
    • The content was only a part of my video. In almost all cases, you need written permission from the content owner to use even part of their work in your video. Learn more about Copyright.
    • There are other videos on YouTube with the same content. Why can't I use it too? Copyright is all about the owner's right to decide who can use their content. Someone else's use doesn't give you permission.
    • I gave credit in the description. Isn't that enough? No. Giving credit does not give you authorization to upload the content.
    • I'm not selling my video or trying to make money. Whether or not you benefit financially from using the content doesn't matter. Unless you have permission from the owner, it's not yours to use.
    I still need more information. Take me to the YouTube Copyright Help Center.


    Valid reasons to dispute a claim
    • The content was misidentified. Your original content was misidentified; for example, your family picnic was mistakenly identified as a scene from The Godfather. Mistakes of this type are very rare but possible.
    • You have the right to use the content online. You have written permission from the content owner to use the material on YouTube.
    • Fair Use / Fair Dealing If you believe your use meets the legal requirements for exemption from copyright under appropriate law, you can dispute the claim. If you are unsure, you should seek legal counsel before submitting a dispute.
    I have a valid reason to dispute this claim. Take me to the dispute form.

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-10-10 09:52
    There's fair use, but you may have exceeded the fair use time limit ( is it 10secs?).
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-10-11 20:15
    I discovered something interesting with the VMUSIC2.

    The VMUSIC2 extracts the Track number, song title, artist, album and composer information from the ID3 Tag block in MP3 files.

    Sometimes it was not showing up on my LCD display. After verifying that it wasn't a problem with my Propeller program, I started examining the MP3 files. Years ago I wrote my own media player proogram in VB6 and created a DLL to access the ID3 tag data.

    The ID3 specifications allow unicode data in the various frame blocks. It turns out the the VMUSIC firmware chokes when it encounters unicode - even in frames that it doesn't utilize e.g. TYER (year) or COMM (comment) frames.

    When I changed frames from unicode to ASCII for problem songs, the VMUSIC2 sends the data with no problem.

    NOTE: There are MP3s where VMUSIC2 skips information - still researching that...

    I am working on a VB6 program which will read an MP3 file and drop unneeded frames and convert any unicode strings to ASCII.

    BTW - The VMUSIC2 has no problem with the APIC (album art jpeg) frame - it skips over it.
    __________________________________________________________________________
    EDIT:
    It seems I have figured out a scenario for formatting ID3 Tag info so that the VMUSIC2 will correctly extract it and send it via it's serial output.








    I wrote a VB6 program that drops all frames except:
    • TIT2 - Title
    • TPE1 - Artist
    • TALB - Album
    • TYER - Year
    • COMM - Comments
    • TCON - Content type (Genre)
    The program also converts any unicode frame information to ASCII and pads the ID3 tag with nulls ($00) to a length of 4095 bytes so that the MP3 starts add address x'1000.

    This format seems to suit the VMUSIC2 firmware...


    For information on ID3 tags: http://www.id3.org/id3v2.3.0
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-10-13 05:22
    Here is the Propeller code thus far. NOTE:See ZIP file in this post

    I'm sure I will be tweaking it since I will probably use a different serial LCD display...

    I also attached a ZIP file with the VB6 code I used to strip frames from the ID3 tags and convert unicode frame data - not fancy, but pretty quick.
    It has a recursive routine to process all MP3 files within a folder and all subfolders.

    NOTE: Use the VB6 code at your own risk! It replaces the files within the selected folder, so you probably want to copy the folder and run the program on the copied folder. It also makes the new MP3 files read-only.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-10-14 20:12
    I bought a new NewHaven LCD display with white letters on a blue background and put everything in an enclosure.

    The IR receiver is between the display and the Vmusic module.

    I really like the blue background (see next post) - I ordered a couple more today.

    (The enclosure is more of a beige than rather than bright white too).
    1024 x 768 - 132K
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-10-20 11:23
    This picture shows the player with the Lexan LCD bezel faceplate installed.

    I also added an Auto-off feature - the LCD display turns on, displays the title and artist for 10 seconds and then turns off until the next song starts.

    I also added a LCD driver for NewHaven displays to the OBEX - http://obex.parallax.com/objects/798/

    attachment.php?attachmentid=86138



    VMusic front.jpg
    600 x 800 - 61K
  • PublisonPublison Posts: 12,366
    edited 2011-10-20 12:09
    Very nice finished enclosure Ron!

    I have used the VMusic2 in a few museum and libraries and I love it.

    I'm going to try the IR on a future product.

    Jim
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-10-23 18:36
    I tweaked my program to store and retrieve the auto-off setting at the end of the 64K EEPROM on the Propeller Proto board.

    The auto-off setting will be read from the EEPROM at power-up so it will persist from one session to the next.

    It's not something I will change often, so I am not worried about "wearing out" that address.

    I used Mike Green's Basic I2C Driver object.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-10-31 14:30
    I submitted this project to Parallax for adding to the Applications and Contests page and it was accepted - it can be directly accessed HERE.

    Parallax also issued me a credit towards Parallax products. Of course, I used it to get more Propeller Proto Boards!!

    I made a few more changes. The LCD backlight brightness and volume level are saved in the extra EEPROM space along with the auto-off setting.

    The latest code is in the attached ZIP file.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-11-19 06:41
    I have a newer version of the VMUSIC2 player.

    This version can table up to 500 folder names of top-level folders (those directly under the root).
    Using buttons on the IR remote, you can select a particular folder to play songs sequentially or random within that folder.

    The remote's "Search Mode" button invokes this feature. The first time it is selected, the table is built from the root directory.
    The "|<<" and ">>|" buttons are used to navigate the table. Clicking the Play or Index buttons starts sequential or random play within the selected folder (an it's subfolders).

    Subsequent pressing of the "Search Mode" button displays the previous table choice and lets you select a different folder.
    Pressing "Zero Set Memory" in search mode selects the root directory entry and displays the number of folder entries.

    See the remote control's jpeg for the button usage and layout...

    EDIT: see ZIP file in next post for version with directory sort
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-11-19 15:55
    Another slight improvement. The VMUSIC2 directory command does not return directory names in alphanumeric sequence.

    I used JonnyMac's bubble sort routine to sort the directory table. Bubble sorts are not the most effecient but adequate...
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-11-19 20:48
    Very cool project Ron.

    Thanks for taking time to document it so nicely.

    I noticed Parallax has this a Project of the Week.

    Congratulations!
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-11-19 20:58
    Duane Degn wrote: »
    Very cool project Ron.

    Thanks for taking time to document it so nicely.

    I noticed Parallax has this a Project of the Week.

    Congratulations!

    Thanks Duane! I keep thinking of ways to tweak it.
    Thought about adding a real time clock or maybe composite video output but who knows.
    I have it plugged into my PC soundcard with a 200 watt speaker system - Plus, no stupid radio commercials, or CDs to change.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-11-29 10:21
    I found another remote control more suited to a music player (and with more buttons).

    The ">10" key selects the top-level directory range e.g. 0-9, 10-19, 20-29, etc
    The numeric keys are used select a directory within the range - e.g. pressing "7" would pick 7,17,27 etc depending on the current range.

    PLAY MODES: The "continue" button toggles between "play once" or "play repeat" and the "shuffle" key selects "play random"

    The attached ZIP file contains the SPIN code, etc for this version...

    attachment.php?attachmentid=87288

    Sony RM-DX400.jpg
    600 x 800 - 42K
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-11-29 14:01
    This video shows the LCD display as the directory array is loaded and sorted and as the directory is navigated using the remote.

    The play mode is also changed and displayed.

    The next/prev directory and ">10" buttons let you skip around. The "clear" button returns to the root and displays the number of top-level subdirectories.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2012-02-24 20:11
    I recently bought a SanDisk 16GB USB flashdrive and was pleasantly surprised to find that the VMUSIC2 handles it.

    I have almost 2500 MP3 files on this drive in 182 directories.

    A LEXAR 16GB would not work.
Sign In or Register to comment.