<p>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.  </p>

<ol>
<li>Are there libraries out there?</li>
<li>How could this be done from scratch from various file formats?</li>
</ol>

<p>Note: I am working in java but am not oppossed to changing languages. </p>

[{'answer_id': 59977, 'author': 'Mendelt', 'author_id': 3320, 'author_profile': 'https://Stackoverflow.com/users/3320', 'pm_score': 4, 'selected': True, 'text': '<p>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.</p>\n\n<p>This page explains things a bit clearer than I can and links to the Dirac library.\n<a href="http://www.dspdimension.com/admin/time-pitch-overview/" rel="nofollow noreferrer">http://www.dspdimension.com/admin/time-pitch-overview/</a></p>\n\n<p>I found this link for java code to do pitch shifting/timestretching\n<a href="http://web.archive.org/web/20081103052639/http://www.adetorres.com/keychanger/KeyChangerReadme.html" rel="nofollow noreferrer">http://www.adetorres.com/keychanger/KeyChangerReadme.html</a></p>\n'}, {'answer_id': 59982, 'author': 'Jiaaro', 'author_id': 2908, 'author_profile': 'https://Stackoverflow.com/users/2908', 'pm_score': 2, 'selected': False, 'text': '<p>This site explains how it\'s done in the physical world:\n<a href="http://www.wendycarlos.com/other/Eltro-1967/index.html" rel="nofollow noreferrer"><a href="http://www.wendycarlos.com/other/Eltro-1967/index.html" rel="nofollow noreferrer">http://www.wendycarlos.com/other/Eltro-1967/index.html</a></a></p>\n\n<p>I don\'t know how you would emulate that in software though... I\'ll keep looking</p>\n'}, {'answer_id': 59988, 'author': 'Mr Shark', 'author_id': 6093, 'author_profile': 'https://Stackoverflow.com/users/6093', 'pm_score': 2, 'selected': False, 'text': '<p>I use <a href="http://www.iki.fi/oparviai/soundtouch" rel="nofollow noreferrer">soundstretch</a> to speed up podcasts which is works quite well, haven\'t tried it on music though.</p>\n'}, {'answer_id': 1777603, 'author': 'just_wes', 'author_id': 208017, 'author_profile': 'https://Stackoverflow.com/users/208017', 'pm_score': 2, 'selected': False, 'text': '<p>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).</p>\n\n<p>Check out any math related to phase vocoders.</p>\n\n<p>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.</p>\n'}, {'answer_id': 1777666, 'author': 'Chuck', 'author_id': 216338, 'author_profile': 'https://Stackoverflow.com/users/216338', 'pm_score': 1, 'selected': False, 'text': "<p>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.</p>\n"}]
['https://Stackoverflow.com/questions/59936', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6193/']