
August 7th 05, 06:58 PM
posted to uk.rec.audio
|
|
Audio resampler quality
On Sun, 07 Aug 2005 16:04:45 GMT, "DAB sounds worse than FM"
wrote:
Chris Isbell wrote:
BTW: My main use is for converting 48kHz DVB transport streams to
44.1kHz so that I can burn CDs of radio programs to listen to in the
car. (It's the engineer's version of pod casting. ;-)
What method do you use? I do the following:
ProjectX to get the audio from the transport stream, then play the MP2
file in Winamp with the output plug-in set to Nullsoft Disk Writer (set
to produce 16-bit / 44.1 kHz).
I also use ProjectX for the audio extraction, followed by Audacity
under Linux, using its LAME plug in to import the file. Once in
Audacity, I resample the who lot down from 48ksps to 44.1.ksps and
export as a RIFF (.wav) file. Finally, I re-import the resampled file
into a new Audacity project, divide this into tracks and export these
as individual RIFF files, burning them onto CD using K3b (removing the
default two-second gap between tracks that K3b adds by default).
The reason for the import/export into Audacity is that there is a bug
in the program where it incorrectly divides the recording into tracks
when also performing sample rate conversion. (A few seconds of the
previous track appear at the start of all tracks except the first.)
It is complex, but much less complex than producing a DVD from a
television transport stream. :-(
--
Chris Isbell
Southampton, UK
|

August 7th 05, 08:18 PM
posted to uk.rec.audio
|
|
Audio resampler quality
On 2005-08-07, Chris Isbell wrote:
On 07 Aug 2005 08:34:57 GMT, John Phillips
wrote:
When I looked that seemed to test sound cards, not resampling software.
Also it seems to be Windows-only - I couldn't find a version for Linux
(which is what I run here). Perhaps I didn't look hard enough?
I assume that you have looked into Audacity
(http://audacity.sourceforge.net/). This seems to cover sample rate
conversion fairly well (apart from a bug when splitting into tracks at
the same time as performing sample rate conversion). It runs nicely
under Linux.
Yes. The web page I put up with some frequency response results (URL
in earlier article) contains a couple of Audacity screen shots.
Since this is what I use, I would be interested in your comments.
I have looked at Audacity's 48 - 44.1 kHz re-sampling in the frequency
domain. It has good but not exceptional bandwidth, with -3 dB coming at
about 19.2 kHz (87% of Nyquist). The aliasing looks moderate at circa
-44.3 dBFS peak (ref a -1 dBFS peak signal. That's far from perfect but
will be inaudible in this case anyway. The advantage is that it's very
quick and it seems good for its speed (although I am very much still
learning about re-samplers so my opinion may not be reliable).
So there's nothing I can see wrong with Audacity for this re-sampling
application.
I did find a circa 2002 thread on the Audacity developers' mailing
list where it looks like the author chose resample-1.7 as the basis for
Audacity's resampler. He gets much better performance than the stock
resample-1.7 - presumably because he customised resample's filter.
--
John Phillips
|

August 7th 05, 08:36 PM
posted to uk.rec.audio
|
|
Audio resampler quality
On 2005-08-07, Jim Lesurf wrote:
In article , John Phillips
wrote:
... A preliminary comparison is available at
http://www.mainly.me.uk/resampling/.
I'd suggest you also check with some other 'traditional' test waveforms
like two HF components or an HF+LF component and look for anharmonic
products. The results may depend on the precise time-period relationship
with the details of the resampling and sampling periods.
I can generate the waveforms but I am currently learning how to use
octave as a spectrum analyser (perhaps there's another way?) so it may
be a little time before I can do that.
--
John Phillips
|

August 8th 05, 05:40 AM
posted to uk.rec.audio
|
|
Audio resampler quality
On 2005-08-07, Jim Lesurf wrote:
In article , John Phillips
wrote:
On 2005-08-06, Jim Lesurf wrote:
[snip]
... A preliminary comparison is available at
http://www.mainly.me.uk/resampling/.
...
The input to each of the six resamplers is a frequency sweep of 1 kHz/s
from 0 to 23.999 kHz so the "seconds" scale at the top may be read as
"kHz".
The top response and the bottom two show considerable output from inputs
above 22.05 kHz. I assume that's aliasing ...
Your assumption is probably correct, but *might* not be. The snag is that
this depends on how the resampling is done. If done 'incorrectly' there may
be anharmonic artifacts at frequencies other than the simple primary alias
value. For example, due to incorrect forms of 'interpolation' over a range
of input samples which is too short to give satisfactory results. The most
probable effect is, therefore, aliasing at quite high frequencies, but
there is a risk of lower frequency products, particularly if the input is
more complex than a sinewave as other intermod products may be created.
An example (190kbyte GIF): http://www.mainly.me.uk/resampling/alias.gif
The image is of two 512-point FFT spectrograms (made by Audacity) of
1. The frequency sweep input (100 Hz/second, 48 kHz sampled).
2. The re-sampled output from "resample-1.7" (44.1 kHz sampled).
Input frequency is on the horizontal, time axis (100 Hz/s) output spectrum
is on the vertical axis.
I think the descending peak in the lower spectrogram, starting at 220.5
seconds (3'40.5'', 22.05 kHz input) and ending at 240 seconds (4'00'',
24 kHz input, 20.1 kHz output), is clearly aliasing.
However, the peak running below and parallel to the sweep is
interesting. At an input frequency of, say, 21 kHz (time = 3'30'') there
should be no aliasing from the resampler (I think). However there is a
peak on the output at about 17 kHz as well as the expected peak at 21 kHz.
Is this aliasing or another anharmonic artefact?
It's almost as if the 21 kHz input is aliased (mirrored) around 24 kHz
to somehow give 27 kHz, which is then aliased (mirrored) around 22.05
kHz to give 17.1 kHz. Could that happen with aliasing on an upsampling
stage before downsampling? If so, I suspect aliasing from a resampler
could be more complex than I first thought.
--
John Phillips
|

August 8th 05, 08:48 AM
posted to uk.rec.audio
|
|
Audio resampler quality
In article , John Phillips
wrote:
On 2005-08-07, Jim Lesurf wrote:
In article , John Phillips
wrote:
... A preliminary comparison is available at
http://www.mainly.me.uk/resampling/.
I'd suggest you also check with some other 'traditional' test
waveforms like two HF components or an HF+LF component and look for
anharmonic products. The results may depend on the precise time-period
relationship with the details of the resampling and sampling periods.
I can generate the waveforms but I am currently learning how to use
octave as a spectrum analyser (perhaps there's another way?) so it may
be a little time before I can do that.
The way I use is to swipe code from somewhere like "Numerical Recipes in C"
.... :-)
FWIW The book has a series of FFT recipies that work quite nicely. I use
one of these, then display the results.
I'll agree that I am terribly 'old fashioned' in my approach, though... My
only real concession to 'modernity' is that I now rarely use "Numerical
Recipies in FORTRAN"... :-)
Slainte,
Jim
--
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Audio Misc http://www.st-and.demon.co.uk/AudioMisc/index.html
Armstrong Audio http://www.st-and.demon.co.uk/Audio/armstrong.html
Barbirolli Soc. http://www.st-and.demon.co.uk/JBSoc/JBSoc.html
|

August 8th 05, 09:06 AM
posted to uk.rec.audio
|
|
Audio resampler quality
In article , John Phillips
wrote:
On 2005-08-07, Jim Lesurf wrote:
[snip]
An example (190kbyte GIF): http://www.mainly.me.uk/resampling/alias.gif
Not yet had a chance to look at the above, but hope to do so later today.
The image is of two 512-point FFT spectrograms (made by Audacity) of 1.
The frequency sweep input (100 Hz/second, 48 kHz sampled). 2. The
re-sampled output from "resample-1.7" (44.1 kHz sampled).
FWIW I would personally tend to regard 512 points to be rather a small time
interval if you want detailed results. When doing analysis myself I tend to
prefer 8k - 64k ranges. 512 points may give poor resolution and be ridden
with end-effect or Gibbs oscillations, depending on the windowing
(apodizing).
[snip]
However, the peak running below and parallel to the sweep is
interesting. At an input frequency of, say, 21 kHz (time = 3'30'') there
should be no aliasing from the resampler (I think). However there is a
peak on the output at about 17 kHz as well as the expected peak at 21
kHz.
Is this aliasing or another anharmonic artefact?
Not sure. Need to look at the spectrum. Also, ideally, need to know
exactly how both the conversion and the 'spectrum' are produced. Might be
some other problem.
It's almost as if the 21 kHz input is aliased (mirrored) around 24 kHz
to somehow give 27 kHz, which is then aliased (mirrored) around 22.05
kHz to give 17.1 kHz. Could that happen with aliasing on an upsampling
stage before downsampling? If so, I suspect aliasing from a resampler
could be more complex than I first thought.
In principle you can get:
1) Spurious output at almost any integer relationship fout = m*fsig +/-
m*fsample1 +/- k*fsample2. Pick and mix your own values for m,n,k... :-)
The reason being that sampling/resampling are essentially like
phase-coherent multipliers or mixers.
2) Can also get 'end effects' if the resampling method uses a finite range.
(Which is hard to avoid in reality.) This is a result of how input values
come 'in and out of scope' of the process that works out the output
values. This can affect the relative sizes of components produced by (1).
Done 'correctly' no such problems will arise. But 'correctly' may be
impractical. In principle, each individual output point can be computed
from using *all* the input points with a sinc weighting. However doing this
for every individual output point (or FFTing the entire set in a oner to do
this in parallel!) may be slow or 'difficult' on most computers :-)
Hence in practice, once you get large data series, we have to use methods
that are 'good enough'.
Slainte,
Jim
--
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Audio Misc http://www.st-and.demon.co.uk/AudioMisc/index.html
Armstrong Audio http://www.st-and.demon.co.uk/Audio/armstrong.html
Barbirolli Soc. http://www.st-and.demon.co.uk/JBSoc/JBSoc.html
|

August 8th 05, 01:06 PM
posted to uk.rec.audio
|
|
Audio resampler quality
On 2005-08-08, Arny Krueger wrote:
"John Phillips" wrote
in message
On 2005-08-06, Arny Krueger wrote:
That would be a signal-to-noise test. Not the same as a
dynamic range test.
Presumably also useful to know in re a resampler?
Could you clarify with an example? Is the issue the
noise floor from rejected inputs 22.05 kHz?
Something like that.
The classic test for dynamic range is to measure pass a
clean -60 dB signal at say 1 KHz, null or notch it out, and
measure whatever is left over.
OK ...
You also missed a free, easy-to-use tool, the Audio
Rightmark.
Also it seems to be Windows-only ...
Perhaps you ought to retain some capability to be
mainstream.
I do (and I do have RMAA 5.5 installed - still trying to find out how
some bits work) but I do like to be able to look "under the hood" for
some certainty about how things operate.
--
John Phillips
|

August 8th 05, 03:59 PM
posted to uk.rec.audio
|
|
Audio resampler quality
"John Phillips" wrote
in message
On 2005-08-08, Arny Krueger wrote:
"John Phillips" wrote
in message
On 2005-08-06, Arny Krueger wrote:
That would be a signal-to-noise test. Not the same as a
dynamic range test.
Presumably also useful to know in re a resampler?
Yes. Adding excessive background noise is one of those
things that a resampler could do.
Could you clarify with an example? Is the issue the
noise floor from rejected inputs 22.05 kHz?
Something like that.
The classic test for dynamic range is to measure pass a
clean -60 dB signal at say 1 KHz, null or notch it out,
and measure whatever is left over.
OK ...
You also missed a free, easy-to-use tool, the Audio
Rightmark.
Also it seems to be Windows-only ...
Perhaps you ought to retain some capability to be
mainstream.
I do (and I do have RMAA 5.5 installed - still trying to
find out how some bits work) but I do like to be able to
look "under the hood" for some certainty about how things
operate.
In the case of RMA 5.5 and earliser versions, a total
suspension of disbelief is not indicated. However, it does
provide a very thorough quick test. If you have any specific
questions, I might be able to help.
|
Thread Tools |
|
Display Modes |
Linear Mode
|
|