tags:

views:

750

answers:

5

I am working on an application for college music majors. A feature i am considering is slowing down music playback without changing its pitch. I have seen this done in commercial software, but cannot find any libraries or open source apps that do anything like this.

  1. Are there libraries out there?
  2. How could this be done from scratch from various file formats?

Note: I am working in java but am not oppossed to changing languages.

+9  A: 

Timestretching is quite hard. The more you slow down or speed up the sound the more artifacts you get. If you want to know what they sound like listen to "The Rockafeller Skank" by Fat Boy Slim. There are a lot of ways to do it that all have their own strengths and weaknesses. The math can get really complex. That's why there are so many proprietary algorithms.

This page explains things a bit clearer than I can and links to the Dirac library. http://www.dspdimension.com/admin/time-pitch-overview/

I found this link for java code to do pitch shifting/timestretching http://www.adetorres.com/keychanger/KeyChangerReadme.html

Mendelt
"Funk Soul Brother" is, of course, "The Rockafeller Skank" ;)http://en.wikipedia.org/wiki/The_Rockafeller_Skank
moobaa
@moobaa : DOH.. stupid of me.. Fixed it! hope nobody noticed :-)
Mendelt
+1  A: 

This site explains how it's done in the physical world: http://www.wendycarlos.com/other/Eltro-1967/index.html

I don't know how you would emulate that in software though... I'll keep looking

Jiaaro
+3  A: 

I use soundstretch to speed up podcasts which is works quite well, haven't tried it on music though.

Mr Shark
+1  A: 

One way to do it would be to double the sampling rate without changing the sampling rate of your source. (Low quality example, but easy to implement. Note: You can also decrease the sampling rate as well).

Check out any math related to phase vocoders.

Another common method is to create an array of fft bins that store data for scheduled intervals of your sound. Then you can choose how quickly to iterate through the bins, and you can re-synthesize that audio data for as long as you choose thus enabling you to stretch out one short segment of your sound for as long as you like.

just_wes
I'm pretty sure that first idea will just lower the quality while leaving the playback speed the same
Jiaaro
Agreed and noted.
just_wes
+1  A: 

audacity does it out of the box and it's free. THere are several plug ins for mp3 players as well that are free. Apparently it's pretty easy to do with an mp3 since it's already coded in the frequency domain.

Chuck