On Jul 4, 2023, at 5:02 PM, Neil Goldman wrote: > That reminds me I have heard the argument that 48k is better than 44.1 for > the reason of allowing a smoother falloff for an anti-aliasing filter. I > don't really believe it matters, I've tested both and can't hear a > difference. The filtering in either case happens above the audible range. But > mathematically it's technically true. So I guess that's +1 theoretical point > towards Yisheng's question lol.
The difference is in the brick wall filter design. It's difficult to avoid altering the phase and amplitude of in-band audio when a steep filter is employed. The challenge is slightly easier for 48 kHz. However, there is still a wide variety of brick wall filter technology out there. If you have control over all aspects of recording, processing, and playback, then 48 kHz is better. However, some gear for the ADC and/or DAC equipment might not have very good anti-alias / reconstruction filtering, so there's no guarantee that 48 kHz will be better. I record live at 48 kHz just in case someone is capturing video and might want the audio. Better to downsample when video isn't needed than upsample and have reduced bandwidth when video is combined. > "the non-linear effects will be filtered on input and output to reduce > aliasing" > > Sorry this bit doesn't really make sense to me though. You can't distinguish > whether a signal has aliasing or is just an intentionally nasty waveform. So > it's not technically filtering the non-linear artifacts as much as its just > filtering everything above the cutoff frequency. That's why oversampling > works so well, because you extend your signal bandwidth with a new region > that had no frequency content originally. You're adding extra frequency > headroom for harmonics to be generated without hitting the nyquist frequency. > You can then filter that out and be confident you're removing mostly > artifacts and inaudible material while not affecting the original signal > bandwidth very much. I'm sure it doesn't make sense because I took too many shortcuts in my phrasing. You are correct, in that aliasing inserts new frequencies in between the frequencies of the content. There's no way to un-mix those frequencies after they're generated. Typically, though, most input audio has a spectrum that falls off as frequency increases. Thus the amplitude of the aliasing drops off as frequency decreases. With a very high sample rate, the amplitude of the aliasing might drop off below any imaginable noise floor by the time the audible spectrum is reached. Of course, it's far better to avoid creating aliasing, but it's difficult to avoid non-linear processing for certain desirable effects. To restate my original intent, a plugin would filter incoming audio to reduce the amplitude of ultrasonic frequencies that might alias into the audible spectrum. Then, after non-linear processing, the output audio could be filtered to remove some of the aliasing, and hopefully what remains is inaudible. > But if you have a signal that actually utilizes the full bandwidth of, let's > say 192k, you would be filtering out desired parts of your signal. My joke about the "vintage" option is that most ancient analog audio gear has limited bandwidth anyway, so this excessive filtering might actually sound familiar. In my experience, there's no audio with content at those frequencies. I have one microphone pair that is flat to 50 kHz, but (a) that's still a fraction of the 96 kHz bandwidth of a 192 kHz sample rate, and (b) everything I've recorded with that microphone shows a dropoff of amplitudes as frequencies get higher. If the ultrasonics are truly desired, then it might be necessary to completely eschew non-linear processing. > Resampling up/down by an integer amount is really simple. The filtering is > the most computationallly expensive part. If you want to downsample by a > factor of 2 you use a lowpass filter and then just skip every other sample. > For a factor of 4 you lowpass filter and then take 1 sample, skip 3. These days, processors are so fast that we need not limit ourselves to integer multiples. Apple's CoreAudio provide mathematically-perfect filters for upsampling from any lower rate to any higher rate. For downsampling, it's equally ideal within the limits of the low-pass filtering that Apple has chosen, and they even allow a wide range of quality versus processing time options on their SRC. i.e. Since I no longer feel the need to write my own SRC code, and since third-party analysis of Apple's code shows that it excels, I've relegated the integer-multiple-SRC as a legacy concern. > So if you're already going to be doing the filtering then doing the sample > decimation is likely cheaper than not doing it. You do avoid needing extra > filtering each upsampling step. But unless your other effects are > computationallly simpler than a lowpass filter, taking the extra effort to > only upsample/downsample when a plugin warrants it will be more efficient > than running the entire project at a higher sample rate. Ah, here I should probably clarify. Rather than perform the type of filtering that SRC demands, I'd be more likely to model the low-pass response of vintage gear, or at least choose a gentler low-pass that might be more musical. e.g. I wouldn't apply the kind of brick-wall filter needed to downsample to 44.1 kHz, but I might put a gentle low-pass that starts to roll off somewhere near 20 kHz. > As for your idea of dynamically choosing when to oversample, some plugins do > that. I know Monark will apply a 2x oversample if running below 88.2k. > Otherwise it will use the session sampling rate. I was thinking of some of the limitations of Pro Tools plugins, but they're gone through many iterations of hardware and software, so my information is probably way out of date. I have little to no experience with Native Instruments, so thanks for mentioning MONARK. Brian Willoughby
