Control Rate frequency for Filter Cutoff modulation

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

PurpleSunray wrote:
- build your oscilator in way it does not alias (such as using wabetable OSC, or limit envelope speed/forms). Legacy standard for digital oscilators.
- oversample, low-pass filter and convert to target rate. Legacy standard for ADCs that don't run a low-pass filter on analog side of the circuit.

What's the modern standard?
Build your oscillator in a way it (almost) does not alias. BLIT, BLEP, DPW. Modern standard for digital oscillators. There's nothing wrong with the wavetable either, if done right and you're not building an analog modelling synth.

Actually now maybe I understand what you mean by oversampling. You were talking about generating the waveforms in the oversampled way and lowpass-downsampling them to the control rate. I wouldn't even have thought about this approach, so I was assuming you are referring to the interpolation of control signals as oversampling (which it actually is).

Edit: one reason to do oversampling IMHO in this context would be not at the generation stage (see the above), but at the modulation time. I guess that could be what Jeff was referring to. As I mentioned earler, modulation expands the signal's spectrum, so it may exceed Nyquist. Oversampling could help to reduce the resulting aliasing. But that's mostly relevant when we are talking about audio frequency modulators.

Post

Z1202 wrote: Edit: one reason to do oversampling IMHO in this context would be not at the generation stage (see the above), but at the modulation time. I guess that could be what Jeff was referring to. As I mentioned earler, modulation expands the signal's spectrum, so it may exceed Nyquist. Oversampling could help to reduce the resulting aliasing. But that's mostly relevant when we are talking about audio frequency modulators.
Yeah, oversampling can usefull at a lot of places. Really wondering that it is new to you :D
IIR EQs come to my mind first. If you do a bell on the middle of the freq spectrum, it will be symetric. If you move the bell near upper end of the spectrum, it will not be symetric anymore, but a dented bell. This sounds shity, or if someone actually likes it - it doesn't sound like an analog EQ. Reason is the IIR approaching nyquist with known consequences. How to solve? Oversample.. simply increase nyquist ;)

Post

PurpleSunray wrote:Yeah, oversampling can usefull at a lot of places. Really wondering that it is new to you :D
Well, your way of using the oversampling was definitely beyond my imagination.

As for running an EQ or any other filter at 88kHz or above, I wouldn't even call that oversampling. For me it's more or less a standard sampling rate. :D Oversampling is if you do parts of your algorithm at a rate different that the rest :D

Post

Z1202 wrote: As for running an EQ or any other filter at 88kHz or above, I wouldn't even call that oversampling. For me it's more or less a standard sampling rate. :D Oversampling is if you do parts of your algorithm at a rate different that the rest :D
Well the term oversampling on DSP means, samplerate is a multiple of the nyquist rate.
Used everywhere where you want to increase nyquist for whatever reason.
Such as on modulation channels (do insane amount of oversampling so that you can use a rather simple OSC on the LFO, rather than wavetalbe, graintable, BLIB, BLUB, ect.. constructs),
or on ADCs for better aliasing-filter performance (nobody wants to run analog low-pass, so they run i.e. the sigma-delta at much higher rate, digital low-pass and then convert to target rate),
or any kind of effects that benefits from higher sample rate and/or higher nyquist such as the IIR EQ.
Very flexible tool :D

Post

PurpleSunray wrote:
Z1202 wrote: As for running an EQ or any other filter at 88kHz or above, I wouldn't even call that oversampling. For me it's more or less a standard sampling rate. :D Oversampling is if you do parts of your algorithm at a rate different that the rest :D
Well the term oversampling on DSP means, samplerate is a multiple of the nyquist rate.
By definition of the Nyquist rate, sample rate is always a double of the Nyquist rate, so your definition of oversampling doesn't seem to work :D
PurpleSunray wrote:Very flexible tool :D
And quite expensive. That's why people have developed ways to avoid excessive oversampling.

It's ironic that you advocate the use of oversampling, while recently you were just advocating undersampling (low rates) for control signals. :D

Post

PurpleSunray wrote: Yeah, oversampling can usefull at a lot of places. Really wondering that it is new to you :D
IIR EQs come to my mind first. If you do a bell on the middle of the freq spectrum, it will be symetric.
Same as with oscillators, oversampling to improve EQ shape is like the most inefficient possible way to do it. It's much better to just fit the desired shape directly (which is what most of the better EQs do these days).

Post

mystran wrote:
PurpleSunray wrote: Yeah, oversampling can usefull at a lot of places. Really wondering that it is new to you :D
IIR EQs come to my mind first. If you do a bell on the middle of the freq spectrum, it will be symetric.
Same as with oscillators, oversampling to improve EQ shape is like the most inefficient possible way to do it. It's much better to just fit the desired shape directly (which is what most of the better EQs do these days).
Indeed, please feel free to share your band limited non oversampled distortion algo :D

Post

mystran wrote: Same as with oscillators, oversampling to improve EQ shape is like the most inefficient possible way to do it. It's much better to just fit the desired shape directly (which is what most of the better EQs do these days).
You can't.
If your EQ is build with filters instead of FFT you have an issue if you approach nyquist.
Image you add a bell / peak, lets say +3db, at 1Khz and a width of 2kHz. It's a nice symetric bell.
Now move it torwards the upper end of the spectrum and think about the frequency respone of a digital low-pass if you approch nyquist. Looks the order of your filter magically increases since nyquist is the limit, can't filter above. The nice symetric bell converts into a non-symetric bell.
You don't even need need to change / improve EQ shape, it happens automatically and it sounds horrible - not like known from any analog EQ. There is no other solution than oversampling so that filters continue to have same frequency respone near nyquist.

Post

Oversampling is usually the last resort, if everything else fails.

Actually, the whole art of DSP is more or less about trying to fit the processing into an as low sampling rate as possible. Starting with the sampling theorem. One could use a much higher sampling rate (I guess around 100MHz or so) and forget about brickwall bandlimiting at the ADC (one still would nee to do some, though) and about complicated DACs (one could do a naive sample and hold). Same holds for antialiasing algorithms, bilinear transform etc., they would not be needed anymore. Almost everything could have been done in a naive way. But would be prohibitively expensive.

So the people figure out a way how to do certain things at lower sampling rates. In a way those are "highly-scientific cheating tricks". Starting with recording/playback, which can be done at as low as 44kHz if proper ADC/DAC conversion formulas are implemented. For filtering often 88kHz is a reasonable minimum if you use ZDF/BLT (you can fit the amplitude responses at 44kHz more or less, but that'd destroy the phase response). For nonlinear processing there is maybe a couple of tricks to reduce the sampling rate just a bit.

Using a low control rate goes into the same direction of cheating. And, as with other cheating tricks, there are drawbacks and artifacts. It is therefore important to be able to judge the amount of this artifacts, which includes the knowledge of where to search for them.

However, with modern CPU powers and modern expectations of the audio processing algorithm quality, chances are that the HQ audio processing will take noticeably more CPU than doing the control processing at full sampling rate. I guess that's what other posters were more or less pointing at.

Post

PurpleSunray wrote:There is no other solution than oversampling so that filters continue to have same frequency respone near nyquist.
There is, and that's the whole point. However it distorts the phase reponse (which is much less audible, so a cleaner way is indeed to run at 88kHz).

Post

Z1202 wrote:
PurpleSunray wrote:There is no other solution than oversampling so that filters continue to have same frequency respone near nyquist.
There is, and that's the whole point. However it distorts the phase reponse (which is much less audible, so a cleaner way is indeed to run at 88kHz).
Can you post any link about this? Would like to understand how it works (is it just a normal IIR + some trick I don't know or any special filter design?)

Thank god I have FabFilter bundle, with oversample buttons on every plugin. :D
For me it was vice versa (thought oversampling is new thing, wasn't possible on the past, but todays CPUs can handle it). Pro-Q as well the EQ on ableton both have oversample buttons. Haven touched any other EQ since years. So I did assume it became kind of standard over time with faster CPUs
(I actually cannot see any little difference on CPU load if run FabFilter Pro-Q or Pro-L on 4x oversample, or if disable oversample - so it's on by default for me *g*).

Post

PurpleSunray wrote:
mystran wrote: Same as with oscillators, oversampling to improve EQ shape is like the most inefficient possible way to do it. It's much better to just fit the desired shape directly (which is what most of the better EQs do these days).
You can't.
If your EQ is build with filters instead of FFT you have an issue if you approach nyquist.
BLT maps an infinite frequency range in analog to a finite digital range. So infinity maps to Nyquist, which in the case of a peak filter = unity gain and for a low pass it is zeroed. This is regardless of filter settings and obviously wrong. However the BLT isn't the only game in town and other approaches can get very close to the analog magnitude response.

Post

PurpleSunray wrote:Can you post any link about this? Would like to understand how it works (is it just a normal IIR + some trick I don't know or any special filter design
There are a number of approaches some better than others. Orfanidi came up with a way to design filters that are warped in the analog domain, so that infinity has the desired response for nyquist. After BLT the correct nyquist magnitude is achieved. (IIRC)

Other methods use MZT, or similar, which have a simpler error function than BLT and can be corrected more easily.

I'm on my phone right now, so it's a pain to hunt down links and post here in general, but I will dig up some links when I get the chance.

Post

Thanks!
For anyone also looking for this - that's the paper:
http://www.collinsaudio.com/Prosound_Wo ... amping.pdf
Still trying to understand, but from a first look it simply is a filter with Q increasing when approaching nyquist. Called a "decramping" filter (never heard that before :o )

Post

matt42 wrote:
PurpleSunray wrote:Can you post any link about this? Would like to understand how it works (is it just a normal IIR + some trick I don't know or any special filter design
There are a number of approaches some better than others. Orfanidi came up with a way to design filters that are warped in the analog domain, so that infinity has the desired response for nyquist. After BLT the correct nyquist magnitude is achieved. (IIRC)

Other methods use MZT, or similar, which have a simpler error function than BLT and can be corrected more easily.

I'm on my phone right now, so it's a pain to hunt down links and post here in general, but I will dig up some links when I get the chance.
These are fairly approximate though (although MZTi at 1x is arguably almost always better than BLT at 2x oversampling). Once you drop the requirement for "order preserving" and accept additional zeroes, you can easily get results that beat any reasonable amount of oversampling, at least in the LTI case.

https://users.aalto.fi/~ssarkka/pub/eq-article.pdf gives one possible approach, though there are other possibilities based on more MZTi like error correction fitting, etc.

Oversampling IS useful for some things obviously, non-LTI systems in particular, but for something like a (mostly) static EQ, if you just want a perfect analog curve then going the oversampling route is very inefficient.

ps. the really curious thing is that while you need some latency to properly preserve the phase of an analog prototype, you actually typically need a whole lot less than what you would need for linear-phase oversampling that results in comparable quality

Post Reply

Return to “DSP and Plugin Development”