Pages: [1]   Go Down
Author Topic: play speed control with MP3 module  (Read 1420 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I wonder if I can control play speed of music with MP3 player module.

You know, just like in Max/MSP or in vvvv, get float number for play speed, 1 for normal speed, 0 for pause, and so on.
I'm going to use quite variety of subtle numbers like 0.998, 1.1, 0.89, 0.93, 0.6, 0(which means pause), and a lot more like this.

What I want to know is that typical MP3 decoder module can do such things controlled by Arduino, and if it can, how?

I'm referring to this web page to learn how to use MP3 module: http://kalum.posterous.com/50759184
I'm considering using this module, which looks just the same with the picture in the link above (but this module uses VS1003): http://devicemart.co.kr/goods/view.php?seq=26880 (note that the page is in KOREAN)

Thank you for your reply in advance.
Every comment would be appreciated and help me so much!
Logged

Offline Offline
Edison Member
*
Karma: 34
Posts: 1319
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know if this will help, but there are two ways to change the playback speed of digital audio -

The easiest way is to change the playback sample rate.   The MP3 has a sample-rate value in it's header.  For example, if the MP3 was ripped from a CD, it has a sample rate of 44.1kHz.  This is not realted to bitrate (kbps).    The player software/firmware reads the sample rate from the header and sets the playback sample rate to match.   

If you (somehow) ignore the header and play the file back at a higher sample rate, it will play faster (with higher pitch), and if you use a slower sample rate it will play slower (with lower pitch).   I don't know how to do that, and I don't know if you can modify or "fake-out" the firmware in the MP3 firmware.   But, if you put a slower crystal in the MP3 board, the firmware wouldn't know that the crystal is wrong and it will play back slower...

The other method is to "permanently" re-sample the waveform (basically stretch or squeeze the waveform in-time by adding or removing samples and interpolating as necessary).    The problem here is that you have to decode the MP3 to uncompressed PCM, re-sample, and then re-compress to MP3.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

why you don't come to :www.electway.com
there are all kinds of mp3 module there.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34128
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The problem here is that you have to decode the MP3 to uncompressed PCM, re-sample, and then re-compress to MP3.
Which is impossible on an arduino due to the lack of memory.

I do not think what you are asking is possible.
Logged

San Francisco
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you don't mind converting the MP3s to WAV format first, you could accomplish this effect with the adafruit wave shield.

http://www.adafruit.com/blog/2008/05/21/wave-shield-bending-the-playback-sample-rate/
Logged

Pages: [1]   Go Up
Jump to: