[linux-audio-user] Resampling Audio Libraries & Sinc Resamplers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Part 1 of (maybe) 3

Some time ago, a question was asked on LAU regarding resampling of an 
audio library. 

I strongly recommend the following, assuming that you decide to 
resample (and that's your call, not anyone else's):

If you can at all avoid it, *don't* use sinc resamplers (for example, 
sndfile-resample and resample-1.7) for bulk rate conversions at 
constant rates, especially for resampling something of great value 
such as an audio library which you plan to use over and over again on 
future projects.    

To be most certain you've got a good library at the new sample rate, 
re-record the original sources or purchase a competently produced 
new library. 

------------------------

In answering this question about resampling an entire audio library, 
Steve Harris (prolific author of LADSPA plugins for which we are all 
grateful) posted: "I would say that a high quality sinc resampler will 
be the best quality."

Upon contacting Steve and exchanging several emails, it became clear 
that Steve was actually talking about the theoretically ideal case, 
not about the algorithm developed and described by Julius O. Smith III 
of CCRMA and implemented in such codes as sndfile-resample and 
resample-1.7.  Steve says he doesn't have enough experience with these 
programs to either agree or disagree with claims made about them.

For many readers, "sinc resamplers" probably does refer to these 
programs, so I think it's important to attempt once again to put them 
into perspective:

Julius O. Smith III of CCRMA, in his PDF document describing a sinc-
function based algorithm in detail, himself mentioned the suitability 
of this particular algorithm for situations wherein the sampling rate 
was *changing* and *arbitrary* such as audio scrubbing, a real-time 
application of resampling.  Resampling an audio library is an 
application of *bulk conversion* to a *fixed sample rate* and is very 
different, therefore, as is easily arguable, an unsuitable application 
for Smith's algorithm, therefore unsuitable for sndfile-resample and 
resample-1.7.

I may demonstrate some problems with bulk conversions later such as I 
did for Steve, but first should point out that anyone who is familiar 
with Fourier analysis and synthesis should appreciate immediately why 
this is the case upon reading Smith's description of the algorithm: As 
described in [1] it utilizes very small, comparatively infinitesimal 
windows (compared to the infinite signals of the Sampling Theorem) and 
is of order n squared.  For someone with the proper education and/or 
experience, this is really 


*all that is necessary to know*


to predict problems with speed or accuracy --- or both of these.


------------------------

Reference

[1] Julius Orion Smith III.  Digital Audio Resampling Home Page.  
http://www-ccrma.stanford.edu/~jos/resample/. This reference cites 
(after reordering author/title): J. O. Smith and P. Gossett.  Flexible 
Sampling-Rate Conversion Method.  In Proceedings of the IEEE 
International Conference on Acoustics, Speech, and Signal Processing, 
March 1984 (ICASSP-84), Volume II, pp. 19.4.1-19.4.2, IEEE Press.  
Note the word "flexible."




[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux