Shop OBEX P1 Docs P2 Docs Learn Events
Modules for playing Mp3 from trigger? — Parallax Forums

Modules for playing Mp3 from trigger?

I need to find a way to trigger an mp3. Someone wants to play an mp3 of a certain length audio file and I can output 3v3 from my Prop board to trigger it straight off a pin. Once upon a time I had my own mp3 modules but they are all gone. Cost is not a concern, I'd like a nice quality stereo output but even nicer if it has a built in stereo amp ready for some 8 ohm speakers to connect straight to it.

Any suggestions?

Comments

  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2017-08-28 20:20
    For modules Adafruit has several for OGG and WAV, with different functions. Two examples:

    Stereo out:
    https://www.adafruit.com/product/2133

    Built-in amp:
    https://www.adafruit.com/product/2210

    A few also play MIDI, and there's probably one in the mix that can do MP3s, if you really mist have that format.

    Sparkfun has similar products. They have an MP3 trigger that is standalone. Price is $49. Just load the files onto a flash card following a certain filename format, plug the flash card in, and go.

    Your Prop can play WAVs using only software and a couple of cogs.
  • The article says that MP3 is dead because AAC is now the default standard. MP3 has a compression ration of about 10:1, so uncompressed audio is takes about 10 times the space as MP3 audio. If you have lots of audio files it may still be better to store it compressed. However, for small bits of audio its more convenient to store it as uncompressed.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2017-08-28 20:37
    The article also says this:

    "German research institution that bankrolled the MP3's development in the late '80s, recently announced that its "licensing program for certain MP3 related patents and software of Technicolor and Fraunhofer IIS has been terminated."

    The reason the patents were terminated has much more to do with their having expired. For several years MP3 is patent-free in the EU, and the last significant patents expired in the US this year.

    There's more to storage alone whether a format like MP3 is still valid. Who wants to download 600 MB of a CD (which is mostly raw PCM) when you can download 50MB of MP3. On a mobile device not on Wi-Fi it matters. Probably now more than ever people need and want compressed media. AAC may be the new format, but like how MP3 was, AAC is patented, and it costs to provide codecs. This drives up the costs. So we're back to square one and the main reason they developed formats like OGG in the first place.
  • T Chap wrote: »
    I need to find a way to trigger an mp3. Someone wants to play an mp3 of a certain length audio file and I can output 3v3 from my Prop board to trigger it straight off a pin. Once upon a time I had my own mp3 modules but they are all gone. Cost is not a concern, I'd like a nice quality stereo output but even nicer if it has a built in stereo amp ready for some 8 ohm speakers to connect straight to it.

    Any suggestions?

    Jon's Player is very easy to use, (WAV files)

    And it's Propeller based!

    http://www.efx-tek.com/topics/ap-16.html


  • tonyp12tonyp12 Posts: 1,951
    edited 2017-08-28 20:49
    > Who wants to download 600 MB of a CD (which is mostly raw PCM) when you can download 50MB of MP3.
    600MB is nothing,
    I rented Titalfall2 for xbox one, it needed a 22GB update before I could play.

    As our ears have pretty low data requirements, I would say we have gone past where audio should be compressed for storage or transmission.
    Our eyses on the other hand, 4K display data still needs heavy compression for storage, hdmi itself sends the data raw.


  • The VMusic3 is also a good alternative. I think they worked the bugs out of the VMusic2. I use these on BS2 based exhibits.

    http://www.mouser.com/ProductDetail/FTDI/VMUSIC3/?qs=Mbo4m7TrsANgTlmYqrKHgQ==


  • Check out this thread for code and a link to an MP3 player that is about $3.00 on eBay these days. I have a few and they work great.

    http://forums.parallax.com/discussion/162526/serial-output-is-there-a-better-way-to-do-this
  • Search for YX5300 on eBay....
  • tonyp12 wrote: »
    600MB is nothing,
    I rented Titalfall2 for xbox one, it needed a 22GB update before I could play.

    600 MB is a lot when you're on monthly bandwidth cap, as many mobile device users are. I'm not sure what an Xbox game update has to do with it.

    Pandora (AAC) and Spotify (OGG) won't stay in business very long pumping out uncompressed audio. Bandwidth isn't free. Especially when the music is listened to through ear buds, few can even tell the difference.
  • The point about wave files is not about Internet bandwidth, it's about how cheap the storage is for it and even if I used an old 4GB card which is practically a throw-away now, that's many hours (over 12hours) of uncompressed audio, especially when you just encode it as 44KHz 16-bit mono. I never could understand why a lot of these implementations automatically assume it has to be stereo, as if someone is going to be wanting an immersive experience listening to it through earphones.

    So once you accept you only need an SD card then all you need after that is a simple RC and I even use 220R there for low impedance out. Wave files are also very easy to seek to a position or time in the file unlike any compressed file. You can literally align to a word boundary anywhere and start playing. I use this method all the time because it is simple and it works.
  • ercoerco Posts: 20,256
    Those standalone Adafruit players look nice, especially with the built-in amp. I've used the Catalex/YX5300 players in my last 3 projects and they work great. Even using just a dollar store amplified speaker, they really blast! http://forums.parallax.com/discussion/167119/bs2-catalex-mp3-amplified-speaker
  • Thanks for all the suggestions guys. I should have been less specific about MP3, I was speaking in general terms about any audio file type. I am liking the Efx tek. Simple contact closure input for a single audio file effect.
  • >I'm not sure what an Xbox game update has to do with it.
    Only way to get the update is through the internet, unless I unplugged the xbox's Ethernet cord it just started to download, it toke about an hour to finish.

    Downloading 600MB a day if you did buy a 1hour worth of CD music every day is still not much data.
    The no-loss compression cuts the data in half, if someone really tries to save bandwidth.
    But streaming Netflix uses way more data.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2017-08-29 16:33
    T Chap wrote: »
    Thanks for all the suggestions guys. I should have been less specific about MP3, I was speaking in general terms about any audio file type. I am liking the Efx tek. Simple contact closure input for a single audio file effect.

    The built-in amplifier on the Efx-Tec is the one you want if you need lots of volume. As I'm sure you've surmised, boards like VMusic and Catalex won't give you trigger inputs. These require a serial interface from a processor.

    I wanted to clarify for the others I'm in agreement that for this project uncompressed WAV is perfectly fine. I just found the article that Tony linked to as one of those ill-informed ramblings -- since the MP3 patents have expired, it's no wonder its backers have stepped away from it. Fraunhofer would much prefer everyone go to their other technology, AAC, as those patents are still in force. In any case, MP3 isn't going anywhere, and is still the mostly widely supported audio compression format on the planet.

    For general info: you'll need a hardware decompressor for any audio type that is compressed. The most common is a single-chip solution from VLSI, and their modules routinely work with either MP3 and OGG, or just OGG. They will also process WAV, so one board can theoretically handle WAV, MP3, and OGG (or for that matter MIDI, but that's not your use case). For your application, the choice of format becomes one of convenience, but keep in mind that if you choose a compressed format you won't be able to readily process that in a Prop alone. The Adafruit boards I noted use the lowest-cost VLSI chips produced before the MP3 patent expiration (OEM price less due to not paying a royalty), so they don't handle MP3. For these, you can use WAV or OGG. It's very easy to produce OGG files from Audacity, with is free.

    Since you've used MP3 modules in the past, I'm sure you're aware how it works, but I thought I'd summarize for others not familiar with this type of board. Since you are looking to trigger your recorded sounds via a switch closure on a pin, you need only specify which sound file goes to which pin. The setup is simple, on the order of file0.mp3 for pin 0, file1.mp3 for pin 1, and so on. The Adafruit boards have some interesting filename variations to add special effects, without the use of reprogramming the board.
Sign In or Register to comment.