April 29, 2024, 10:54:12 PM

News:

Be sure to checkout our Vixen interfaces in the Library forum -- if you want PC automation at near zero cost, EFX-TEK and Vixen is a great combination of tools.


Prop-2 Test Code for uMP3

Started by Ryanm0085, July 27, 2010, 04:25:08 PM

Previous topic - Next topic

Ryanm0085

i am just looking for a basic code to make sure my uMP3 is communicating with my Prop-2.  My uMP3 is right out of the box.  i havent made any changes.  i tried a few codes on other topics but couldn't get anything out of the uMP3

BigRez

There are several threads out here with code for a BS2 and uMP3.  Have a look at this one:  ump3 with the prop-2

Beyond that, you need to make sure the setup is correct betwen the uMP3 and the BS2 including the baud rate.  Have a look through the Using the BS1-SA to Setup the uMP3 -- Yes, You Can!   thread for some info on that. 

Other setup info can be found here:  UMP3 with the Prop-1. It refers to the Prop-1 but connections are similar for the prop-2.

Ryanm0085

thanks bigrez.  ive been reading them but im still having some problems with the communication.  ive tried several different test codes i found but nothing yet.  im gonna work on it a little bit more.  i guess i have to get the BS1-SA adapter...

JonnyMac

Get the docs for the uMP3 and check the default baud rate -- you may not have to change it.  The only thing that may need changing is the response delay, if you need to use that.  If you don't need to know when a file is finished then you can live without the response delay and you'll not be waiting for any responses from the player.
Jon McPhalen
EFX-TEK Hollywood Office

Ryanm0085

July 28, 2010, 01:26:16 PM #4 Last Edit: July 28, 2010, 01:37:07 PM by Ryanm0085
got ya...just incase i ordered a bunch of adapters from parallax...i couldnt find my adapter so better to be safe than sorry.  im pretty sure im gonna need them anyway...i did check and it says the default is 9600.  im pretty sure most of the demos i checked were 2400 and i was unsure how to change them.  also, im not too worried about when the song is finished.  basically i just want my program to start a song on initialization.  then when a trigger is pressed, it quickly switches to another song.  or fade in and out but i think just a fast switch will be great.   

JonnyMac

Jon McPhalen
EFX-TEK Hollywood Office

Ryanm0085

it may be this part im getting stuck on...

' Put file # to play in "theMP3"
' -- add DATA label entries to LOOKUP as required

Play_MP3:
  LOOKUP SFX01, [SFX0, SFX1, SFX2,
                  SFX3, SFX4, SFX5], eePntr     ' get base address

i changed "theMP3" to SFX01 and wasn't sure about the DATA label...

not sure if this is right...


JonnyMac

Swing and a miss!  ;D

What you need to do is assign a value to "theMP3" that indicates which file in the list you're playing.  The LOOKUP table points to the beginning of the file name which is stored in a DATA table (you need to edit that list). 

You do note need edit the subroutine -- in fact, you broke it.  If you're going to play more than six files then I'll make that change for you.
Jon McPhalen
EFX-TEK Hollywood Office

Ryanm0085

I never was good at baseball darn it...im only playing 2 files so it should be okay. as soon as i make it home ill try again.  thanks

JonnyMac

Just edit the list of names in the DATA table.  Assign theMP3 a value of 0 to play the first, 1 to play the second.
Jon McPhalen
EFX-TEK Hollywood Office

Ryanm0085

July 29, 2010, 06:31:46 PM #10 Last Edit: July 29, 2010, 07:11:48 PM by Ryanm0085
It is working perfect... :D  I am very excited

Ryanm0085

to me it looks like after the mp3 is done playing, i should be able to hit the trigger again for another song.  if this is true, the uMP3 will play one song and then not respond to another trigger...but m very happy to hear music

BigRez

Yes it should but without seeing your exact code as changed, we can't be sure there isn't something wrong with it.  If you're using the demo program without modification other than your file names, then it's set up to play THREE files as posted.   Either change the line

theMP3 = lottery // 3                         ' make 0 - 2

into

theMP3 = lottery // 2                         ' make 0 - 1

or put a third file on the card and at EEPROM location SFX2.

Ryanm0085

i didnt change a thing on the demo...i changed my mp3s and named them the same as what the demo used...

JonnyMac

Check you file names; they MUST conform to DOS 8.3 standards -- this usually throws a few folks off as it's an easy miss.
Jon McPhalen
EFX-TEK Hollywood Office