Crazy how my guy just thought me more about oversampling & aliasing through code and engineering than any of the so called producers, mixers and mastering peeps. You sold this concept so well my guy. Mad respect. I'm subscribing! 💯🔥🙏
@Am6-95 жыл бұрын
Interesting video, nice to see someone who actually knows about DSP talk about this topic.
@jonnybreckless4 жыл бұрын
I think you've slightly misunderstood sampling theory, and how all modern delta sigma oversampling converters work. Transients in a band limited system always have ripples even where there is no aliasing, due to finite bandwidth truncating an abstract signal of infinite bandwidth (i.e. a truncated Taylor series). You should take a look at the output of your "impulse" from the DAC using a high quality oscilloscope rather than the GUI of iZotope, you'll see pretty much the same phenomena with or without the oversampling. The only way to avoid this is an old school non oversampled 16 bit DAC with a high order analog (likely 8th or higher Bessel) reconstruction filter, and these will smear that impulse over a lot more than 17 samples. There are also some subtle issues regarding noise, dither, minimum phase vs linear phase, and jitter but that's outside the scope of this comment.
@BlueMangooSoftware4 жыл бұрын
Yes, you are right that the D to A converters have filters that exhibit some ringing. I have an analog oscilloscope here. The early part of the video briefly mentions that the phenomenon I am discussing here does not apply to all resampling filters but only to those digital oversamplers that attempt to upsample and downsample in real time while preserving almost all of the frequency range of the original audio. The antialiasing filters in the D to A converter have their own impulse responses that smear the transients in their own way and that can not be avoided. The concern I want to raise with this video is that when you do digital sample rate conversion on a computer then you are forced to make a choice between adding latency and using the traditional linear phase FIR filters or processing in real-time using minimum phase antialiasing filters that do smearing and phase shifting in a much more drastic way than the filters in a D to A converter do. If you play an impulse through your sound card into an oscilloscope, you will see the antialiasing filter ringing there, but it is a different type of ringing from what you see in this video.
@jonnybreckless4 жыл бұрын
@@BlueMangooSoftware Understood. If you really care about zero latency then practically your only option for a half band filter is an IIR. You can approximate linear phase with an IIR filter using a combination of allpass and minimum phase filters, at least for a range of frequencies you care about. Most people don't do this because it's generally computationally more efficient to do halfband FIR filters and exploit the impulse response symmetry and the fact that every other coefficient is zero to minimize the number of multiply-accumulates per output sample. The trade off is always between bandwidth, THD+N, latency, pulse fidelity and computational expense. I've never been bothered by the phase shifting of a well designed minimum phase IIR filter, it's basically what an analog filter would do at least for low frequencies, and psycho-acoustically we're fairly immune to it. For example I prefer the sound of standard biquad equalizers over linear phase EQ, it's what we're used to with analog circuits anyway.
@BlueMangooSoftware4 жыл бұрын
@@jonnybreckless You said the only option for zero latency half band filters is IIR. That's correct: we are using IIR filters. The method we are using in this video is not the usual upsample and then half-band filter method. We upsample a factor of 2x by creating a pair of allpass filters to be run in parallel so that the phase difference between the outputs of the filters is exactly one half sample over the audible frequency range. To get the upsampled signal we write the output of the filter whose phase lags a half sample behind to the even numbered indices and the output of the filter whose phase is a half sample ahead goes to the odd numbered indices. With that method there is no need for a half-band filter to anti-alias the upsampled signal. The downsampler also uses a pair of allpass filters to produce a phase shift, and when the phase-shifted output from the odd and even samples is summed together at the 2x downsampling stage the upper end of the spectrum gets cancelled out. The final output looks very similar to the traditional method of sample rate conversion using half-band filters but this allpass filter method seems to be a bit easier on the CPU. I agree with you that the phase shifting doesn't really cause a problem (to my ears). Although the impulse response looks like a big mess when you use steep filter settings, all the messy stuff stays near the nyquist frequency and down below 20Khz there is hardly any phase shift at all. The part that concerns me is when we are not just filtering like this one time and then listening to the sound, as we do in D to A converters, but doing it many times in a signal chain with various other processing steps in it. For example, if we combine this with saturation, the ringing in the tail of the impulse response of the resampling filters gets extended considerably by the compression and gain boost. Or if we run through a chorus effect that uses low-order interpolation for pitch shifting, with the assumption that the input signal doesn't contain much high-frequency content, then we could be in trouble. I totally agree with you that in most normal situations we won't hear those filters ringing at all, but many of us have effect chains in our DAWs that do things the authors of signal processing textbooks weren't thinking about.
@jonnybreckless4 жыл бұрын
@@BlueMangooSoftware I like the polyphase approach you described. I've not seen that done with IIR before! Kind of an all pass delay approximation to band limited interpolation? That's neat.
@BlueMangooSoftware4 жыл бұрын
Jonny Reckless yes, its like that. I also find the idea very clever. I did not think of it myself. We got the idea from Laurent de Soras. He has explanations and source code on his website: ldesoras.free.fr/ I am very happy with the way that method works in terms of cpu and latency.
@unique8632 жыл бұрын
simple answer folks......listen to it!!! some things i like oversample and it makes a tremendous improvement and some things i dont like oversampling at all. Judge by ears
@1176hambone19 күн бұрын
Frequencies above 20khz in the analog domain are not very concerning to me. They wont make it through my analog inputs, anolog processing chains, or my playback system. 20khz+ frequencies offer no necessary addition to emotional impact of the program material, nor can they be heard at any amplitude. However, Aliasing artifacts are below 20khz and in most popular plugins often above a noise floor of -60db and up to -35db after mulitple stages of saturation,compression, limiting, etc. This concerns me when aliasing starts eating away at my ambience and low level harmonic content in studio production mixes. Distortions above human hearing isn't really audio for humans. Audio is audible. Audibility occurs within the range of human hearing. The title of this should be "How oversampling distorts frequencies outside the range of human hearing". For live sound reproduction, and studio foldback monitoring, of course, latency minimization is the priority.
@briancase61803 жыл бұрын
Have you gotten in touch with Chris from airwindows?
@RocknRollkat Жыл бұрын
Finally some straight dope about plugins, thank you. I write my own plugins, I keep the DSP code simple, I watch phase like a hawk. Why oversample anyway ? Who can hear the supposed difference ? More a marketing gimmick than an engineering solution. Digital is NOT analogue. Accept both for what they are. Bill P.
@theelephantofsurprise85645 жыл бұрын
Thank you so much - wonderful information
@CLdwyer3 жыл бұрын
So I have some questions. 1. You demo'd upsampling x16. Most of my oversampling is usually only 2x. What you demonstrated looks like the severity of smearing in oversampling which can occur in plugins like Fabfilter Pro L 2 which can do high oversampling rates. 2. If your session is tracking in 96kHz (for example), and you're not upsampling, you're capturing samples at that sample rate (and assuming there isn't much jitter or inaccuracy) you shouldn't have the exact delay and smearing artifacts found from "over" or "up" sampling, correct? What problems do you predict with this 3. What sample rate do you recommend for tracking? How do you recommend mixing be treated? Should different things be considered with aggressive compression and saturation artifacts? What are you measuring for the tradeoff of aliasing vs oversampling distortion & smearing/pre ringing? I'd love to hear your overall feedback on those questions.
@sirhans3 жыл бұрын
Before answering those questions, it’s essential to understand that the oversampling technique we discuss in this video is not the one typically used by DAWs for sample rate conversion and it’s also not the one used in most plugins that are designed for mixing and mastering. Specifically, I don’t think Fab Filter plugins use this method. Unless you are using plugins designed to be used as real time audio effects, most of what we said here is not applicable. Our company is specifically focused on making low latency plugins for real-time music performance on iPad and iPhone, so this is a big issue for us.
@CLdwyer3 жыл бұрын
@@sirhans Ahhh this is very helpful context. Because I've been trying to land a more detailed workflow and wanting to weight the positive and negatives to higher and lower sample rate workflows. My questions are in regards to real time tracking (in the native higher sample rates- no upsampling) and mixing and mastering utilizing upsampling. I was just stopping here cuz the info was attractive but got introduced to your plugins while watching!
@MrSkyTown2 жыл бұрын
Does running a daw at higher sample rates still cause issues with distortion and smearing the way oversampling does.
@sirhans2 жыл бұрын
Running the DAW at a higher sample rate makes the situation much better. Even if you have to upsample some audio to do that, we need to look past the clickbait title of the video to understand how that would affect things. The video explains that the distortion depends on the type of antialiasing filters applied and that this video itself only addresses filters used for real-time oversampling. Filters used in a DAW won’t be real-time filters and should be optimally designed to give very low distortion, assuming your DAW is well designed. Basically there are two types of Antialiasing filters: real-time filters, which have very low latency but distort phases, or linear phase filters, which have very low distortion but delay the audio by 10-20 milliseconds. If you are working in a situation where a delay isn’t a problem, for example when downsampling to export a file from a DAW running at 96khz to upload to Spotify at 44.1 kHz, and if your DAW developer knows how to design a filter properly, you’ll get a very clear down sample.
@michaelanderwald41795 жыл бұрын
It would be really interesting if you'd do multiple passes of up-down-sampling and comparing the results that come after the first pass. An actual impulse is not something I'll ever be recording, and I don't think the cumulative effect of multiple plugins doing oversampling in series would add that much distortion, be it delay or ringing (which I don't think anybody can hear, since if I understand correctly, it is ringing at half the sample rate frequency). Those are fantastic tools by the way.
@BlueMangooSoftware5 жыл бұрын
Michael Anderwald each time you do another pass the smearing effect gets longer by the same amount. So if an impulse turned into 0.5ms of smeared high frequency ringing after going through a single oversampled plugin then it becomes 2ms after four plugins. We study the impulse response not because we intend to actually record an impulse; rather it’s because what happens to one sample happens to all samples. If the impulse response is smeared by 0.5 ms then you have lost the ability to produce a sound shorter than 0.5 ms, regardless of the frequency. That means all the attacks on your drums and hi-hat get smeared by the length of the IR. There are other things that produce very short sounds where one wouldn’t expect it. I’m thinking of the sound of the bow on an upright bass and the breath noise in a bass singer’s voice. Those are high frequency sounds that pulse on and off at intervals of less than 1 ms together with the oscillation of the wave. I haven’t actually tested those with an oversampled plugin. Perhaps I will. As usual, the bottom line is: if it sounds ok then it is ok. All this analysis is only useful so that your ears know what to listen for.
@michaelanderwald41795 жыл бұрын
@@BlueMangooSoftware Hey, thanks for getting back to me. The thing is, I just tried resampling an impulse from 44.1 kHz to 96 kHz in Audacity, and there was no delay/phase shift, no matter how often I converted back and forth. The first conversion added ringing of course, but it was minimal and subsequent conversions didn't add more of it, or at least not enough for me to be able to see a difference. This is what I expected. I don't know what sample rate conversion algorithm you are using in your main.c listing. But could it be that it's using non-linear EQ as its low pass filter? That's the only thing I can think of that would explain your results. We don't know what kind of oversampling every particular plugin uses, so your conclusion might be closer to reality than mine in some instances. But it doesn't sit well with me to state that sample rate conversion produces the artifacts you describe on principle.
@BlueMangooSoftware5 жыл бұрын
Michael Anderwald the Filters used for sample rate conversions in a DAW are FIR filters, which are linear phase and therefore don’t smear the transients so much at mid and low frequencies. Those filters add considerable delay to the signal path, much more than what you see in this video. But when you aren’t processing in real-time the DAW can just shift the audio backward in time to compensate for the delay so you can not see the delay by looking at the output file. If you use plugins with FIR sample rate conversion you get cleaner output after several times going up and down with the sample rate. However, that won’t work for real-time audio effects. The plugins I’m building in this video are for live performance so FIR filters aren’t an option.
@michaelanderwald41795 жыл бұрын
@@BlueMangooSoftware Okay, now I get it. I think I'm going to do some analytical tests with my most used plugins that produce non-linear distortion and offer oversampling, as well as listening tests. It'll be easier than for me to decide what settings to use. Thanks again for the video and the discussion!
@BlueMangooSoftware5 жыл бұрын
Michael Anderwald I would like to see the results of those tests. I am especially interested to see if there is any other saturation or amp sim plugin that can do high gain distortion without aliasing.
@bubblepipemedia34142 жыл бұрын
Fantastic video, thank you!
@tarjiband99043 жыл бұрын
very useful. thanks for taking the time.
@Frankie_G_ Жыл бұрын
Thanks
@briancase61803 жыл бұрын
Hmm. What you call "smearing" is actually ringing. As in the pre-ringing you noticed.
@danielkisel56613 жыл бұрын
Many plugins have mix (dry/wet) knob, does it help with lovering the transient smearing and ringing of oversampling when we push plugin and then use like only 10% of that effect (10% wet and 90% dry) ? Can it help with that because we can for example overcompress sound and then back off mix knob which is easy to do with most plugins and actually gives more natural results in the box. Thanks, nice video!
@BlueMangooSoftware3 жыл бұрын
Using a dryer mix would certainly help in cases where the dry mix control bypasses the oversampling. But that would really have to be tested. I make this video because it's an interesting thing to see but in reality, what happens when you oversample could be totally different for each and every plugin, depending on how it's designed.
@danielkisel56613 жыл бұрын
@@BlueMangooSoftware I found that doing it that way can lead to cleaner results even when using non oversampled plugins in some cases, for example I use the SSL buss compressor on my mix bus and that plugin doesn't have oversampling and when I push it to extremes like 15-20db of gain reduction and then using only around 3-5% of wet signal and 95% of dry it should introduce like 0.5dB to 1dB of gain reduction to the signal which is enough on mix bus and also produce less harmonic distortion and like 20db less aliasing (measured by eye using plugin doctor 🙂)
@TermoNuclearWar5 жыл бұрын
so i would not use oversampling button in fab filter limiter on mastering no more
@BlueMangooSoftware5 жыл бұрын
TermoNuclearWar It depends on what kind of filters it uses. Oversampling is necessary in many situations. So not using it may not be an option. The filters in this video are designed for real-time oversampling. Fab filter is probably using the FIR filters, which have a bit too much latency for real-time but they smear transients less.
@JiihaaS5 жыл бұрын
Aliasing is not the only reason to use oversampling in the master limiter. There are these things called inter-sample peaks, or ISP, which are generated in the upsampling process of a DA converter (the unit that brings the signal from digital to analog world, to be sent to speakers / headphones). Oversampling emulates this process and thus when used in a limiter, will prevent these ISP's from reaching over the ceiling / output level you've chosen. Sometimes ISP's can be several decibels louder than the regular digital sample peaks you normally detect with digital meters and see in the waveforms of your tracks in DAW's, audio editors and such. The regular sample peaks and ISP's together are a thing called true peak, so meters and limiters that are capable of detecting true peak, will be aware of what the signal will truly be after DA conversion. For quite a long time even professional mastering studios and limiter developers were unaware of this issue, and happily distorted their audio with limiters which only handled regular sample peaks.
@nknk-ji1zo3 жыл бұрын
so in the end, it's better to judge the quality of the sound by ears
@heidewatzka5 жыл бұрын
I think here I can maybe get an answer, that would be great. Today I tested my VST Synths on different sample rates. When I change the sample rate of every sound card that I have from 44,1 to a higher sampel rate the plug ins show a kind of "aliasing". Some more some less. Is there a reason for this, do you maybe have an answer? Eveen with a sine wave it shows up. Sorry for my english.
@BlueMangooSoftware5 жыл бұрын
The German what software or hardware are you using to measure the aliasing? Or are you detecting it by ear?
@heidewatzka5 жыл бұрын
@@BlueMangooSoftware Izotope Inside and SIR Spectrum Analyser. I sImply created a sine wave and then played it. But I found out, that not very VSTi make this. I got some VSTi´s that show the same performance then they shoewd at 44,1.And I found out, if I doube the sampletate (44,1 to 88,1) also the other VSTi´s d not have all the peaks anymore. I also asked some ppl if they can also run this tst, and they had the same results. But yes, first i deteced it by ear. I was "scolling" t the frequenzys to see how good i can hear :D. And all of a sudden I was able to hear very loud tones at 10k and even deeper notes at 17k. And then I used a Analyser to see what happend.
@BlueMangooSoftware5 жыл бұрын
@@heidewatzka Is this happening with synths or with effect plugins or both? If could be alaisaing, for sure. But there are other reasons that could occur. Usually I use a sine sweep from 20Hz to 20 KHz or from 20Hz to half the sample rate to check for aliasing. It's easier to distinguish between aliasing and other effects such as saturation when you look at the spectrogram of a sweep, rather than a steady sine wave. This site generates sine sweep files: onlinetonegenerator.com/frequency-sweep-generator.html
@heidewatzka5 жыл бұрын
@@BlueMangooSoftware Thanks for your respond :). I talked, better i try to talk, with a developer of a well know VSTi and he simply blocked and not ansed why this happens to his Synth. He just was talking about, that music is produced at 44,1k and not at 48k and so on and so it does not make any sense to use 48k. But he should know it better. The standard today is ot only 44,1it has shifted more and more to 48k. I think it is some7 calculation thing inside the VST that create this wierd stuff. Like I said, some are perfect at any sampelrate, and some not. But in the end its not good, cause some ppl simply record at 48k and then keep there complete project at that samplerate. And so they have to deal with much more information. As i observed the FR it seemed, that the Frequencys that went over 20k came back at the lower part of the FR. And because of that I think it has to do with the "calculation" of the VST´i. Hope my stupid english makes sense. I did not tryed Effects so far. That was something I wanted to test today or tomorrow. And yes, thanks for the sweep generator. I also found it yesterday and played with it.
@BlueMangooSoftware5 жыл бұрын
@@heidewatzka Well, if the developer said that it does not make any sense to use 48K then it is possible that he designed his app to run at 44.1 only, and he just wrote a simple and not-so-accurate sample rate converter to handle the higher sample rates. We are currently working on a text-to-speech singing synthesizer that has a fixed output sample rate like that. In order to support other sample rates in the DAW my first idea was to use an open source sample rate conversion library. But that library had two problems. First, it looks complicated to integrate it into an existing project. And second, it seems that it would cause some additional latency. For a synth that people are playing live with a MIDI keyboard, we would not want to add that latency. So we wrote our own sample rate converter using some of the same oversampling and antialiasing filter techniques shown in this video. The antialiasing filters used in the video are all pass filters, not the FIR filters that most software use for sample rate conversion. They are based on the filter design used by Laurent De Soras in his c++ HIIR resampling library: ldesoras.free.fr/prod.html Laurent de Soras shares his c++ code freely on his website. We implemented the same method in C, optimized it for Mac and iOS, and we also share our code freely on gitHub: github.com/sirhans/AudioFiltersXcodeProject You are welcome to offer those links to developers who are looking for realtime sample rate conversion code. In most cases they will probably ignore you though, because it's very expensive to rewrite major parts of old code and devs don't make much money by fixing old apps.
@MathieuPrevot3 жыл бұрын
If you try to see a soliton with a sinusoïd-based / Fourier filter, it will never work, because its perfect nature is stationary, unlike wavelets, which are transients. Don't you have wavelets or dictionary based oversamplings instead ? Also, avoiding displaying mathematics is actually making everything more complicated, less clear; why not using such a simple language ?
@РодныеИстоки3 жыл бұрын
there's no delay after oversampling -- we see a few more samples before the impulse after upsampling because the upsampling creates four times as much new samples to compensate for the timings to stay the same. Ringing happens in any case due to incorrect filtering, but it's much less in upper sampling rates because they can be less steep. Smearing transients is normal in upper sampling rates, because of the energy redistributed over a wider range. You should have named your video " How oversampling distorts your sound in a much better way "
@nolondon4 жыл бұрын
its crazy that you spent 45 minutes on a video you only half way understand. sheesh. lots wrong here