is it possible
science_geek
Posts: 247
·ok, so i went to work this week, was listening to my MP3 player, and it decided to jump out of my pocket, so instead of buying a new one i decided i would make one, what i would like to know is, is it possible to use the prop to play music from an sd card or is there a chip i can get that i can control which song is played using the prop, i want to use the prop because i am doing other things with it for my garage, and it would make a good system to have an embedded music player in my garage system
Comments
http://www.sparkfun.com/commerce/product_info.php?products_id=8125
Note that the datasheet for the VS chips is quite complex; though the project is by no means impossible (It's possible to stream the music to the DSP with a PIC16, which operates at 1/4th of the clock of a single Propeller cog). Also be careful with your analogue power supply; you will want lots of capacitors
Secondly, I'm interested in how MP3's can compress a vast amount of sound data into such clear audio. I now know why USB is so complicated(from a previous post), and would like to know why MP3 is, too. I gather it has something to do with calculuting a complex series based off of the data given in the MP3 files...
As with a lot of other things, the Wikipedia has a lot of information on MP3. Do a websearch for "wiki MP3".
The chip is the one I mentioned above. It outputs analogue audio that can be passed to headphones, or amplified and passed to speakers. Alternatively, some of the other chips in the family provide digital (uncompressed) audio output IIRC.
The reason MP3 is complex is three fold:
Firstly, it involves lots of multiplication and division, which the Prop 1 can't do fast enough
Secondly, it requires keeping quite a bit of data in memory
Thirdly, it's relatively high bandwidth (128kb/s to 192kb/s) and as such needs a relatively powerful processor
I believe the Prop II should do it, provided the decoder and it's state will fit into cog ram.
MP3 (and co) compress the data by doing something called quanitization: This is the throwing away of the high frequency data in a sample, while preserving the low frequency data. This often results in long runs of zeros or ones, which are then compressed using a more general purpose compression algorithm. Our brains care less about high frequency data, and as such it's removal goes un-noticed. There are other optimizations: audio compression isn't my forte, but I can give you an example in the video domain: Almost all modern video codecs operate in a Luminance/Chrominance colour model, and throw away 3/4ths of the chrominance data, because the eye has more rod cells than cone cells and as such is more sensetive to brightness than hue.
Theres a lot of (math heavy) specifics in every compression format, and this is only scratching the surface.
Look in Graham Stabler's Good Thread Index here http://forums.parallax.com/showthread.php?p=663638.
Look for "Propeller Loader"
In the "Completed Projects" forum, there's a posting for an audio sequencer using two VMusic2 controlled by a Propeller.
There's a playlist stored as a text file on the memory stick. The Propeller reads the playlist into its memory and uses that
to control the order of tracks to be played. It also displays information about the track on an OLED display as well as the
time in seconds played from the track. Here http://forums.parallax.com/showthread.php?p=677691.
Post Edited (Mike Green) : 3/23/2008 7:59:16 PM GMT
That could save a lot of work for someone who wants a handy hardware platform off the shelf.
Though it may be easier to solder the VS1011e to a board than solder wires to those tiny LQFP pins
Yes, though the problem there is getting a fast enough data rate between the SD card and whatever DAC you use.
(The prop wouldn't be able to play overtly complex waves however, for example ADPCM, or, MPEGLAYER3)
Speech poses no problem for playback
can the lcd appmod for the bs2 be used with the prop?
can the 4x4 keypad be used with the prop?
and should i get the prop or fuel cells first?
True, but I was thinking of the four tracks which run straight across the board, under the "U". Guess I should have mentioned what I was actually thinking
With a bit of judicious scrapping, it should be possible to stagger the exposure of copper and give a reasonable piece of tracking to solder on to.
I have some WAV player code here:
http://www.rayslogic.com/propeller/Programming/dac/dac.htm
Also, I tried (and failed) to implement MP3 on the Prop.· I have notes about it here:
http://www.rayslogic.com/propeller/Programming/RaysStuff/MP3/MP3.htm