downsampling an oversampled file

GoldWave general discussions and community help
Post Reply
mathyou9
Posts: 70
Joined: Mon Nov 10, 2008 7:36 pm

downsampling an oversampled file

Post by mathyou9 » Wed Aug 01, 2012 4:58 am

I have an oversampled WAV file; its sampling rate is 96 kHz. The audio spectrum seems to peak somewhere around 15 kHz to 16 kHz. If I downsample to 48 kHz or 44.1 kHz, the audio still fits nicely within its corresponding Nyquist limit. Do I still need to apply a low-pass filter before downsampling or will downsampling, alone, be enough?

I've never done much when it comes to downsampling so I have no idea. Any input is appreciated. Thanks.

DougDbug
Posts: 2035
Joined: Wed Feb 16, 2005 3:33 pm
Location: Silicon Valley

Re: downsampling an oversampled file

Post by DougDbug » Thu Aug 02, 2012 3:08 pm

A proper downsampling algorithm will always low-pass filter. So, I assume GoldWave's resampler does it for you.

mathyou9
Posts: 70
Joined: Mon Nov 10, 2008 7:36 pm

Re: downsampling an oversampled file

Post by mathyou9 » Tue Aug 07, 2012 9:09 pm

DougDbug wrote:... I assume GoldWave's resampler does [a low-pass filter] for you.
From this post (of four years ago), DewDude420 (who was [coincidentally] responding to you) wrote:
Goldwave doesn't do any kind of filtering when doing a resample..it does just a straight resample...it's why if you don't pre-filter before downsampling...you get horrible results.
Chris replied with:
GoldWave does very limited filtering during resampling. GoldWave's resampling algorithm is one of the things that really needs to be redesigned in a future version. It's on the "to do" list.
---

Well now I'm just curious. Hoping Chris can chime in on this one, but what's the status of GoldWave's current resampling algorithm. Did it ever make it to the top of your "to do" list?

Thanks.

GoldWave Inc.
Site Admin
Posts: 3897
Joined: Wed Mar 10, 2004 6:43 pm
Location: St. John's, NL
Contact:

Re: downsampling an oversampled file

Post by GoldWave Inc. » Thu Aug 09, 2012 12:14 pm

The old resampling algorithm in GoldWave was replaced in v5.50 with a very high quality algorithm, which does the filtering.

Chris

DewDude420
Posts: 1164
Joined: Fri Mar 11, 2005 11:15 pm
Location: Washington DC Metro Area
Contact:

Re: downsampling an oversampled file

Post by DewDude420 » Tue Aug 21, 2012 9:41 pm

I seem to recall a while back that Chris did update the resampling engine; it was noted as "new polyphase resampling", or something to that effect.

As stated, my information was based on what would be considered *OLD* versions of Goldwave. The quality of the resampling engine currently in Goldwave matches the performance I get with SSRC. The tests I'd done were actually with older versions; using some sweep/tone file I can't seem to recall. This trick was mostly done with Creative sound cards to prove how lousy the resampling engine was. Granted, with the sound card, you could only really hear it (though stereomix was working then and the effect could be recorded); but it was also a good indicator of how well your resampling and filtering engines were.

Converting sample rates is not an easy task, there's a *ton* of math involved if you want to get it right; and if you're doing something besides doubling or halving a sample rate; it gets even more complex. Simple sample rate conversion was what we used for a LOT of years (up till the late 90's) because we didn't have the processing power and no one had really come up with it. I can't speak for exactly what program is using which engine. SSRC does a lot of it's conversion in FFT; and therefore is highly accurate and very fast. Goldwave, Audition, SF, PT; I don't really know how each one converts it's sample rate (then again; I only use two of those), but they do it very well. SSRC has seen implementation in to a lot of open-source stuff.

If the audio is peaking onlly around 15 to 16khz, then sure, you can safely stick it in 44khz. Heck, at 16khz it'd fit within the nyquist theory. Nyquist basically says that for a baseband audio signal, it's sampling rate has to be 2x the desired frequency. In order words, your frequency response is half your sampling rate.

But one thing you could take in to account is that human hearing only goes up to 20khz, usually only 16 to 18 tops. So even if there WAS audio; from a non-audiophile standpoint you could resample it to 44.1khz and not "lose anything important"

Videogamer555
Posts: 43
Joined: Wed May 25, 2011 2:28 am

Re: downsampling an oversampled file

Post by Videogamer555 » Mon Apr 08, 2013 11:08 pm

Interestingly enough, I'm having the opposite problem. I'm using Goldwave for processing digital data that was input into the computer via the sound card. As such the waveform is basically a squarewave. Unfortunately the lowpass filter that the resample algorithm now uses is playing havok with my pure digital squarewave waveform. I recorded it at 96000 audio samplerate but the datarate for the digital signal I was recording was 1700baud, so I'm going to need to downsample the signal without any reshaping of the waveform (NO lowpass filter should be used), prior to saving the data in raw format for digital decoding of the data in another piece of software. So my thoughts are there should be an option for filter algorithm used when resampling, giving me a choice of a "pure" resample operation, or a filtered resample operation.

If not, then I should at least be informed of the last version to use a pure resample algorithm, so I can download that older version to use for when I'm using it for this digital application.

GoldWave Inc.
Site Admin
Posts: 3897
Joined: Wed Mar 10, 2004 6:43 pm
Location: St. John's, NL
Contact:

Re: downsampling an oversampled file

Post by GoldWave Inc. » Tue Apr 09, 2013 9:26 am

Does your sound hardware only support a 96000Hz sampling rate? If not, then you could record at a lower rate to avoid resampling entirely.

If you just need a very basic resampling algorithm that drop samples, you can use the Expression Evaluator tool:

Code: Select all

wave( n * <oldrate> / <newrate> )         example:  wave(n*96000/44100)
Then set the playback rate to the new rate.

Chris

Post Reply