Need help identifying a low pass filter from code only

DSP, Plug-in and Host development discussion.
mystran
KVRAF
6930 posts since 12 Feb, 2006 from Helsinki, Finland

Post Fri May 13, 2022 2:49 am

Kapsy wrote: Fri May 13, 2022 2:15 am The F1 curve (ascending curve in red) seems to be approximated. On inspection the coefficient code uses a massaged exponential lookup in place of Chamberlins F1 function. However, the approximated curve is quite a bit off Chamberlins curve (blue ascending curve).
It could have some additional "fudge factors" baked in for "aristic reasons" or whatever. Same thing with resonance really, it might have been designed "artistically" so that it "feels good."

Personally I've always been a strong supporter of analog-like straight 1V/octave filter CV, but from what I've gathered, not everyone feels the same... or it could be just that an accurate exponential would have been too expensive or whatever. As far as Q curves go, tweaking them is something even I would do (ie. try to put more precision where perceptible changes are sensitive to nominal values and less where there's little audible difference from small changes) except where I specifically wanted to preserve the "feel" of some analog original.
Preferred pronouns would be "it/it" because according to this country, I'm a piece of human trash.

Kapsy
KVRer
Topic Starter
11 posts since 8 Nov, 2016 from Japan

Post Sat May 14, 2022 2:36 am

mystran wrote: Fri May 13, 2022 2:49 am Personally I've always been a strong supporter of analog-like straight 1V/octave filter CV, but from what I've gathered, not everyone feels the same... or it could be just that an accurate exponential would have been too expensive or whatever. As far as Q curves go, tweaking them is something even I would do (ie. try to put more precision where perceptible changes are sensitive to nominal values and less where there's little audible difference from small changes) except where I specifically wanted to preserve the "feel" of some analog original.
Ok thanks, interesting to know that artistic and "feel" changes come into play. Many filter theory books never cover such topics. I guess if the UI has a cutoff and resonance knob that goes from 0 to 1 with no correlation to a scale of some sort then who's to argue if it feels right?

Key tracking cutoff modulation would still be important I guess, where at full mod the filter could resonate at the frequency of the MIDI note. Most synthesizers I've come across seem to do this accurately too.

mystran
KVRAF
6930 posts since 12 Feb, 2006 from Helsinki, Finland

Post Sat May 14, 2022 3:37 am

Kapsy wrote: Sat May 14, 2022 2:36 am Ok thanks, interesting to know that artistic and "feel" changes come into play. Many filter theory books never cover such topics. I guess if the UI has a cutoff and resonance knob that goes from 0 to 1 with no correlation to a scale of some sort then who's to argue if it feels right?
Most filter theory books are not written from the point of view of musical DSP, but really I think the "feel" of various parameters is something that isn't discussed enough in general. The two topics where you can find some more detailed discussion on the subject is mixer gain faders and panning laws.

For mixer tapers, you'd typically want it roughly linear in decibels = exponential at the top and then roughly linear in gain at the bottom where you don't need as much resolution and it should eventually go to zero. For panning the theoretical ideal might be cosine taper, but even then you might prefer to have a bit more resolution in the middle, so you might go for something like sqrt() instead.

Yet, I feel like the discussion of how the controls should behave is important for every parameter. As I already mentioned, for filter cutoff I tend to prefer straight 1V/oct (=linear in pitch). On the other hand, for something like envelope timing parameters, straight exponential tends to put a little too much range in the very short settings if you want the fastest settings to be fast (eg. the difference between 1ms and 10ms is important, but not nearly as important as the difference between 1sec and 10sec), so that's another potential case for a "semilog" response of some sort. For something like oscillator mixer gain pots you might want something that's closer to linear in gain than a regular mixer taper, but linear gain might still not be ideal, so you might opt for something like x^2 or whatever to distribute a bit more range at the lower settings.

In a sense, generally one would prefer every pot to be roughly "perceptually linear" (ie. so it feels like the change is similar over the whole range), but in practice "perceptually" is a very fuzzy thing and even the same type of control (eg. gain) in different contexts might benefit from different tapers.
Key tracking cutoff modulation would still be important I guess, where at full mod the filter could resonate at the frequency of the MIDI note. Most synthesizers I've come across seem to do this accurately too.
The nice thing about straight 1V/octave CV for filter cutoff is that you can just add all the different modulation sources (eg. actual tuning pot, scaled enveloper modulation, scaled/switched note-CV) before exponentiation and everything just works... until you hit the maximum cutoff you can handle at which point you need to clip it. If you clip it hard it can sound a bit weird with high resonance if the maximum resonance frequency is audible (which would always be the case without oversampling). If you clip it soft, then your key-tracking will start to go out of tune at the higher end of the range, though actual analogs might do this as well and it's not a huge problem as long as it doesn't happen at too low of a frequency... so there's another potential "arististic" choice to be made here, finding a suitable clipping function (hard enough not to cause too much tuning trouble, soft enough that a filter sweep doesn't just abruptly stop when it hits the maximum).

In a sense, there's a lot of hard science that you can get into especially when it comes to circuit simulation and what not, but personally I feel like it's just as important when writing a plugin (whether it's an instrument or effect) to really test every knob (and this also applies to things like modulation; modulating the knob position might not always be the ideal choice especially if you're using funky custom knob tapers somewhere) and think about whether it feels good, whether it feels like the precision is where you want it and then also think about whether it makes sense from the technical point of view.
Preferred pronouns would be "it/it" because according to this country, I'm a piece of human trash.

Return to “DSP and Plug-in Development”