Aliasing in synths. How to prevent it?

VST, AU, AAX, CLAP, etc. Plugin Virtual Instruments Discussion
Post Reply New Topic
RELATED
PRODUCTS

Post

EnGee wrote: Final question: if using 88.2 or higher. Is there a need then to use high quality option (or oversampling) in the synth? As it is already with high sample rate?

I would be interested to know more about this topic but mostly for my projects I will keep using 44.1 :clown:
I've always used 48k because it gives you 24k nyquist vs. 22.05k. This is close to double, so filters can get that extra space to work before even hitting nyquist, assuming cutoff = 20k.

Honestly though it doesn't really matter that much. If you have to choose and you have no reason to use 44.1, I'd advise you to use 48 if you otherwise hear no difference.

( 44100hz is stupid: https://en.wikipedia.org/wiki/44,100_Hz )

This is also important though, filter (one pole, 6db) gain at a frequency is equal to:
  • low-pass: gain = fc / sqrt(fc^2 + hz^2)
  • high-pass: gain = hz / sqrt(fc^2 + hz^2)
The gain at cutoff (fc) is actually 1 / sqrt(2) or -3db.

So if you move the cutoff to nyquist, the gain at 20k will be higher than otherwise if you use a higher sample rate.

Most hardware uses a low-pass cutoff around 30k to 40k to cut out-of-band (inaudible) content.


As far as whether you need oversampling in the plugin, the plugin's oversampling will be in addition to the higher rate you run and and yes, it may have an influence. You need to decide whether it makes a different on a case-by-case basis yourself. Use your ears! Play higher notes, mixtures of content (breaks with cymbals and snares, vocals, synths) and see if you hear any difference.

The proper way to test a non-obvious difference is called A/B testing. If you repeat the text while randomizing which one you listen to and try to categorize "this is A" and "this is B", you can check how many times you were right.

If you're right more often than 1/2 the time there is a chance you can hear a difference.

If you're right 1/2 the time there is near zero chance since this would be random.

The only way to improve the accuracy is to test many times. Try 4 usually, 8 or 16 when you're really wanting certainty. This proves "is there an effect I can hear?" with reduced error the more times you test. Exactly like flipping a coin, you can always get heads 15 times in a row, so when you want to confirm a result repeat the test, then repeat it again, then again, again and once more. More positive results = higher certainty. If you test 16 times and pick the right A/B every time you're pretty sure the difference is obvious.

Flipping a balanced, unbiased coin for heads 500 times in a row is so unlikely we can call it "near impossible". Not actually impossible, but in any practical sense it is never going to be experienced by anyone with such low odds.


Now about intermodulation distortion, most analog equipment uses low-pass filters at 30k to 40k as I mentioned. These often aren't implemented in software. (They add an expense that is usually not going to make any difference.)

When you over-sample though, you must filter away content above the band you're interested in (0 to ~20k) to reduce this sort of distortion.

Keep in mind though that it requires non-linearity to occur so there is no need to filter between two linear EQ plugins.

Applying the low-pass afterward is exactly the same as before, or between the two. With "linear time-invariant" filters (LTI, see Wikipedia as usual if you want to melt your brain with equations) the order you do them doesn't matter.

This is called the "commutative property" of LTI systems.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

I'll be the first to admit that all this technical talk is so many miles over my head that I can't even begin to understand it.

So let's bring this all down to a more "human" and "practical real world" application.

I have ANA and since it was the subject of another thread, I brought it out and listened to it in order to hear this "terrible" aliasing.

It took me quite a few patches until I finally found one trance patch that, in the very way upper registers, seemed to do what you're talking about. To my ears, the aliasing was very slight but noticeable in an isolated example.

My question is this.

Given that most synths in recordings are played more in the mod and lower registers and that there are other instruments that are being heard at the same time and that there are various FX such as delay, compression, limiting, reverb, etc. piled onto all of this in addition, how much, in a real world application of making music, does aliasing really matter?

Let me put it more simply.

I could absolutely put together a track of nothing but ANA tracks that sound perfectly fine with no aliasing whatsoever as long as I stick to certain registers.

So how much does all of this really matter?

I'm just trying to wrap my head around why we're making such a big deal about something that, in the context of a finished song, probably can't be detected by your typical casual listener of whatever musical genre these synths are used for.

Post

wagtunes wrote: It took me quite a few patches until I finally found one trance patch that, in the very way upper registers, seemed to do what you're talking about. To my ears, the aliasing was very slight but noticeable in an isolated example.
What is the highest frequency you can detect, and which frequency range do you require to accurately determine the frequency of randomly played tones?

Mine is 17.5k max, 16.5k - 17k resolving power > 80%.
wagtunes wrote:Given that most synths in recordings are played more in the mod and lower registers and that there are other instruments that are being heard at the same time and that there are various FX such as delay, compression, limiting, reverb, etc. piled onto all of this in addition, how much, in a real world application of making music, does aliasing really matter?
No simple statement can be made. In some cases it doesn't matter, in some it matters a lot.

For example use a 1k sine in a hard clipper with oversample (64 x) disabled vs. enabled.

These images have a 90db range, 6db per grid line.
Image
Image
http://xhip.net/temp/aliasing.wav
Let me put it more simply.

I could absolutely put together a track of nothing but ANA tracks that sound perfectly fine with no aliasing whatsoever as long as I stick to certain registers.

So how much does all of this really matter?
You'll always get aliasing no matter which notes you play, it will just be 6db lower amplitude per octave assuming you're using a waveform with 1/n harmonic amplitude.

Listen to the example I played (normal range notes) for yourself and look at the images. Someone who isn't both blind and deaf should see that yes, as a general rule aliasing matters.

You need to go on a case-by-case basis and decide whether you need to do something about it and how much you are willing to accept.

Nothing will ever simplify this. You'll never be able to make a yes/no assessment no matter how you think about the problem.

It's like "thou shalt not kill", what about the billions of bacteria in my gut that die routinely? Turns out an absolute application of this rule isn't even possible because we can't actually even define what "life" or "death" are.

Now if we're talking "you shouldn't murder people from your family or village" that's a bit more specific.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

@aciddose:
Thank you for the detailed explanation. I must admit I need to re read it (together with some wikipedia topics and an interesting topic here, which leads me to this excellent video of him (IMO):


I know they are beginner's stuff but they are still good introduction and in approachable level of non-technical people I suppose.

The mixer I ordered has an audio interface of 16bit/48Khz output and this is what made me worried. But, anyway, I'm not worried now! So I'll use the 48Khz instead of the 44.1Khz in my projects then although I have my audio interface with 24bit/96Khz but I'll just use 48Khz as a maximum sample rate (with internal 32bit in the DAW).
Using: Cubase Pro 15, Reason 13, Tascam US-4x4HR, MODX6, DM12D, LaunchKey 49, Yamaha guitar(Pacifica 612v) and bass (BB234) and some virtual instruments and synths.

Post

I'm not certain what the technical issues are with 44.1 multiples vs. simply resampling from 48 to 44.1.

You'd need to talk to someone that is really, really obsessed with getting absolute perfection out of a resampling filter (called: interpolation) to get any information.

It's slightly more expensive, but when you're mastering and doing the final render including a resample for CD release I can't find a single justification for having a preference either way.

This kind of thing mattered "back in the day" when taking several times longer to perform high quality resampling actually made a difference. Now the difference is measured in seconds.

For example resampling a stereo track 4 minutes long from 48k to 44.1k takes... (Generating white noise took 12 seconds.)

Re-sampling took 54 seconds. (Naive re-sampler. Try a modern one with SSE optimization. It should take 15 seconds.)

So it's only if you find spending an extra minute to convert after mastering to the final "CD master" a significant hassle is this an issue.

It's important to note the default rate for DVD and Blu-ray is actually 48k, so you'd be in just as much if not more trouble having a "MASTER" master at only 44.1k anyway.

Keeping your "MASTER OF ALL TIME" master at 96k is in my opinion the only way to go these days.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

I believe I will be fine really with 48Khz and whatever bit (16 and above). The 96Khz is overkill for my needs ;)

I have a nice basic understanding now, and I appreciate all the help :)
Using: Cubase Pro 15, Reason 13, Tascam US-4x4HR, MODX6, DM12D, LaunchKey 49, Yamaha guitar(Pacifica 612v) and bass (BB234) and some virtual instruments and synths.

Post

44.1 is perfectly fine as long as the plugin designer implemented a good internal oversampling algo. Diva or Fabfilter Saturn come to mind.

Post

Great discussion about preventing aliasing! 8)

I'm curious about ExperimentalScene's AntiAlias plugin, but haven't been working on a project lately. Does anyone know about it?

Thanks! 8)
soundcloud.com/soundonly

Post

There are many plugins available that can wrap "minihost" other plugins and over-sample them for you.

I'm not sure about the plugin you mention, but try it out (if demo/free) and see.

There are a few such free plugins available also.

I wouldn't really advise that this is a good idea (see my description of pass-band ripple) although again use your "ears", if you don't get any undesirable effects then go for it. Just don't overdo it, most cases you don't even need oversampling. For example 2x on Xhip works great, if you're doing a lot of frequency modulation 8x can sound great, with heavy waveshaping 16x to 64x will work wonders, but these are more "render the track at 64x overnight" sort of things.

For real-time if 2x - 8x isn't enough, you'll probably have major issues with processing cost.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

LFO8 wrote:44.1 is perfectly fine as long as the plugin designer implemented a good internal oversampling algo. Diva or Fabfilter Saturn come to mind.
I don't think you'd be fine with 44.1k if you were producing the sound track for a film.

44.1k is fine for an amateur that would never be involved in film outside youtube, sure.

44.1k is fine for an artist that will release some CDs in a small run (1000s), but never expects to become popular or have their music used anywhere else.

To be honest there is also no reason you couldn't simply up-sample to the needed rate (48k, 96k common on Blu-ray) but why not produce the material in a good working rate first (master) and then down-sample to the needed rate?

If you work at 96k it means the artifacts due to interpolating filters are often greatly reduced. It also gives you a greater range, you can actually set the filter cutoff at 40k or 30k, while at 44.1k this isn't possible.

I'm not saying everyone needs to. Most people don't. Just keep in mind there are very valid reasons that some people must work at these higher rates and if you were that sort of person you'd most likely be aware and base your decision on that rather than simply "I think 44.1k should be enough". Should anyone care what you "think" without you providing a logical argument?
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

Well, after reading the long article and watching the movie of that guy, I come to some conclusions to myself. They might be right or wrong, I will keep reading about it especially it is a not an easy topic to follow.

I read here:
192kHz considered harmful

and here:
Oversampling

aciddose has explained a lot and also Urs in the beginning of the thread among others. Thank you all, but as a final notes for myself (I don't ask anyone to take them!):

- Analog synths are without or with very little aliasing.
- Oversampling is useful in plugins and digital synths and most developers are implementing this for us.
- No need to go beyond 48Khz for a new projects, even if I do for movies/Dvds.
- I'll use my ears to detect any aliasing and will try to avoid it from the source (by changing the preset or the sound's design ..etc) till I hear a nice clear sound without aliasing.

As I said the notes above are for my own usage :)
Using: Cubase Pro 15, Reason 13, Tascam US-4x4HR, MODX6, DM12D, LaunchKey 49, Yamaha guitar(Pacifica 612v) and bass (BB234) and some virtual instruments and synths.

Post

That definitely sounds correct, I'm sure you're right.

If you don't notice a difference, 44k or 48k are great and which you choose is irrelevant as long as you get the results you want.

As I mentioned you can end up with some high-frequency cut or other effects due to oversampling (or lack of) and so you might need to correct that in some cases with EQ. Still, that is just a small difference on the EQ you would use anyway and so ultimately doesn't matter much.

Just keep an eye out (or an ear?) for this when you're using many effects processing plugins. If each adds -1db of cut at 18k and you have 12 plugins, it will become a -12db cut!

Moving to 96k (or 88k) in that case will solve the issue without needing EQ to correct it.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

:tu:



To be continued ...
:D
Using: Cubase Pro 15, Reason 13, Tascam US-4x4HR, MODX6, DM12D, LaunchKey 49, Yamaha guitar(Pacifica 612v) and bass (BB234) and some virtual instruments and synths.

Post

EnGee wrote:Well, after reading the long article and watching the movie of that guy, I come to some conclusions to myself. They might be right or wrong, I will keep reading about it especially it is a not an easy topic to follow.

I read here:
192kHz considered harmful

and here:
Oversampling

aciddose has explained a lot and also Urs in the beginning of the thread among others. Thank you all, but as a final notes for myself (I don't ask anyone to take them!):

- Analog synths are without or with very little aliasing.
- Oversampling is useful in plugins and digital synths and most developers are implementing this for us.
- No need to go beyond 48Khz for a new projects, even if I do for movies/Dvds.
- I'll use my ears to detect any aliasing and will try to avoid it from the source (by changing the preset or the sound's design ..etc) till I hear a nice clear sound without aliasing.

As I said the notes above are for my own usage :)
Yes I think you nailed it pretty much.All soft synths with very low cpu have very noticeable aliasing. No soft synth is completely (real 100% ) aliasing free, but on some its nearly unnoticeable, including on hi octaves. Oversampling is the key. Analog synths don't alias by definition, except in a few very precise configurations
http://www.lelotusbleu.fr Synth Presets

77 Exclusive Soundbanks for 23 synths, 8 Sound Designers, Hours of audio Demos. The Sound you miss might be there

Post

aciddose wrote:There are many plugins available that can wrap "minihost" other plugins and over-sample them for you.

I'm not sure about the plugin you mention, but try it out (if demo/free) and see.
...
Thanks. I'll give it a try, but with a more controlled test. It might be hard to conclude when there are a lot of things go on, as in normal use. :)
soundcloud.com/soundonly

Post Reply

Return to “Instruments”