Shop OBEX P1 Docs P2 Docs Learn Events
iProp: Portable WAV player with playlist and browser. Ideas for add-ons? — Parallax Forums

iProp: Portable WAV player with playlist and browser. Ideas for add-ons?

MicrocontrolledMicrocontrolled Posts: 2,461
edited 2009-11-27 07:44 in Propeller 1
Always having interest in portable music systems I thought to make my own. I was hoping that I would not have to start from scratch and I was overjoyed when I found Rayman's wonderful WAV drivers in the OBEX. (Thanks for that, Ray!) I then thought I should compleate my pact with mctrivia when he gave me a propmod and turn this into a Gadget Gangster project. I have been trying to come up with something to enter into his design contest so I figured that this sounded pretty good. So I got mctrivia's propmod and wired it up to a boss board in the lower section. I then added the DAC for video with a composite out plug AND a header for the Bridillia 3.0" display if I ever get one. I then added in a battery pack, a switchpad (4 buttons on a scrap of board) and straight-through audio and I had a working portable player. I inserted a mini-SD loaded with all sorts of songs and soon discovered that it had a limit on file size. I'll get to that later though and tell you that I designed a timer to tell what time in the song you are in(run in a seperate cog) a stop/start button, a full list of all .WAV files on the SD card and a scroll through list where you can click and play. The audio is amazingly clear, expesially for a home-made device. Well, now that I had a circuit board I built a full case for it out of thin partical board and hot-glue. I then spray-painted all but the front silver, and also cut out some blocking tape to leave a cool "iProp' logo on the front. I then cut a circle out of fiberglass and painted the back silver with cut-outs for icons. I then put different color paper behind it for a cool effect. I then hot-glued it onto the back of the button circuit board and put it on the front under the logo. I'll post a picture of what the fished project looked like.

http://sites.google.com/site/picturesforuploadsite/pictures/Old%20memory%20card%20026.JPG
http://sites.google.com/site/picturesforuploadsite/pictures/Old%20memory%20card%20027.JPG

The way it knows what files are on the card is not a new innovation, it is a cheat. I have a lookup table file that must be loaded for the device to work. It is a txt file (list.txt) which is basicly a list of all the songs file and what you want the title to be on the device. There are a number of commands that are going to be inplanted into this text file. Commands are addressed in the way
*SongName|codeword:text for code goes here|

This way you can make any number of code words and inplant them into your player. What I would like to know is what code words I·should inplant·and what they should do. I have already inplanted T, or Title so that in the listing you can have a long title shown instead of a short filename. I am also planning on inplanting L, or Lyrics, that allows you to create a timed lyrics file (more on this later) but what else should be inplanted? Give me opinions on the project, conplaints, whatever. Tell me what you think.

Thanks,
Micro

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Computers are microcontrolled.

Robots are microcontrolled.
I am microcontrolled.

But you·can·call me micro.

Want to·experiment with the SX or just put together a cool project?
SX Spinning light display·
Want cheap wholesale electronic parts?
Transistor parts wholesale

Comments

  • David BDavid B Posts: 592
    edited 2009-11-18 03:34
    I don't know how buttoned up the hardware is, but on one battery-powered project I made a few months ago, a nice addition was to add a cheap, slow 16 bit ADC (I used a TC3405) run some battery life tests, then add a display showing about how many minutes of battery life are left.

    That's one of those little things that doesn't sound very exciting but is so helpful when you actually use the thing.
  • mikedivmikediv Posts: 825
    edited 2009-11-18 03:39
    ??? It needs a display. Pretty cool though
  • ParsecParsec Posts: 20
    edited 2009-11-18 03:46
    Sounds like a perfect project to add one of Rayman's 4.3" touchscreen LCDs to! smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No electrons were harmed while rendering this message.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-11-18 12:15
    I know it needs a display, I just don't have one. I have the code for the display built in to the device, it is just not outputting. I am in the process of adding speech to it so you can use it with or without the display. The display it is built for is the Bridillia 3.0" as I sayed in the top post. However, I cannot afford a $45 display this close to Christmas, so hopefully I will get it for my birthday here soon. 8 ]
    The ADC convertor I will try, as long as it is in GG's invetory. As soon as I get that display, I will replace the "iProp " logo with it. Trust me, it will be cooler by the time it is released to GG!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    But you·can·call me micro.

    Want to·experiment with the SX or just put together a cool project?
    SX Spinning light display·
    Want cheap wholesale electronic parts?
    Transistor parts wholesale
  • Rob7Rob7 Posts: 275
    edited 2009-11-18 14:45
    Micro,
    I think your project is great.
    My 2 cent's.
    How about adding "A" For Artist, this way you can narrow your search results ?
    If you don't remember the song name but know who the artist is.
    What do you think?
    My first MP3 player was the Virgin Pulse, a great player, I loved all it's features. I think this was one of the first SD file read players but I am not sure.
    I sometimes fire it up just to listen to it.

    Rob 7
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-11-18 14:51
    Love it!

    Now do a PCB that fits the Gameboy case and interface it to the existing screen from the unit. [noparse]:)[/noparse] [noparse]:)[/noparse]
    (and start selling them.. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-11-18 16:56
    I'm pretty sure this will fit in a Gameboy case, but the buttons don't match.... :-)

    How do you like the PCB design? This will make the system A LOT more compact!

    attachment.php?attachmentid=65200

    P.S. I named the one file MP3 Player even though it only plays WAVs.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    But you·can·call me micro.

    Want to·experiment with the SX or just put together a cool project?
    SX Spinning light display·
    Want cheap wholesale electronic parts?
    Transistor parts wholesale
    343 x 284 - 17K
  • Ahle2Ahle2 Posts: 1,179
    edited 2009-11-18 17:02
    Nice... A portable SID player isn't far away Oldbit !! tongue.gif
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-11-18 18:12
    I don't know what SID is!!! blush.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    But you·can·call me micro.

    Want to·experiment with the SX or just put together a cool project?
    SX Spinning light display·
    Want cheap wholesale electronic parts?
    Transistor parts wholesale
  • hover1hover1 Posts: 1,929
    edited 2009-11-18 18:35
    Did you not download SID Emulator·yet?· http://forums.parallax.com/showthread.php?p=855167

    http://en.wikipedia.org/wiki/MOS_Technology_SID

    Nice work on the player!

    Jim


    microcontrolled said...
    I don't know what SID is!!! blush.gif

  • SciNemoSciNemo Posts: 91
    edited 2009-11-19 02:29
    I love your music player. Successfully does something I've been lusting after for ages. I have 4 generations of my own digital music player, with the last 2 based on the prop. 3d one was in an Altoids tin. I'd recommend them for the case for the new version you are making with that PCB, they are very durable and fit nicely in a pocket.

    My latest one uses the propmod that mctrivia so nicely gave me (I love the little bugger, gonna buy a bunch more when I get some money together).

    Maybe we could work together on some software? It seems to me like you've made some serious progress in getting a usable UI. I've focused mostly on the hardware so far, I'm just getting to the software stage.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Not the fish.
    sites.google.com/site/bitwinproject/
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-11-19 02:51
    I would love it if you would help me develp the software, SciNemo! Jus t give me your Email so I can send you the code. (I don't want to post it until the project is on Gadget Gangster)

    Today I got the "Album" feature halfway in, even though I worked from noon to sundown. It now reads the album, writes the result to the onboard EEPROM on startup. The flaw with this is that if you add a new catagory (that is artist or album) then you have to reset the memory. Since setup only takes a couple seconds that should not be much of a problem. The reason it takes it from the SD card to the EEPROM is that then the startup function is simply to read from preset EEPROM locations and load the variables instead of searching a 5000 byte(max) SD card program. The system is designed to handle more songs the the SD could hold, for in uncompressed WAV you could only fit 50 to 75 songs on a 2GB SD card. This saying that if someone put in a 4GB SD then they could have at the very most 200 songs, if some are short so the program is currently being expanded to hold at least that much. By the time this is done the whole memory will be utillized. The thing I spent most of my day on was getting the album (or catagory) thing set up WITHOUT initial startup and just loading from the SD to the vars. This failed every time so I resorted to this. I didn't have time to test it yet, so results will be in tomorrow.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    But you·can·call me micro.

    Want to·experiment with the SX or just put together a cool project?
    SX Spinning light display·
    Want cheap wholesale electronic parts?
    Transistor parts wholesale
  • mctriviamctrivia Posts: 3,772
    edited 2009-11-19 03:03
    if you go with a lower frequency and lower bit depth, and mono you can get a lot on an sd card.

    16bit mono at 32kHz could fit 8.7 hours on a 2GB card.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board coming soon. $21.99 has backlight driver and touch sensitive decoder.

    Post Edited (mctrivia) : 11/19/2009 3:10:10 AM GMT
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-11-19 12:20
    How do I set it at a lower frequency?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    But you·can·call me micro.

    Want to·experiment with the SX or just put together a cool project?
    SX Spinning light display·
    Want cheap wholesale electronic parts?
    Transistor parts wholesale
  • mctriviamctrivia Posts: 3,772
    edited 2009-11-19 12:59
    you use a program like "cool edit pro" to resample the audio. cds are by default 44k but 32k still sounds good. mono vs stereo there is 2 different wav player objects for that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board coming soon. $21.99 has backlight driver and touch sensitive decoder.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-11-19 22:12
    OK, I got the Album catagory working without the aid of the EEPROM

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    But you·can·call me micro.

    Want to·experiment with the SX or just put together a cool project?
    SX Spinning light display·
    Want cheap wholesale electronic parts?
    Transistor parts wholesale
  • JonnyMacJonnyMac Posts: 9,208
    edited 2009-11-19 23:22
    microcontrolled said...
    How do I set it at a lower frequency?

    I use Audacity (audacity.sourceforge.net) for such tasks; have been doing this lately as I'm presently experimenting with Ray's WAV player myself for integration into a future Halloween/Movie prop controller.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-11-20 01:31
    Wow, thanks JonnyMac! I downloaded the program, so how do I set it to a lower frequency? I'm kind of new to this.... smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    But you·can·call me micro.

    Want to·experiment with the SX or just put together a cool project?
    SX Spinning light display·
    Want cheap wholesale electronic parts?
    Transistor parts wholesale
  • JonnyMacJonnyMac Posts: 9,208
    edited 2009-11-20 04:37
    Assuming the latest (1.3.8 or higher): Select the track (click in the track header on the left side of the screen), then click Tracks\Resample...
  • lonesocklonesock Posts: 917
    edited 2009-11-20 17:12
    Or, at the bottom left of the Audacity window there is a "Project Rate (Hz)" box. You can change that before exporting a project. (This is a good way to go if you've multiple tracks that you are mixing, without having to resample each track individually.)

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lonesock
    Piranha are people too.
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-11-20 19:48
    The brilldea display won't fit into a Altoids tin. I put my brilldea in a 3,5" USB harddrive case. You can purchase those without harddrive for $4-5. (I posted a pic a while ago).
    For your filelist ... I·added a VirtualMemory to the FSRW which I used to scan the SD-card and create a list of BMP-files. So, that's propably what you could use in your player for generating a WAV filelist - maybe in different playlists.
      ' Scan the directory for .bmp files
      sdfat.opendir
      bmpfound:=0
      repeat until sdfat.nextfile( @flname )
        y:=0
        repeat until flname[noparse][[/noparse]y++] == "." or y==13
        if flname[noparse][[/noparse]y]=="B" and flname[noparse][[/noparse]y+1]=="M" and flname[noparse][[/noparse]y+2]=="P"   
          sdfat.vwMemCmpCopy( BMP_BASE + bmpfound<<4, @flname, 13 )
          bmpfound++
      sdfat.vMemFlush
    
    
    ' And that's how I can use the list later
    repeat i from 0 to bmpfound-1
        sdfat.vrMemCopy( BMP_BASE + i<<4, @flname, 13 )
        if PrintPic( @flname, 230400, $000ef )
          waitcnt( clkfreq*5+cnt )
    

    ·If you are interested there is a Thread called VirtualMemory which shows the early proof of concept. Unfortunately I used a older FSRW version, so before I provide some new code I'd like to add it to a newer version.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-11-20 20:08
    I am reading .WAV files, not .BMP, so what do you mean? If there is a way to put .BMP files on a display with a Propeller do tell how to do it. It would be a wonderful addon for the device. Also MagI20 it is shocking to me you think I could interpet your object. Your the same one who said that any of my attempts at a design would be meaningless and failures because of my lack of ASM knowledge. I will try to prove you wrong.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    But you·can·call me micro.

    Want to·experiment with the SX or just put together a cool project?
    SX Spinning light display·
    Want cheap wholesale electronic parts?
    Transistor parts wholesale
  • SciNemoSciNemo Posts: 91
    edited 2009-11-20 20:19
    I think he means you can use his code and substitute wav for bmp, giving you something that generates playlists for the iProp efficiently.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Not the fish.
    sites.google.com/site/bitwinproject/
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-11-20 20:46
    What I mean is that I have a dynamic list of BMP-files generated by the propeller itself. I just put some new files on the SD-card and they will be added to the list.
    I think that would be nice for your WAV player as well.

    And putting a hires, hicolor image on a display is what I'm currently working on. I use a crystalfontz display which has touch-panel and is very unexpensive. 2,4" for around $35. Currenty I want to do a nice graphical GUI where all the images are stored on the SD-card. So, that would be nice for your player as well.

    Forgive me .. I'm old .. hardly remember what I said yesterday ;o) But even if I did say so, it should encourage you - which obviously worked.

    The basic point of the code above are the calls to vxMemxxxCopy. In the upper part the directory is scanned and each file ending with .BMP is put into the list. vwMemCmpCopy also compares the actual filename to the name that's propably already in the list. Only if it changes something, the sektor will later on be written to SD card again - either by magic or by vMemFlush.

    As you know a filename is 8.3 plus string terminator = 13 bytes. For easier calculation I give each entry in the list 16 bytes. Of course you could also give it more memory, so you can store additional information. Playlist ... runtime ... whatever.
    The WAV file can still be opened while you access the virtual memory. So you could scroll in the list while listening.

    So, if you want to access this data again, you simply use vrMemCopy with the entry-number < 4 (which is a fast multiply by 16) plus the base adress of the list of filenames.


    PS: Do you have a link to the thread in which I have been so ugly to you? I'd like to check wheather I have to apologize for something.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-11-20 22:22
    Thank yoiu for the information. Where can I obtain this display? Sounds like something that I would want to work with. I will try your virtual memory with my playlists, seems useful.
    And no need to apologize, that just encouraged me to try harder!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    But you·can·call me micro.

    Want to·experiment with the SX or just put together a cool project?
    SX Spinning light display·
    Want cheap wholesale electronic parts?
    Transistor parts wholesale
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-11-20 23:12
    I currently have the virtual memory stuff running in an old FSRW, so with lower speed than the newer 2.4 version. I'll prepare a package with what I have currently for you tomorrow and put it in the virtual memory thread.

    The display is from Crystalfontz ( http://www.crystalfontz.com/product/CFAF240320K-T-TS.html ). I like it pretty much and I'll definitely write a general purpose menu system for that. Reading full color pictures in the end should be possible in ~200ms using the 8 bit bus setting. I plan to record a vid showing what I currently have.... let's see.
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-11-27 07:44
    @microcontrolled:

    Did you have a look at this thread? http://forums.parallax.com/showthread.php?p=852123


    Wouldn't that be a nice interface for your WAV-player?
Sign In or Register to comment.