Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Resampling down to 44.1KHz (Read 74247 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Resampling down to 44.1KHz

Having accepted that a well dithered 24-bit source (at least at 44.1KHz or above) appears to sound the same at 16 bits (at ordinary listening levels), I am now focussing my energies on the sample rate question: is 44.1KHz a sufficient sampling rate?

As part of that exercise, I am uploading three versions of a sound file.  These three versions are the result of converting a short 96/24 original sound file (of a triangle being struck) to 44.1/32:-

Audition version: [attachment=4441:attachment]
Cooledit version: [attachment=4442:attachment]
R8brain version:  [attachment=4444:attachment]


If anyone is interested in my amateur comments about these files, the relevant thread is Hydrogenaudio Forum > General Audio > The Emperor's New Sample Rate, MIX magazine wonders if "maybe CD is good enough", at post  #72.

EDIT: On reflection I am now suggesting that discussion on this topic is perhaps a bit specialised and might be better suited to this thread.  However please note there are already some relevant comments in the Emperor's New sample Rate thread.

Resampling down to 44.1KHz

Reply #1
is 44.1KHz a sufficient sampling rate?

Yes, it is. You're able to precisely describe any wafeform content between 0 and 22049 Hz which is, in most cases, more than you can hear or audio equipment can reproduce.
There is, however, a problem with converters using such sampling rate as their analog low-pass filter under the Nyquist frequency needs to be very precise and steep so it doesn't attenuate/phase-distort the 18-22 kHz range much and, at the same time, silences anything above 22kHz (even more crucial for ADCs).
Perhaps this is what caused CD players to be deemed "not good enough", people sometimes complaining about unnatural trebles (compared to vinyl). 16 bits of resolution might be another issue for very dynamic (e.g. orchestral) music, where quiet passages are getting only a few bits of resolution.
If you have content recorded using 96/192 kHz, the problem with converters is much better to handle (you need to have a decent analog lowpass filter with transition band between, say, 25kHz and 48/96kHz, which is likely to distort the audible signal much less than the one with 21kHz to 22kHz transition).
If you use a good quality downsampling algorithm, you should retain all the relevant audio information even at the 44kHz rate. There is, however, the caveat of playing it through a native 44 kHz DAC, which might degrade it (as mentioned above).
Most contemporary soundcards have DACs with native rate of 96 or 192 kHz and anything other than this gets digitally resampled to such rate. So there is a question why to downsample anything to 44 kHz when it is likely to get upsampled upon playback... Just to eliminate redundant information and save space?

Resampling down to 44.1KHz

Reply #2
Martel, thx for your comments.
So there is a question why to downsample anything to 44 kHz when it is likely to get upsampled upon playback...

One reason is to test the quality of the traditional CD format. If we are to compare the audio transparency of a traditional 44.1KHz sampling rate with say a 48KHz sampling rate, then one approach is to start with a very high bit-rate clip (say 192Khz) and downsample it to 48KHz and 44.1Khz and compare the two conversions.

However I have realized that before attempting such an exercise we must be satisfied that the filtering necessary to avoid aliasing in a conversion to 44.1KHz is not of itself so derimental to the sound quality that it would mask any difference due solely to any alleged insufficiency of 44.1Khz as a sample rate.

It has dawned on me that a useful testing process could be as follows:-
  • Do not convert the clip but leave it at a high bit rate.
  • Subject the clip to a specialised low pass filter of sufficient strength to be used as a pre-filter for a conversion to 44.1KHz (i.e. can sufficiently minimize aliasing, but not unduly limit frequencies that lie near the Nyquist limit).
  • ABX the original clip and the version of the clip after it has been filtered, but do so still at the original sample rate.
  • If and only if a low pass filter can be found that does not cause an audible change, then proceed to actually convert the file to 44.1Khz using the tested low pass filter as the pre-filter.
I imagine this exercise of evaluating the performance of specialised low pass filters has been attempted in the past.  However I have not stumbled upon the results.

I would like to be compare the struck triangle 96/24 clip against the same clip after it has been subjected to a specialised digital low pass filter designed for use as a prefilter for a downsampling to 44.1Khz.


I ask:

[blockquote]A.  If a low pass filter has been identified with exceptionally good performance as a prefilter for a conversion to 44.1KHz, is it available as a plug-in, or as standalone software? [Or is the digital filter in Audition 3 about as good as it gets?]

B. If capturing analogue audio at 44.1Khz, are analogue pre-filters available that outperform the best digital filters that might be used in a downsampling as referred to in question A?[/blockquote]

Resampling down to 44.1KHz

Reply #3
[blockquote]A.  If a low pass filter has been identified with exceptionally good performance as a prefilter for a conversion to 44.1KHz, is it available as a plug-in, or as standalone software? [Or is the digital filter in Audition 3 about as good as it gets?]

Filtering in Audition will probably be OK. Don't be tempted to make the filter too steep - a transition band from 20kHz to 22kHz is probably fine. Be careful of the "group delay" when ABXing though - depending on what Audition does, one sample might be delayed. Zoom in and look - if it's only by a couple of samples it should be fine.

B. If capturing analogue audio at 44.1Khz, are analogue pre-filters available that outperform the best digital filters that might be used in a digital to digital downsampling as referred to in question A?[/blockquote]
No, digital filters are better than analogue filters in nearly all non-realtime cases. In fact, you can convert filter designs between analogue and digital and vice versa. Having said that, many ADCs include digital fiters anyway - due to their use of dela-sigma designs.

Resampling down to 44.1KHz

Reply #4
B. If capturing analogue audio at 44.1Khz, are analogue pre-filters available that outperform the best digital filters that might be used in a downsampling as referred to in question A?
Please don't be offended, because it's a fascinating exercise, but the fact that you can even ask this question shows that you have terrifyingly little knowledge in the area, and haven't read much about it here, or elsewhere.

No one samples at 44.1kHz. They sample at many times this, then filter and downsample digitally - precisely because analogue filters are so pitiful (in this application) compared to digital. All but the worst ADCs and DACs are oversampled.

Hope this helps.

Now, have you see the FAQ?

Cheers,
David.

Resampling down to 44.1KHz

Reply #5
[No one samples at 44.1kHz. They sample at many times this, then filter and downsample digitally - precisely because analogue filters are so pitiful (in this application) compared to digital. All but the worst ADCs and DACs are oversampled.

I daresay early sound cards did sample at 44.1KHz, and I recall early CD players did not use oversampling.  However what you have written emphasizes the importance of the filtering involved in downsampling.  It is nowadays what a direct capture of audio at 44.1Khz will involve as part of the capture process.

Resampling down to 44.1KHz

Reply #6
A.  If a low pass filter has been identified with exceptionally good performance as a prefilter for a conversion to 44.1KHz, is it available as a plug-in, or as standalone software? [Or is the digital filter in Audition 3 about as good as it gets?]


A comparison of some SRCs (96 -> 44.1) is available on http://src.infinitewave.ca/. But there's only Audition 2, not 3. Anyway, "Adobe Audition 2 Pre/Post Filter" graphs look good enough.

Resampling down to 44.1KHz

Reply #7
Thanks Ivqcl.  The graphs look fine.  However I wonder what the performance sounds like to the human ear.


Can people so inclined please try  to ABX the three files I upoaded at post #1?

I would have thought that the very best conversions to 44.1KHz would all sound the same as they would introduce negligible phase shifts, and negiligible drop-off in frequency response in the audible range.  (Last night I tested my own hearing of sinewave tones and was able to hear up to 19.5KHz but that frequency was very very faint.)

One of our issues is that 44.1Khz may not be well implemented in some devices as it is being supplanted by 48KHz and 96Khz.  If anyone does get a positive ABX result (or a negative result for that matter) could they please describe what device they used for the digital to analogue playback, e.g. PC motherboard sound chip, sound card, audio video receiver; and whether using speakers or headphones?

Resampling down to 44.1KHz

Reply #8
The original triangle file has a problem, and it is that it has too a short silence before the actual sound begins. I have generated a version with this issue corrected.

Also, in order to have a better knowledge of what is going on, I have generated versions of this file lowpassed at different frequencies.

MLXXX, could to try to ABX the unfiltered file versus the lowpassed ones? The lowpassed ones have a suffix that goes from l1 to l4.

Edit: the applied lowpasses are:

triangleMod_2_2496_l1.flac : 46 KHz lowpass
triangleMod_2_2496_l2.flac : 30 KHz lowpass
triangleMod_2_2496_l3.flac : 26 KHz lowpass
triangleMod_2_2496_l4.flac : 21 KHz lowpass

The lowpass takes 2.5 KHz approx. For example, in case of the 21 KHz lowpass, it is -0.1 dB at 19950 Hz and -90 dB at 22600 Hz.

Resampling down to 44.1KHz

Reply #9
Will be pleased to do that Kike, but may be 24 hours before I get the opportunity to post here again. Cheers

EDIT: Couldn't resist a quick check using my AVR on your original vs 1 and your original vs 4. Dead easy.  Stereo image moves to the left with the non-original versions.

Resampling down to 44.1KHz

Reply #10
I have no suggestions about what the Current Creative cards do sound wise, but my understanding is that they all resample everything to 48kHz, except for those with a playback 96kHz bypass option (Creative has been blatantly lying about their cards for years. Now that they lost a lawsuit over the issue, they do reveal the truth -- as indirectly as possible in the small print). I don’t know if this 96kHz thing has to be specially chosen or if one gets it automatically when playing a 96kHz file. Regardless, using an Audigy card that does such “mechanical” manipulations to most, or all, the audio passing through it seems a rather poor way to investigate what good software does with different sample rates.

I would suggest you need a card that isn’t oriented to gaming and multi-media needs. There are scores of them but of course money is involved.

Resampling down to 44.1KHz

Reply #11
This really must be my last post for now!

My AVR is a Yamaha HTR-5750.  Would its DAC perform ok at 44.1KHz (fed from a pc running Vista) for the purpose of comparing the three files?

Alternatively if I burned a CD I could play it on a CD player.  Could a CD player be expected to perform sufficently well to compare the three files [e.g. Denon DCM-370]?  Presumably I'd dither down to 16 bits.

Resampling down to 44.1KHz

Reply #12
This really must be my last post for now!

My AVR is a Yamaha HTR-5750.  Would its DAC perform ok at 44.1KHz (fed from a pc running Vista) for the purpose of comparing the three files?

Alternatively if I burned a CD I could play it on a CD player.  Could a CD player be expected to perform sufficently well to compare the three files [e.g. Denon DCM-370]?  Presumably I'd dither down to 16 bits.

Why do you need a REAL proof? You probably cannot provide fair enough conditions for such test.
First - you need a high-quality downsampling algorithm (which uses a steep filter with linear phase/constant group delay), are you sure you can get this? If you cannot, do not bother.
Second - you need a high-quality upsampling algorithm, this algorithm should be a part of the device you're going to use for playback (since the device will probably have 96/192 kHz DACs and must resample). Or you may manually upsample the 44kHz downsampled track to device's native sampling rate and hope it won't use its built-in (and possibly degrading) resampling algorithm. Are you sure you have this? If not, don't bother.
Third - you need exactly the same equipment for comparison. Otherwise, you will be comparing two pieces of hardware instead of the samples.
And last but not least - you have to realize under what paradigm you are going to compare. Theoretically, the 44kHz wafeform is able to perfectly describe any content between 0 and 22050 (excluded) Hz. You're not likely to hear anything above 22kHz, so 44kHz sampling rate should be perfectly OK for you. If you think about hardware limits, then the suitability of 44kHz depends on how good equipment you're able to get. If your hardware contains lame resampler/DAC then 96kHz is likely to offer better results for you.

Resampling down to 44.1KHz

Reply #13
It sounds like you are confusing resampling with oversamling. Soundcards do not resample to 96 kHz, or any other high frequency. Resampling involves recalculating all sample values. DACS oversample, usually by much larger amounts (e.g. 128x to 5.6 MHZ) which means interpolating additional values between the original samples, without changing the original values, shifting the alias images to a very high frequency range.

Resampling down to 44.1KHz

Reply #14
Kike,
Thanks for preparing and uploading these files.

MLXXX, could to try to ABX the unfiltered file versus the lowpassed ones? The lowpassed ones have a suffix that goes from l1 to l4.

The lowpassed files all sounded quite different to the original file.  They were not as loud, and appeared to emanate more from the left.  (This was either with the high-definition sound chip of my HTPC, or with the DAC of my AVR, and using loudspeakers.)

I have not looked at the spectra of the files.  I have simply ABXd them.

I whipped through the 4 tests quite quickly in one sitting, with 40 out of 40 correct:-

foo_abx 1.3.1 report
foobar2000 v0.9.5.1
2008/05/08 19:10:52

File A: C:\Users\Public\Downloads\DownloadsfromHA\triangleMod_2_2496.flac
File B: C:\Users\Public\Downloads\DownloadsfromHA\triangleMod_2_2496_l1.flac

19:10:52 : Test started.
19:11:26 : 01/01  50.0%
19:11:35 : 02/02  25.0%
19:11:43 : 03/03  12.5%
19:11:51 : 04/04  6.3%
19:11:59 : 05/05  3.1%
19:12:06 : 06/06  1.6%
19:12:13 : 07/07  0.8%
19:12:21 : 08/08  0.4%
19:12:28 : 09/09  0.2%
19:12:35 : 10/10  0.1%
19:12:38 : Test finished.

----------
Total: 10/10 (0.1%)

foo_abx 1.3.1 report
foobar2000 v0.9.5.1
2008/05/08 19:13:23

File A: C:\Users\Public\Downloads\DownloadsfromHA\triangleMod_2_2496.flac
File B: C:\Users\Public\Downloads\DownloadsfromHA\triangleMod_2_2496_l2.flac

19:13:23 : Test started.
19:13:40 : 01/01  50.0%
19:13:48 : 02/02  25.0%
19:13:56 : 03/03  12.5%
19:14:02 : 04/04  6.3%
19:14:08 : 05/05  3.1%
19:14:13 : 06/06  1.6%
19:14:20 : 07/07  0.8%
19:14:26 : 08/08  0.4%
19:14:33 : 09/09  0.2%
19:14:47 : 10/10  0.1%
19:14:49 : Test finished.

----------
Total: 10/10 (0.1%)

foo_abx 1.3.1 report
foobar2000 v0.9.5.1
2008/05/08 19:15:19

File A: C:\Users\Public\Downloads\DownloadsfromHA\triangleMod_2_2496.flac
File B: C:\Users\Public\Downloads\DownloadsfromHA\triangleMod_2_2496_l3.flac

19:15:19 : Test started.
19:15:52 : 01/01  50.0%
19:16:02 : 02/02  25.0%
19:16:11 : 03/03  12.5%
19:16:15 : 04/04  6.3%
19:16:23 : 05/05  3.1%
19:16:28 : 06/06  1.6%
19:16:33 : 07/07  0.8%
19:16:38 : 08/08  0.4%
19:16:43 : 09/09  0.2%
19:16:50 : 10/10  0.1%
19:16:52 : Test finished.

----------
Total: 10/10 (0.1%)

foo_abx 1.3.1 report
foobar2000 v0.9.5.1
2008/05/08 19:17:25

File A: C:\Users\Public\Downloads\DownloadsfromHA\triangleMod_2_2496.flac
File B: C:\Users\Public\Downloads\DownloadsfromHA\triangleMod_2_2496_l4.flac

19:17:25 : Test started.
19:17:45 : 01/01  50.0%
19:17:50 : 02/02  25.0%
19:17:54 : 03/03  12.5%
19:18:01 : 04/04  6.3%
19:18:07 : 05/05  3.1%
19:18:12 : 06/06  1.6%
19:18:18 : 07/07  0.8%
19:18:24 : 08/08  0.4%
19:18:29 : 09/09  0.2%
19:18:41 : 10/10  0.1%
19:18:44 : Test finished.

----------
Total: 10/10 (0.1%)

Resampling down to 44.1KHz

Reply #15
It sounds like you are confusing resampling with oversamling. Soundcards do not resample to 96 kHz, or any other high frequency. Resampling involves recalculating all sample values. DACS oversample, usually by much larger amounts (e.g. 128x to 5.6 MHZ) which means interpolating additional values between the original samples, without changing the original values, shifting the alias images to a very high frequency range.

How's that not resampling?

"Resampling is the digital process of changing the sample rate or dimensions of digital imagery or audio" (Wiki quote I very much agree with)

So, resampling is of course involved in "oversampling ADCs/DACs".


Cheers,
SG

Resampling down to 44.1KHz

Reply #16
[You probably cannot provide fair enough conditions for such test.
First - you need a high-quality downsampling algorithm (which uses a steep filter with linear phase/constant group delay), are you sure you can get this? If you cannot, do not bother.

Indeed, if I cannot find a high quality downsampling algorithm for converting the 96/24 recording to 44.1Khz, without introducing audible diminishment or artifacts as a result of the digital filtering settings, I cannot proceed further.

Resampling down to 44.1KHz

Reply #17
I have uploaded some files to test, MLXXX, which you might find interesting.
  • triangleMod_noise.flac - This is the triangleMod sample with the same energy above 22kHz as the original, but with white noise instead of the signal that was there before.
  • triangleMod_lp1.flac - This is the triangleMod sample with a lowpass filter nominally at 22kHz - the transition band is quite wide, but the filter has very high stopband attenuation.
  • triangleMod_lp2.flac - This is the triangleMod sample with a lowpass filter nominally at 20kHz - the transition band is quite wide, but the filter has very high stopband attenuation.
  • triangleMod_lp_mono.flac - 22kHz lowpass filter, left channel mirrored onto right
  • triangleMod_orig_mono.flac - original, left channel mirrored onto right
The first one is to test a theory of mine about intermodulation distortion (if you wouldn't mind indulging me), the next two are high quality lowpass filters - some ringing but zero group delay and very high stopband attenuation. The next two were included because you reported a change in stereo image caused by lowpass filtering.

Edit: You can actually ignore the two lowpassed samples - they don't have any advantages over the ones KikeG uploaded.

Resampling down to 44.1KHz

Reply #18
MLXXX, I think there is something wrong going on with your audio setup. The first lowpassed sample, triangleMod_2_2496_l1.flac, has been lowpassed just over 45 KHz with a high quality filter (sox filter with a 256 sample window: sox filter 0-46000 256). The files are different only over 45 KHz (they go up to 48 KHz). You can test this by substracting the original and the filtered files.

There is also some pre-ringing before the triangle hit due to the filtering, but it is around 40 samples long (0.4 ms) has a frequency over 45 KHz and a level of around -65 dB, not audible by any means.

Also, I don't think your speakers or headphones can go that high. So the difference is most likely due to something else. Maybe your card is resampling or it is clipping, or there is some strange kind of intermodulation going on. As for intermodulation, I find strange that filtering such a small frequency range, where there is not any exceptionally high energy, causes an audible intermodulation difference into the audible range.

The right channel peaks at -0.47 dB before filtering. After filtering at 45 KHz, it peaks  to -0.68 dB. Maybe the first one is clipping and the second one is not, but this is only speculation.

Resampling down to 44.1KHz

Reply #19
Indeed, if I cannot find a high quality downsampling algorithm for converting the 96/24 recording to 44.1Khz, without introducing audible diminishment or artifacts as a result of the digital filtering settings, I cannot proceed further.


According to infinitewave, SSRC which is freely available as a plugin for Foobar2000 seems pretty much perfect to me. In most graphs it comes pretty close to the white 'ideal' line. I use it to convert 5.1 channel 24bit/96kHz DVD-A rips. Why not give it a try?

Resampling down to 44.1KHz

Reply #20
MLXXX, I think there is something wrong going on with your audio setup. The first lowpassed sample, triangleMod_2_2496_l1.flac, has been lowpassed just over 45 KHz with a high quality filter (sox filter with a 256 sample window: sox filter 0-46000 256). The files are different only over 45 KHz (they go up to 48 KHz). You can test this by substracting the original and the filtered files.

There is also some pre-ringing before the triangle hit due to the filtering, but it is around 40 samples long (0.4 ms) has a frequency over 45 KHz and a level of around -65 dB, not audible by any means.

Also, I don't think your speakers or headphones can go that high. So the difference is most likely due to something else. Maybe your card is resampling or it is clipping, or there is some strange kind of intermodulation going on. As for intermodulation, I find strange that filtering such a small frequency range, where there is not any exceptionally high energy, causes an audible intermodulation difference into the audible range.

The right channel peaks at -0.47 dB before filtering. After filtering at 45 KHz, it peaks  to -0.68 dB. Maybe the first one is clipping and the second one is not, but this is only speculation.


The difference between the reference file and the #4 is clearly audible on my setup. No ABX is needed, but I passed a test 10/10 even without using headphones (I used small powered Genelec desktop monitors).

The biggest difference is already in the beginning of the sample. The immediate sound of the hit on the triangle is very different.

Actually I don't seem to have any tool that could create a transparent 44.1 kHz version or even just a transparent 22 kHz low pass filtered version (without resampling) of the reference file. Resampling and low pass filtering seem to create quite similar audible changes. I tried several tools and filters in Audition 2 and Wavelab 5 and also foobar's SSRC plugin.

I am sure I can't hear anything over 20 kHz. Possibly my limit is about 18 kHz with test signals. So apparently resampling or low-pass filtering this triangle sample causes changes in the audible range -- at least on my setup.

My Terratec DMX6 fire 24/96 sound card does not resample and I used ASIO and Kernel streaming output modes for bypassing Windows Kernel resampling.

For excluding possible software/device problems at certain sample rates I resampled the file to 44.1 and then back to 96 kHz. These two versions sound identical to me (couldn't ABX). For this test I used foobar's SSRC in the Ultra mode.

Something very odd happens with this triangle file.

Resampling down to 44.1KHz

Reply #21
Something very odd happens with this triangle file.
It seems that this triangle sample suffers from an "Intersample Overload". Although the sample values are below maximum, the reconstructed signal is clipping.
This is how the samples (white dots) and the reconstructed waveform look like with Izotope RX:

[attachment=4460:attachment]
This could be considered as a non legitimate signal since it might cause clipping in DA and sample-rate converters.
I'd like to suggest to reduce the level of the triangle sample by 3 (or even 6) dB and redo the tests.

Resampling down to 44.1KHz

Reply #22
It seems that this triangle sample suffers from an "Intersample Overload". Although the sample values are below maximum, the reconstructed signal is clipping...

This could be considered as a non legitimate signal since it might cause clipping in DA and sample-rate converters.
I'd like to suggest to reduce the level of the triangle sample by 3 (or even 6) dB and redo the tests.


Seems like this can make some analog devices go nuts. I localized the problem to my old analog mixer that I have used between the sound card and the powered speakers.

I tested this with a difference signal of the reference and the #4 (invert mix paste). When the mixer is in the chain the difference signal sounds like a rather loud "pop". When I connect the speakers (or headphones) directly to the sound card the difference signal is almost inaudible. I can hear only a very faint high pitched click.

The difference is so small between the original reference and the #4 sample that ABXing wasn't any more possible after removing the mixer from the chain.

I'll test reduced volume samples sometime later.

Resampling down to 44.1KHz

Reply #23
My Terratec DMX6 fire 24/96 sound card does not resample and I used ASIO and Kernel streaming output modes for bypassing Windows Kernel resampling.

For excluding possible software/device problems at certain sample rates I resampled the file to 44.1 and then back to 96 kHz. These two versions sound identical to me (couldn't ABX). For this test I used foobar's SSRC in the Ultra mode.

Something very odd happens with this triangle file.

Yes, it appears that the 96KHz samples cannot be used at full amplitude as there are implied values between the samples that exceed 0dB.  Boy, another hurdle.  I wonder whether the people who developed the test page including the triangle clip were aware of that issue.

I will not be able to do any further testing myself for another 12 hours or so. Until then.