Shop OBEX P1 Docs P2 Docs Learn Events
MP3 playback issues — Parallax Forums

MP3 playback issues

WolfbrotherWolfbrother Posts: 129
edited 2009-10-23 17:22 in BASIC Stamp
Hi all,

I pretty much followed Scary-Terry's website word for word using the Vmusic kit from Vinculum. http://www.scary-terry.com/vm2/vm2_bs2.htm

The first time through my file played, kind of. It took really a long time to start playing and then didn't really seem to do what Terry's demo said it would. I reset the board and after that, no more music.

I was using a usb BOE and thought maybe there was some bizarre interaction between the two USB devices. I then changed Terry's code to use P3 and P4 instead of P1 and P0. No help there either. So, I tried a Serial BOE. Again I got nothing. I added debug statements to see where I was in the code and it seems to go through everything, until it waits for test2 to stop playing. It never does, which leads me to wonder, did it ever start?

I know a few of you have used this module so I am hoping someone will have seen this behavior.

Also on power up the Vmusic LED alternates green and red and then stays green. I'm thinking it thinks it's working.

Any ideas?
' {$STAMP BS2}
' {$PBASIC 2.5}

 
' -----[noparse][[/noparse] Program Description ]---------------------------------------------
' Sends serial commands to the VMusic2 via the RXD input.  The following are the individual commands:
' VPF file CR   Plays single file where "file" is MP3 name, MAXIMUM 8 CHARACTERS PLUS EXTENSION (8.3)
' VST CR        Stops play
' V3A CR        Plays all MP3 files
' VRA CR        Repeatedly plays all MP3 files
' VRR CR        Repeatedly plays random MP3 files
' VSF CR        Skip forward one track
' VSB CR        Skip back one track
' VP CR         Pause
' VSV byte CR   Sets playback volume, "byte" ranges from 0 loud to 256 off
  TX PIN 3                      ' Transmit Data
  RX PIN 4                      ' Receive Data

'Also receives serial data from VMusic2 via the TXD output.  I've found about the only useful thing it
'sends is ">" followed by the word "Stopped" at the end of a playback file.
' -----[noparse][[/noparse] Revision History ]------------------------------------------------
' -----[noparse][[/noparse] I/O Definitions ]-------------------------------------------------
' -----[noparse][[/noparse] Constants ]-------------------------------------------------------
' -----[noparse][[/noparse] Variables ]-------------------------------------------------------
' -----[noparse][[/noparse] EEPROM Data ]-----------------------------------------------------
' -----[noparse][[/noparse] Initialization ]--------------------------------------------------
 

PAUSE 5000                                'allow VMusic2 to initialize
SEROUT TX,84, [noparse][[/noparse]"VST",CR]                   'stop anything that's playing
 
 

' -----[noparse][[/noparse] Program Code ]----------------------------------------------------
Main:
DEBUG CLS
DEBUG " starting test.mp3", CR
SEROUT TX,84,[noparse][[/noparse]"VPF test.mp3",CR]           'Play a file named "test.mp3"
PAUSE 5000
DEBUG " pausing test.mp3", CR
SEROUT TX,84,[noparse][[/noparse]"VP",CR]                     'Pause playback of "test.mp3"
PAUSE 3000
DEBUG " starting test.mp3", CR
SEROUT TX,84,[noparse][[/noparse]"VP",CR]                     'Resume playback of "test.mp3"
PAUSE 5000
DEBUG " reducing volume test.mp3", CR
SEROUT TX,84, [noparse][[/noparse]"VSV 30",CR]                'Reduce playback volume
PAUSE 5000
DEBUG " increasing test.mp3", CR
SEROUT TX,84, [noparse][[/noparse]"VSV 0",CR]                 'Return playback volume to full
PAUSE 5000
DEBUG " stopping test.mp3", CR
SEROUT TX,84, [noparse][[/noparse]"VST",CR]                   'Stop playback of "test.mp3"

DEBUG " starting test2.mp3", CR
SEROUT TX,84,[noparse][[/noparse]"VPF test2.mp3",CR]          'Play a file named "test2.mp3"
PAUSE 2000
SERIN RX,84, [noparse][[/noparse]WAIT (">")]                  'Waits for "test2.mp3" to stop playing
PAUSE 2000
GOTO Main

Thanks in advance.

Dave

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-10-20 02:34
    How do you have it connected to the stamp (drawing or picture) and could you ATTACH your actual bs2 file to your next post? Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • MikerocontrollerMikerocontroller Posts: 310
    edited 2009-10-20 03:25
    · I seem to remember having·some initial problems with my VMusic2· but they were solved after I updated the firmware.· If I remember correctly the unit was freezing up during volume changes.· Good luck.
  • WolfbrotherWolfbrother Posts: 129
    edited 2009-10-20 03:36
    Here's the schematic I followed. My BS2 file is also an attachment.

    Mikerocontroller, I did follow the firmware update per the website. It seems to have worked, but now everything seems DOA.

    I'm still lost on what else could have gone wrong.
  • WolfbrotherWolfbrother Posts: 129
    edited 2009-10-20 19:16
    Just bouncing this back up to the top, still no success. I have ordered a cable to reflash the unit, but looking for anything anyone else might suggest.
  • MikerocontrollerMikerocontroller Posts: 310
    edited 2009-10-20 19:31
    Did you try a different USB drive? Maybe try reflashing with the new drive? Maybe run a stripped-down test using only one play command and using only TX (from the Stamp)?
  • WolfbrotherWolfbrother Posts: 129
    edited 2009-10-20 19:41
    Hi Mikerocontroller,

    I tried a couple USB drives, 64M, 128M and a 512M, I avoided all the large ones because I heard the 1G and above had known issues. I also made sure to have the latest ftrfb.ftd loaded on each drive I tried, just in case. And I did the stripped down version where all that was there was one play command. The green LED flashes like it realizes that it is supposed to be doing something, but there is no audio output. I checked with my scope and the audio out is nil. I have a call into surplus gizmos and am waiting for their guy who is familiar with the Vmusic to call me back, at this point I think it may just have gone bad.

    Thanks for the good thoughts though.
  • hover1hover1 Posts: 1,929
    edited 2009-10-20 20:58
    Hi Wolfbrother,

    I have four of these little marvels running fine with the info off of ScarryTerry' site. I am using brand new 2GB Drives.

    Are you using the following?

    "IMPORTANT NOTE: This file is currently called "ftrfb_9600.ftd" for identification purposes. Once you download it, you must change the name to: ftrfb.ftd in order for it to work properly."

    That file uses the "extended command set" which should match the BS2 program. I do not "listen" for TX from the Vmusic2 in my programs.

    With the green light flashing, it sounds like it's working. You may just have a bad audio out.

    Jim


    Wolfbrother said...
    Hi Mikerocontroller,

    I tried a couple USB drives, 64M, 128M and a 512M, I avoided all the large ones because I heard the 1G and above had known issues. I also made sure to have the latest ftrfb.ftd loaded on each drive I tried, just in case. And I did the stripped down version where all that was there was one play command. The green LED flashes like it realizes that it is supposed to be doing something, but there is no audio output. I checked with my scope and the audio out is nil. I have a call into surplus gizmos and am waiting for their guy who is familiar with the Vmusic to call me back, at this point I think it may just have gone bad.

    Thanks for the good thoughts though.
  • WolfbrotherWolfbrother Posts: 129
    edited 2009-10-20 21:51
    Hi Hover1,

    It's good to know larger drives are ok. I tried one of those also. I think my Vmusic must have just gone DOA. I used ScaryTerry's program with the TX command to see if the audio files were actually playing. The program never got signaled that the music should stop. I don't know what the green light really means though, if that's the case.

    I also changed the files on the thumb drive and even used Garageband to create some new very simple mp3 files. Nothing worked.

    I did change the filename to ftrfb.ftd also, I even tried updating to the latest firmware on the viniculum site. I ordered the RS232TTL-3V3 cable to try and reflash the unit, but that will be a couple days away with postage. I also ordered two more units in the hopes that it's just a fluke.

    I'll work on the other parts of this project in the meantime. Thanks.

    Dave
  • WolfbrotherWolfbrother Posts: 129
    edited 2009-10-23 17:22
    So, here's something interesting I found, It seems that all the commands that don't have an argument work and the player outputs music. For example, V3A works like a champ and plays all MP3 files like the Viniculum documentation says. But something like VSV 0 doesn't change the volume and VPF file.mp3 is also defunct. Looking at my code, I think I am doing all the same things as Scary-Terry's code or any of the other examples I have found on the web. I'm also sure that I am calling the correct filenames and have complied with the 8.3 (filename.mp3) rule for the filenames.

    Even if I had the names wrong, I don't have 0-255 wrong and the volume doesn't change.

    Anyone have any ideas on this one?

    Thanks.
Sign In or Register to comment.