Nearest Neighbor Upsampling

Using Nyquist scripts in Audacity.
Post and download new plug-ins.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Mac OS X
GNU/Linux and Unix-like
Posts: 8
Joined: Tue Oct 16, 2012 9:01 pm
Operating System: Please select

Re: Nearest Neighbor Upsampling

Post by greenblock » Fri Oct 19, 2012 8:27 pm

Works perfectly hahaha!

By officializing I meant creating a real plugin, like this. hahah

Thanks :)

Robert J. H.
Posts: 1815
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: Nearest Neighbor Upsampling

Post by Robert J. H. » Fri Oct 19, 2012 8:46 pm

Thank you Steve for the plug-in (our first cooperation...).
Due to the shrinking process of the code, there is now a lot of space for an additional low pass filter...
Thanks for the Bequat filter link, I am still admiring the code, though I am no fan of the analog inspired filters. All those coefficients are rather egyptian hieroglyphs for me. Well, that's not exactly true, since I know a few hundred of the later ones but you certainly grasp the meaning. Anyway, there is a lot of room for experimenting in this area, as mentioned before. Especially unwanted side effects of resampling are most interesting from a musical point of view.

Piotr Grochowski
Posts: 162
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: Nearest Neighbor Upsampling

Post by Piotr Grochowski » Tue Mar 06, 2018 7:36 pm

Here is a sample of WAV compression on 1kbps—128kbps:

How I made this (not necessarily in the same order for independent operations): You may be tempted to understand Roman language and say X is 10, but not so. X is one of the items of the set of 8 frequencies from 250Hz to 32000Hz, in exponential increments of 2x.

In OpenMPT, I first upsample the 44100Hz song to a multiple of X with a high quality algorithm. This means 44250Hz, 44500Hz, 45000Hz, 46000Hz, 48000Hz or 64000Hz. Then I downsample with Nearest Neighbor to X. I save the result. The first step of compression is done.

Then the resulting sound is open in Audacity. I save it with IMA ADPCM — but sometimes I have to repeat this, as I fall for the trick of the Project Rate number being different. The second step of compression is done.

I repeat it for all 8 values of X. This will give me a set of WAV sounds from 1kbps to 128kbps.

Post–processing: They are opened in OpenMPT. I upsample each of these to 48000Hz with Nearest Neighbor. In case of X being 32000Hz, this will lead to samples alternating between being once and twice. I'm not a "bouncing frequencies" expert, but I don't think it (half–integer upsampling) causes major distortions as opposed to integer upsampling with Nearest Neighbor.

Then I cut first 15 seconds from them, and combine them. I add labels. I record a video. I upload it to YouTube.

Post Reply