thoughts on an oversampling option, especially when using no interpolation?

Started by musicalman, September 26, 2019, 02:47:24

Previous topic - Next topic

musicalman

Hi everyone,
As the subject says, I was wondering if the idea of oversampling ever got tossed around, particularly when you use no interpolation. I read that Renoise has an oversampling filter which can do this, though I personally haven't tried it. The reason I thought about it in open mpt is twofold: The most obvious case for it is to minimize aliasing on wavetable samples. But another reason is that it avoids a lot of mid range distortion on any sort of sample. To demonstrate, if I set the mix rate to 48 KHZ and play some notes at a low sampling rate, and then try the same but at 192 KHZ instead (4X oversampling), the latter will sound cleaner. The mid frequencies will sound more consistent and less noisy from note to note, but the sound will still have those digital highs I sometimes like to have.

I dabbled in the advanced settings and found that you can modify the sampling rate list. I had the idea of trying to put higher sampling rates in there to see if 8X, 16X etc. would make a difference, and to eventually find out, for my own curiosity, how much oversampling I think I would use. Of course this cheap way of testing it quickly becomes unwieldy and I'm probably going to run into issues sooner rather than later if I do that.

I know absolutely nothing about dsp, so I don't know how hard/practical it is to implement this. I also wonder if it wouldn't be easier to make oversampling its own process that can be used with any interpolation type. I don't think that's super necessary, since interpolation suppresses the aliasing that my oversampling idea tackles.

Any thoughts?

Saga Musix

Yes, it has been discussed before but it's far from the only thing that needs to be done. For the time being, there is nothing wrong with your "cheap way" because that's essentially just moving the oversampling step to the sound driver.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

musicalman

Quote from: Saga Musix on September 26, 2019, 11:08:12
Yes, it has been discussed before but it's far from the only thing that needs to be done.
Just curious as I have no idea: what else needs to be done?
Quote from: Saga Musix on September 26, 2019, 11:08:12
For the time being, there is nothing wrong with your "cheap way" because that's essentially just moving the oversampling step to the sound driver.
Cool.
For those who are interested, I tried my idea out and found that 4X (192K) and 8X (384K) do sound slightly different, but the difference is pretty subtle. I tried 16X (768K) but got errors, so the sound device probably couldn't handle it. I haven't yet tried other steps like rendering to wav and downsampling, to see if going higher produces any audible difference. My hunch is that I've already found the sweet spot and oversampling by 16X or more will only offer marginal improvement in most cases.

Saga Musix

Quote from: musicalman on September 28, 2019, 06:37:35
Just curious as I have no idea: what else needs to be done?
A lot of things, not necessarily related to oversampling. Keep in mind that OpenMPT is developed by only two people in their spare time, and oversampling is by far not the most important thing that needs to be improved or fixed.

Quote from: musicalman on September 28, 2019, 06:37:35For those who are interested, I tried my idea out and found that 4X (192K) and 8X (384K) do sound slightly different, but the difference is pretty subtle. I tried 16X (768K) but got errors, so the sound device probably couldn't handle it. I haven't yet tried other steps like rendering to wav and downsampling, to see if going higher produces any audible difference. My hunch is that I've already found the sweet spot and oversampling by 16X or more will only offer marginal improvement in most cases.
By far the best resolutions you will get by exporting to WAV and then downsampling using a really good resampler (e.g. r8brain in OpenMPT). For performance reasons, the resampling in your audio driver will still only provide limited quality but it's typically still better than not oversampling.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

musicalman

Quote from: Saga Musix on September 28, 2019, 10:31:41
A lot of things, not necessarily related to oversampling. Keep in mind that OpenMPT is developed by only two people in their spare time, and oversampling is by far not the most important thing that needs to be improved or fixed.
Of course! When you said a lot more needs to be done, I thought you meant that oversampling was complicated and a lot would have to be done to get it in a usable state, which wouldn't surprise me. But yeah, other things are far more important :)