IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Time-Stretching, any algorithm/code available ?
robUx4
post Sep 15 2003, 09:38
Post #1


Matroska Developer


Group: Developer (Donating)
Posts: 410
Joined: 14-March 02
From: Paris
Member No.: 1519



Hi everyone,

I'm working on an audio software and I'd like to do some time stretching in "real-time". That is reading an audio file and changing the duration of the track without changing the pitch.

The first obvious option is to use resampling to change the number of final samples, but that changes the pitch...

So my second option was inspired by granular synthesis. Cut the file in small parts and then output these parts as is with some samples added/removed at the end (added with content from the original part). But the sound is really bad and the pitch seem to be changed anyway (depends on the size of the parts). It sounds especially bad on low frequencies.

I'm thinking about adding some fade in/fade out on the transition part (where data is added remove). But I doubt it will improve the quality much.

So I was wondering if anyone here know places with good informations on how to code a good time-stretching (or even better some working+free code in C or C++).


--------------------
http://www.matroska.org/ : the best vapourware / http://robux4.blogspot.com/
Go to the top of the page
+Quote Post
[JAZ]
post Sep 15 2003, 09:54
Post #2





Group: Members
Posts: 1706
Joined: 24-June 02
From: Catalunya(Spain)
Member No.: 2383



take a look at this. It might be what you want.
http://www.sunpoint.net/~oparviai/soundtouch/

Note that there also exists a foobar plugin (Download here: http://www.cqasys.com/projects/kode54/index.php ).
Go to the top of the page
+Quote Post
bond
post Sep 15 2003, 10:05
Post #3





Group: Members
Posts: 881
Joined: 11-October 02
Member No.: 3523



perhaps ac3filter can also do that!? (or only change delay? unsure.gif )


--------------------
I know, that I know nothing (Socrates)
Go to the top of the page
+Quote Post
andy5998
post Sep 15 2003, 11:33
Post #4





Group: Members
Posts: 2
Joined: 15-September 03
Member No.: 8855



There is a discussion (by me) at
http://www.seventhstring.demon.co.uk/xscri...e/slowdown.html
though I don't make source code available.

Andy Robinson, Seventh String Software, www.seventhstring.demon.co.uk


--------------------
Andy Robinson, Seventh String Software, www.seventhstring.demon.co.uk
Go to the top of the page
+Quote Post
kl33per
post Sep 15 2003, 12:46
Post #5


A/V Moderator


Group: Members
Posts: 841
Joined: 9-June 03
From: Brisbane, AUS
Member No.: 7078



QUOTE ([JAZ)
,Sep 15 2003, 06:54 PM] take a look at this. It might be what you want.
http://www.sunpoint.net/~oparviai/soundtouch/

Note that there also exists a foobar plugin (Download here: http://www.cqasys.com/projects/kode54/index.php ).

I must say, that foorbar plugin is very impressive. It can also alter pitch without changing tempo, very interesting.


--------------------
www.sessions.com.au - Sessions Entertainment
Go to the top of the page
+Quote Post
robUx4
post Sep 15 2003, 12:58
Post #6


Matroska Developer


Group: Developer (Donating)
Posts: 410
Joined: 14-March 02
From: Paris
Member No.: 1519



QUOTE ([JAZ)
,Sep 15 2003, 09:54 AM] Note that there also exists a foobar plugin (Download here: http://www.cqasys.com/projects/kode54/index.php ).

I don't see any such thing there
Also what I need is either an algorithm, a principle or a source code, not a binary unsure.gif sad.gif

edit: oops I didn't make the link with the previous sentence, sorry...

This post has been edited by robUx4: Sep 15 2003, 12:59


--------------------
http://www.matroska.org/ : the best vapourware / http://robux4.blogspot.com/
Go to the top of the page
+Quote Post
robUx4
post Sep 15 2003, 13:17
Post #7


Matroska Developer


Group: Developer (Donating)
Posts: 410
Joined: 14-March 02
From: Paris
Member No.: 1519



QUOTE (andy5998 @ Sep 15 2003, 11:33 AM)
There is a discussion (by me) at
http://www.seventhstring.demon.co.uk/xscri...e/slowdown.html
though I don't make source code available.

Very good explanations, thanx !


--------------------
http://www.matroska.org/ : the best vapourware / http://robux4.blogspot.com/
Go to the top of the page
+Quote Post
M
post Sep 15 2003, 13:20
Post #8





Group: Members
Posts: 964
Joined: 29-December 01
Member No.: 830



You should also be able to do this with a combination of switches in SoX.

- M.
Go to the top of the page
+Quote Post
kode54
post Sep 15 2003, 13:21
Post #9





Group: Admin
Posts: 4499
Joined: 15-December 02
Member No.: 4082



QUOTE (robUx4 @ Sep 15 2003, 04:58 AM)
Also what I need is either an algorithm, a principle or a source code, not a binary  unsure.gif  sad.gif

SoundTouch library is available as source code, and also includes examples. If you would prefer my DSP component as an example, the source code is available from my page.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th April 2014 - 03:00