Shop OBEX P1 Docs P2 Docs Learn Events
Need 2 Props for MP3 — Parallax Forums

Need 2 Props for MP3

RaymanRayman Posts: 14,162
edited 2008-01-10 08:31 in Propeller 1
I've spent a few hours looking at implementing the MadLib MP3 decoder with Prop and have come to the conclusion that 32kB memory·is just not enough to do it...· However, I think it could be split up so that 2 Props could do it.· But, I don't think this would be very useful for me...

I ported enough of it to SPIN to decode the Huffman data from a frame and do the IMDCT before running out of memory...

It may be possible to reduce the precision from 32 to 16 bits and make it fit, but I think this would affect quality...

Oh well, guess I'll wait for Prop II... shakehead.gif

Comments

  • Dennis FerronDennis Ferron Posts: 480
    edited 2008-01-07 03:48
    Is it just the memory holding you up? How many cogs does it need?
  • J. A. StreichJ. A. Streich Posts: 158
    edited 2008-01-07 15:00
    If it is just memory, try adding some external eeprom, and using Large Memory Model like Bill's.
  • DroneDrone Posts: 433
    edited 2008-01-07 16:37
    Just to get started, if RAM is the issue - there is a RAM module for Hydra available from Parallax isn't there? Adds something like 512KB, 64KB directly addressable the rest in blocks if my whiskey-soaked memory serves. The problem is it costs something like $60 USD, but like the PropPlug, this is way Way overpriced. Uses a CPLD address translator (gotta be a better solution out there for the long term). Affordable additional RAM for the Prop would be a real help, not just for MP3 perhaps, but certainly as a video buffer. Hmmm....

    David
  • AleAle Posts: 2,363
    edited 2008-01-07 17:40
    Connecting a SRAM directly to the propeller can give you some MB/s of throughput, but not that many. If you use an external CLD to generate addresses, contiguous addresses, you can get some 1 byte every 4 cycles.
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-01-07 19:25
    Is there a reason to try to decode MP3 with a Prop? You can buy dedicated chips for less can't you?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    The more I know, the more I know I don't know.· Is this what they call Wisdom?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-01-07 19:29
    The same reason to climb Mt. Everest... "Because it is there..."

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

    Getting started with the Protoboard? - Propeller Cookbook
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • RaymanRayman Posts: 14,162
    edited 2008-01-07 19:33
    I was hoping to make a little jukebox device with button inputs and TV output. I was hoping this could all be done with a Protoboad... Also, when you have direct access to the frequency domain data, you can easily do things like add in graphical equalizers and visualizers....

    I suppose I could add a DIP-40 Prop to the Protoboard and do it that way...


    Post Edited (Rayman) : 1/7/2008 7:38:15 PM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-01-07 20:30
    Is serial communication between the props fast enough for this?
    Then anyone with a couple prop devices could tie the prop-plugs together and play MP3s.

    Could be interesting...
    OBC

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

    Getting started with the Protoboard? - Propeller Cookbook
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • RaymanRayman Posts: 14,162
    edited 2008-01-07 20:43
    I think it would need 2.3 Mbps... But, that could be spread out over a few pins...
  • RaymanRayman Posts: 14,162
    edited 2008-01-09 14:52
    I'm looking at it some more and maybe it could be done with 1 prop if the file is mono or "dual channel stereo" instead of "joint stereo"... This cuts some of the memory requirements in half... But, I think that joint stereo may be the most common format...
  • BaggersBaggers Posts: 3,019
    edited 2008-01-09 15:08
    excellent news Rayman, even if it means converting mp3's to mono, would take less memory on the SD also [noparse]:)[/noparse] would be great to have mp3 playback on a single prop.
  • AleAle Posts: 2,363
    edited 2008-01-09 18:00
    I have 2 props connected via an 8 bit bidirectional channel (well you select when it can send or receive), an enhanced version of Beau Schwabe's code. 5 MB/s of bandwidth. More only overclocking smile.gif
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2008-01-09 18:22
    Rayman, can you share a link to the MadLib details?
  • RaymanRayman Posts: 14,162
    edited 2008-01-09 18:34
    Here's a link to LibMad MP3 decoder page:

    http://www.underbit.com/products/mad/

    Also, I just found another big array requirement in the synthesis section...· So, if it is possible to do it with 1 prop, it will only be mono...·
  • BaggersBaggers Posts: 3,019
    edited 2008-01-09 19:41
    mono is still good [noparse]:)[/noparse] how far have you got with it?
  • RaymanRayman Posts: 14,162
    edited 2008-01-09 19:56
    I'm doing it in Spin first... So far, I've decoded the data from the first granule of the first frame and did the imdct on it to transform it to the time domain. "All" that's left is the synthesis part... Once I'm done, I have a better idea of what can be done with Prop I... I may just punt and wait for Prop II though... I have the same sample MP3 file opened with a test program with LibMad in VC6 studio, so I'm able to verify that it's working properly...
  • BaggersBaggers Posts: 3,019
    edited 2008-01-09 20:03
    that's cool, be a shame to give up, but if you want to wait for prop II, I can't blame you, that's gonna be one cool beastie to play with, I for one can't wait to have a blast on that [noparse]:)[/noparse]
  • toru173toru173 Posts: 17
    edited 2008-01-10 00:49
    If you go for mono, is it possible to just select either the left or right channel and decode that? I'm not very familiar with the MP3 spec. If this is possible, you could "nominate" a prop to decode each channel. That way adding stereo is as easy as adding a second prop, telling it to decode the other channel and making sure they're synced.

    Another option, specifically to add more memory, is something I saw a while back in this forum. I'll see if I can find it but it was basically a 12 bit counter plus 8 bit latch. The idea was you set the latch to the starting address (or page), then with each successive memory access the counter would auto-increment the lower 12 bits. You'd end up with 4kb pages with a possible 512KB address space (one address pin was used for control), although it used up a lot of pins. I think the auther managed to squeeze it into 13 or so pins.

    I can't seem to find the original thread but it was quite smart! If you can handle more pins being used up (and if you want a tv output that may not be a good idea) you could probably get it to work. It was the fastest way of accessing external memory I've seen proposed for the prop!
  • RaymanRayman Posts: 14,162
    edited 2008-01-10 01:21
    One other issue is processor power... I read some papers quoting the MIPS required on a RISC core... But, I now see that they referred usually to an ARM processor that has a multiply instruction that can do a 16x32 multiply in 5 clock cycles... So, the lack of a multiply instruction may be another nail in the coffin for this project...
  • BaggersBaggers Posts: 3,019
    edited 2008-01-10 08:31
    oh well, roll on PropII [noparse]:)[/noparse] nice one for trying though
Sign In or Register to comment.