Aaron wrote:

> in the archival field and I certainly do not have the hard science
> background that many of you have but I can tell you from a modern
> recording perspective that things like "time compression and
> expansion functions" are almost never employed in modern sessions
> because despite what the math may indicate there are very ugly and
> noticeable artifacts that emerge from these algorithms.

Resampling (and pitch correction) can be done with effectively zero
impact on the sound, *if* the tool is designed properly. That's what
I showed using the Stanford article as a reference. Now, whether the
resampling/pitch-correction tools commonly found in sound editing
software (such as Sound Forge, CEP, etc.) are up to it, that certainly
is debatable, and I'd like to know myself. The referenced Stanford
paper actually gives a code to do the resampling, which I presume will
be very good.

It would not surprise me if the high-end sound editing software, such
as Sonic Solutions, uses a very good resampling algorithm, which will
give essentially perfect results (perfect within the round-off errors
associated with integer sampling.)

> Another question which this thread raises is the question of
> re-sampling. Perhaps I am using the term incorrectly, but every time
> I have ever re-sampled something it was to obtain a different timbral
> quality. A common example of this would be that if I sampled a vamp
> played on a Fender Rhodes electric piano, at 16 bit depth, but upon
> repeated listening it was apparent that the overall texture was too
> "modern" and too "clean" for the song in question, I would re-sample
> the part at 8 bit resolution. This immediately produces more "grain"
> because now half the number of samples are being used to replicate
> the same sound. However unless I am radically mistaken this
> down-sampling did not shorten (or extend )the sample from a time
> perspective.

Hmmm, you aren't resampling -- resampling is changing the number of
samples per unit time used to represent the audio signal.

However, each sample is represented by an integer number, and 8-bit
means the allowed numbers to represent energy/amplitude are much
smaller (-128 to +128, 256 numbers), while 16-bit gives a much "finer"
range (-32768 to +32768, 65536 numbers.) The problem is that audio is,
as you noted, analog, while integers are "discrete". Thus, when one
samples a signal at any point, one has to assign it a discrete integer,
and round up/down accordingly, while in actuality the exact value will
lie somewhere inbetween the adjacent integers. This "roundoff"
introduces a sampling error. As one goes to higher bit depth, the
ratio of the sampling error to the full range of integers continues to
get smaller and smaller, and quite dramatically. Thus higher bit depth
samples will more closely "zero-in" on the exact value.

Let's do some simple arithmetic. Supposing the value of the sample
should be exactly in the middle between two integers. This is a max
error of 0.5. In 8-bit, the fractional error is 0.5/256 or about 0.002
(0.2%), while in 16-bit, the error ratio is 0.5/65536 or about .000008
(0.0008%). And if one uses 24-bit size samples, the fractional error is
0.5/16777216 or about .00000003 (.000003%). The larger this error ratio
(that is, going to lower bit depth), the more distortion is introduced
into the signal -- deviations in the wave path will alter the sound, as
you have noticed -- the "graininess" you observe.

> Consequently, while re-sampling is fine to achieve a desired timbral
> change in an instrument or voice I have never heard a temporal
> dilation device that did not produce artifacts which in all candor
> render the results virtually unusable in a pop recording context.

Professional sound engineers resample all the time, say from 48k to
44.1k "Red Book", and don't seem to have a problem with it. It no
doubt depends on if the tool does it right (as the Stanford paper
covers) or if the tool cuts corners and does a low-order interpolation
(which will likely introduce noticeable artifacts.) You probably have
experienced the artifacts from "cheap" tools.

(Pitch correction is done simply by resampling to a different sample
rate, and then "stretching" or "compressing" the samples in the time
domain back to the original sampling rate -- it's essentially a
bookkeeping operation after the actual resampling is done.)

Jon Noring