[linux-audio-dev] jack_process and pitch-shifting

Erik de Castro Lopo erikd-lad at mega-nerd.com
Fri Apr 22 20:44:53 UTC 2005


On Fri, 22 Apr 2005 19:48:47 +0200
Olivier Guilyardi <ml at xung.org> wrote:

> About vary speed : I could use libsoundtouch instead of libsamplerate, 
> but I'm not sure the former can compare to the later's quality.

Last time I looked, libsoundtouch used linear interpolation for
doing vary speed. Linear interpolation is evil. Here is a table
from a talk I presented a the audio minconf attached the LCA.

The table is for doing linear interpolation for sample rate
converting from 44100 to 48000. The signal is a single sine wave
at the frequencies in the left column. The right column is the
measured signal to noise ratio at the output:


	333 Hz		&		146.0 dB	\\
	666 Hz		&		115.8 dB	\\
	1332 Hz		&		103.8 dB	\\
	2664 Hz		&		49.8 dB		\\
	5328 Hz		&		38.7 dB		\\
	10656 Hz	&		28.4 dB		\\
	21312 Hz	&		19.5 dB		\\

Linear interpolation is simply no damn good unless you are *positive*
the maximum frequency in your source material is less that 0.06 of
the sample rate. For any real world signal, this is simply not the 
case.

Secondly, I think the pitch shifter in libsoundtouch works by doing
time stretching first and then vary speed on top of that (someone
please correct me if I am wrong). In this is the case, it might be
possible to replace the second vary speed stage with the vary
speed from libsamplerate.

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  nospam at mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"Windows was created to keep stupid people away from UNIX."
  -- Tom Christiansen



More information about the Linux-audio-dev mailing list