I noticed that all samplers except the ones from NYSTHI alias when pitching the sample. I thought I just bring this to your attention and I would suggest @synthi to reveal to the other developers how aliasing can be avoided.
I’m not a coder myself so I don’t know what is going on when pitching a sample, but I hope that there’s an easy way to improve the quality of all those nice samplers in Rack, and that developers share their insights to provide Rack with the highest quality DSP.
In most cases you might not notice the aliasing, but take a long 808 kick sample and change the pitch a little and you will hear it quite clearly with all those samplers.
The techniques are well known, but the problem is that many VCV devs aren’t great at DSP, and modules don’t get called out often enough for their terrible aliasing. I’ve posted a few things about this, but of course it looks a bit suspect coming from a “competing” dev. I’d advise you to look at the aliasing on the spectrum analyzer (like the Bogaudio one), take some screen shots showing the aliasing, and post them.
Oh - how to get rid of it. You need to do a good enough job interpolating between samples, or even a small shift will make a terrible racket. I think most must do this OK, or the thing is unusable. But some people do it better than other. If you see aliasing or other junk at very small pitch shifts (like a semitone) it’s probably the quality of the interpolation filter. I’ve seen everything for a simple linear interpolation up the a high order FIR brick-wall filter.
Then for large pitch shifts upward you need a sharp lowpass filter before you shift it up, or high harmonics will shift above fs/2 and come back as aliasing.
I would guess interpolation gets tougher for large shifts downward, but I don’t have a ton of experience with this.
BTW, If you want to see an aliasing obsession in action, look at our Facebook page. If you go back to may and earlier you will see a lot of posts about aliasing in VCOs, waveshapers and others.
Seconding this. It’s good to know what mathematical methods to use, but you definitely don’t need to because the problem of resampling has been solved 100 times for you in various libraries. Use libspeexdsp (included in Rack and wrapped with dsp/resampler.hpp) if you have a fixed resampling ratio or libsamplerate if the ratio is variable over time, or Rubberband or SoundTouch if you need pitch/time stretching.
So could all those bad samplers be fixed by including libsamplerate and sound would be fine?
A good example for various modes of bad interpolation is given with the “Advanced Sampler” from “Lomas” - it has four interpolation modes to choose from, and they all sound terrible, and actually all sound quite the same to me - almost like applying a bitcrusher. I love everything else about this sampler, it would just be a good example of a great sampler if it could be fixed with something like that… same for “cf Play” for example - would love to use this if it sounded good
well, I’m not super familiar with that library. If it has a wide choice of quality vs. speed, then sure. Just remember - A sampler is not a mastering SR converter than needs to have all artifacts -120 db, have bandwidth all the way to (almost) fs/2, and have linear phase. Often a real simple interpolator will be good enough, and use less CPU. But it the library lets you hit the sweet spot you are going for, then that’s great.
Probably the most important thing is to be aware of what your sound quality is, and then tweak with your goals in mind. For example, there are sawtooth VCOs out there with no alias reduction at all. Did the author intend to make a light-weight VCO, and not care about distortion? It’s difficult to tell - I have yet to see a manual for a module with high aliasing that mentions it at all. Which leads a user to wonder …
VCV will release a “high-aliasing” oscillator in a month or two. (One internet point to anyone who can guess what oscillator in history it’s similar to.) But you’re right, I haven’t seen an oscillator that advertises it as a feature yet.
The interpolation on my sampler is very basic. But maybe there is a bug because in my test I can listen the improvements when using linear interpolation over no interpolation.
I got the interpolation algorithms from that Stackoverflo question with some linked papers that talk about s/n ratio. I will link it when I am at home.
I totally lied - I ran into a really nice sounding VCO recently, and the manual did says something to the effect of “the aliasing is quite high, but it sounds good anyway. hope to reduce it in the future”. I was quite pleased.
I’m going to guess that it either aliases intentionally, or that it sounds so insanely good that it doesn’t matter. Because you have proven you can do oversampling and min-blep very well
In my experience the difference between linear interpolation and no interpolation is HUGE. And the difference between linear interpolation and much better interpolation is more difficult to hear. Where you will see (and hear) a difference is when you are pitch shifting signals that are very high in frequency. I tend to measure in the range between 1k and 2k, as it’s high enough to alias a lot but low enough to hear easily. But for a real torture test feed in some sines between 10k and 20k.
I think you mean the WCO, I also experienced it as good sounding so far.
With the oscillators it’s a bit of the same story, although not as bad as with the samplers and usually only on high notes… only Lindenberg Research and Vult Oscillators seem to be completely aliasing free. Oh and Blamsoft XFX Wave of course, this thing is truly free of any aliasing… but I suspect it works on an additive engine.