How to speed up real-time music playback in android without changing the pitch?

I need to be able to play an MP3 file with differential speeds without affecting the pitch (or changing the pitch after acceleration, no matter what). In addition, this transition should be as smooth as possible.

Obviously, there are applications that do this the way it is possible, but this seems impossible using the MediaPlayer API, and the SoundPool API can only change the pitch and speed (unless I miss something).

Any idea on how to achieve this? Any API / 3rd party libraries that might help?

Thanks.

+6
source share
1 answer

There is a general method called Time Scaling that can do this. A tool that I did not appreciate is available here: http://sourceforge.net/projects/mffmtimescale/ .

If you approach the time line of the audio, it is very similar to the old heart rate monitor - wiggly patterns of peaks and valleys. For vowels, the picture is quasi-stationary, which roughly means its repeatability, like the pulse of a healthy pulse. One vowel ahhhh sound can repeat its pattern 3-7 times in ordinary speech. The TSM algorithm removes some of these repetitions and should use a filter to input artifacts by trimming / joining imperfect repetitions. Empty spaces can also be reduced, but care must be taken not to remove all empty space. In English, the word “football” actually has a gap between “foot” and “ball” (say slowly out loud). TSM can also do the opposite, pumping into empty space in spots of rights or adding repetition of the step period to vowels. All this is connected with something rather complex and somewhat dependent on the language, which requires a lot of customization, which for most applications means that you do not want to develop your own.

+1
source

All Articles