[mythtv] [PATCH] time stretch with libsoundtouch

Jesper Sörensen jesper at datapartner.se
Tue Nov 2 10:33:07 UTC 2004

Ed Wildgoose wrote:

>> yes it does do sample rate conversion too. however I dont know how 
>> well it
>> does the job and at what conversion ratios.
>> It also does pitch adjustment too. i.e. increase the pitch of a voice by
>> semitones.
>> it can also measure beats per minute. I dont think we need this 
>> though. may
>> be useful for mythmusic.
>> another use would be to listen to a radio program at high speed.
>> Ill generate a patch and call the library libmythsoundtouch. I hope 
>> this is
> Libsamplerate is considered to be one of the best quality convertors 
> around.  It can also drop down to lower cpu usage modes if needed 
> (patch upcoming when I work out how to use the settings interface).  
> Since I am building a very high quality hifi system around myth (plus 
> some advanced DSP) I would prefer to leave in libsamplerate for the 
> time being.

I'm also shooting for pretty high audio quality so if the quality is 
better I'd also like libsamplerate to stay. Tempo-changing would be 
*very* cool though, but maybe it's a bit heavy on the CPU and the 
latency didn't seem that good. I guess a setting or a compile option 
would be in place, perhaps with a fallback to libsamplerate for speed 
change if one doesn't want to use soundtouch?

I haven't tried Mark's patch yet but I'm planning to. Anyone know how 
much one can "bend" the audio without the chipmunk effect getting too 
bad? I'm thinking that a couple of percent change in speed wouldn't 
affect the pitch that much. I've been planning to try and reimplement 
the audio warp for the AV sync using either libsoundtouch or 
libsamplerate, but I don't know when I'll find the time. I want to take 
another look at the Alsa code first and fiddle with the DVB patch.

More information about the mythtv-dev mailing list