The aliasing thread

Sampler and Sampling discussion (techniques, tips and tricks, etc.)
Post Reply New Topic
RELATED
PRODUCTS

Post

René wrote:The major drawback of the system is that every dsp process after sample playing must be processed at Nx the samplerate, and some of those processes won't get any benefit from the oversampling process.
And it will be difficult with such a method to get high quality, because if something like 32x-oversampling or more is required, data bandwith increases way too much.

Post

Neat huh? What do you think
well, that's the one I describe in this thread.. Except that René was going 'but you can't do that, because the downsampling FIR will introduce a big latency blah blah'. Except that the polyphase filter I'm using doesn't [don't ask me why/how, I know nothing about them].

I think that pre-oversampling (using another polyphase) would result in a better quality, but like you I'm ready to skip this step (CPU or RAM hungry) as I'm fine with the quality of common interpolators.
It does work, and that's how it's implemented in several synthesizers (including Pentagon I and z3ta+).
then why did you have to argue with me for 2 pages?
and some of those processes won't get any benefit from the oversampling process.
yes, some, but for those that do, it's still more efficient to do this than to oversample/downsample all the time, several times for each voice.
Distortions will benefit from this. Some filters are better oversampled 2x as well.

Post

because if something like 32x-oversampling or more is required
except that for a sampler, only 2x, maybe 4x max oversampling is required, as a 2x oversampling gives you the room for +1 octave. So just a 4x oversampling will be fine for most soundbanks.

Post

gol wrote:except that for a sampler, only 2x, maybe 4x max oversampling is required, as a 2x oversampling gives you the room for +1 octave. So just a 4x oversampling will be fine for most soundbanks.
Here the oversampling would prevent the aliasing coming from the polynomial interpolator frequency response too. The size of the lobes decreases with the increasing frequency, therefore more oversampling = more quality.

-- Laurent

Post

well, that's the one I describe in this thread.. Except that René was going 'but you can't do that, because the downsampling FIR will introduce a big latency blah blah'. Except that the polyphase filter I'm using doesn't [don't ask me why/how, I know nothing about them].
And I still am. You're not getting delay due you're using a not-so-steep filter. Consequently, the implementation has almost no delay but it can't remove the first two aliases noteven at 64x.


-René

Post

And I still am. You're not getting delay due you're using a not-so-steep filter. Consequently, the implementation has almost no delay but it can't remove the first two aliases noteven at 64x.
how would you know?

Of course 64 won't get rid of aliasing IF you don't think to pre-filter the shapes in Sytrus (if it's what you're talking about).
64x oversampling will give me 8 octaves, and a synth can cover more than that. Considering my shapes can also be used as LFO's, they will have a huge samplerate. To use them as straight oscillators, they can be pre-filtered.
For a sampler you don't even need more than 4x, since they're pitch around their own samplerate.

Check this pic, it's a saw in Sytrus with 64x oversampling. I had to roughly pre-filter the shape using the control in Sytrus. So, it's like running a single saw shape in a sampler. Otherwise it'd be like running a saw shape with a samplerate of, like 1000Khz, in a sampler. Here of course you'd need a lot of oversampling to get it right.

Image

Post

Quote:
And I still am. You're not getting delay due you're using a not-so-steep filter. Consequently, the implementation has almost no delay but it can't remove the first two aliases noteven at 64x.


how would you know?
Because I did run the test. This is the result of playing the last 9 notes on the keyboard (119-127) on Sytrus, using a sine wave (so it doesn't need any filtering), at 64x.

http://www.rgcaudio.com/images/sytrus1.gif

That would be about the same test we're performing on samplers. You can see the two last notes being mirrored at some amplitude (aliasing).

The result is good, but barely equivalent to a 7 to 15 point sinc. That's without counting the CPU meter indicated 40% for one voice.

-René

Post

gol wrote:Except that the polyphase filter I'm using doesn't [don't ask me why/how, I know nothing about them].
AFAIK polyphase filters are just two parallel allpass IIR filters which introduce phase shifts of almost +PI and -PI respectively, shortly above Nyquist/2. If you add the output of both filters, the frequencies above Nyquist/2 cancel out. The order of the allpass filters determines how fast +/-PI is reached, hence correspond to the steepness of the stop band attenuation.

Cheers,

;) Urs

Post

Because I did run the test. This is the result of playing the last 9 notes on the keyboard (119-127) on Sytrus, using a sine wave (so it doesn't need any filtering), at 64x.

http://www.rgcaudio.com/images/sytrus1.gif

well, this is the result of the sampler test, using a 15khz sine, and 2x oversampling (does the same with 64x), in Sytrus. Only a tiny bit of aliasing visible there, and nothing like your screenshot.

http://www.flstudio.com/gol/Sine.jpg

Of course, if you went 8 octaves above nyquist, using a sine, you'll get aliasing even with 64x oversampling. I never claimed that oversampling was a perfect way in a theorical world, only in our real world. Pitching a sample up to 8 octaves without aliasing - that's what I call a perfect antialiasing in a real world's sampler. I even call it perfect with 2 octaves up.

Otherwise I might be able to break any sampler's interpolation by throwing a sample with a crazy samplerate at it. How would your sampler react to a sample of a 50000Khz samplerate? Dumb? yes, but not in a theorical world.

Post

Of course, if you went 8 octaves above nyquist, using a sine, you'll get aliasing even with 64x oversampling. I never claimed that oversampling was a perfect way in a theorical world, only in our real world. Pitching a sample up to 8 octaves without aliasing - that's what I call a perfect antialiasing in a real world's sampler. I even call it perfect with 2 octaves up.
I just played the last notes in the keyboard. No oversampled implementation should show any aliasing on that range. Much less a 64x oversampler. If it does, it's just inferior, as many players are doing this well with a way lower resource usage.

Many other interpolation algorithms in the pool do show a much better quality vs. resource ratio. This is a matter of preference. I for instance wouldn's choose it. You did, and there's nothing wrong with that. After all, as you previously stated it's not me the one you have to convince.

-René

Post

I Agree with René , think about it gol.

Post

I just played the last notes in the keyboard
then your test was wrong, I don't know, I can't make it do that. How did you set up sytrus exactly?
I Agree with René , think about it gol
about what?
Many other interpolation algorithms in the pool do show a much better quality vs. resource ratio
how do you know? Of course, anything with 64x oversampling is certainly a waste of resources, but I claim that 4x or even 2x is perfect for a sampler.
Olli Niemitalo even suggests some IIR's tailored to get a low noise ratio for oversampled data:
http://www.biochem.oulu.fi/~oniemita/dsp/deip.pdf
(of course here it's about pre-oversampled data, but this could be done realtime as well, without wasting RAM)

Post

then your test was wrong, I don't know, I can't make it do that. How did you set up sytrus exactly?
1- Select the 'default' program.
2- Set the oversampling value to 64x.
2- Play MIDI notes 119~127.
I did the test in Orion as I couldn't find a way to enter the last three notes in FLStudio Piano Roll. Most likely my fault here, not really familiar with it.
3- Render to wave.
Quote:
Many other interpolation algorithms in the pool do show a much better quality vs. resource ratio

how do you know? Of course, anything with 64x oversampling is certainly a waste of resources, but I claim that 4x or even 2x is perfect for a sampler.
I know it by mathematical means:
1- I measure the remaining noise by mix-invert it with the original data, averaging and expressing it in dB.
2- I check how many CPU cycles the whole process takes.
3- I divide the result in 1 and 2 using Microsoft Calc.

-René

Post

Play MIDI notes 119~127
indeed, for 2 specific notes (which are not in the scale in that sampler test - maybe it should be updated to include them).
Now they're above 19khz, for 2 specific notes, not bad at all for me, if it's the little headroom needed by the polyphase filter.
Note that the result is the same with 2x oversampling.

Post

indeed, for 2 specific notes (which are not in the scale in that sampler test - maybe it should be updated to include them).
They are. They just don't appear in the good algorithms cuz they're filtered, as expected.
Now they're above 19khz, for 2 specific notes, not bad at all for me, if it's the little headroom needed by the polyphase filter.
Please don't make the conversation go like this:

"What you see is not there. Your test is wrong."
"..."
"Ok, it is not wrong. But then it's not important."

I definitely agree that the result is not bad at all, and I believe I've already stated it in a previous post.

However, when comparing methods it is required to consider the -numeric- values of quality and resources.

I think it is possibe to keep a serious discussion concerning interpolation without propaganda contamination: I'm not particularly happy with my own implementation either. There must be a better way to do it for sure. I'm not trying to relativize the success of your particular method nor any other (well, except for linear interpolation, which is just bad :D)

Concerning linear, I hear how bad it sounds, how unpredictable it behaves when different resampling ratios are used and I think anyone who would care can easily spot it. Now if it is important for different people that I don't know.

But I can sense that somewhen in the transition from a 15-yo computer-speaker-equiped beat-mangler musician to a real-musician-living-from-recordings it will be important for everyone.

Actually, in my first post in this thread, I've stated that there's no perfect solution, just "perfect solution for me". I continue thinking that way.

-René

Post Reply

Return to “Samplers, Sampling & Sample Libraries”