Coder Social home page Coder Social logo

Comments (2)

yupferris avatar yupferris commented on August 15, 2024

While not directly related to the issues above, another thing we've discussed previously is that the current param <-> freq mapping is too coarse at low frequencies. Admittedly, the currently-used curve is something I just threw together as a "nonlinear mapping" and is basically x^2 mapped to the desired cutoff range. It seems the desired curve is typically logarithmic (eg exp(ln(20) + x * (ln(20000) - ln(20))), proposed here). I graphed the two to compare:

bilde

Clearly, the logarithmic curve offers significantly better resolution in the lowend (as well as other crucial parts of the spectrum), just like we want. Further, the curve is the same regardless of the base used, which is convenient for us, as we already have an implementation of exp2 in Helpers. This implies that we'd likely need to add log2 as well, but this may not be the case - if we can get away with only ever doing the forward mapping, then because the inputs to log2 are only ever constants, constant folding removes the calls altogether.

Thus, I propose the new mapping be exp2(log2(low) + x * (log2(high) - log2(low))) where low=10 (judging from the -3dB point in your graph above) and high=22000, with no inverse; if an inverse is desired, it should be (log2(y) - log2(low)) * (1 / (log2(high) - log2(low))) and the log2 shim, if required, is then trivial to write using fyl2x.

Admittedly, though, I have yet to actually try such a mapping (nor the extended range) in an actual plugin; these are just some notes as I happened to think about it. It should be tested, preferably against another plug like Pro-Q 3.

EDIT: Just to make the logarithmic mapping a bit clearer, I generated a log-linear plot as well:

bilde

Even though I've been a bit lazy with the labels, I still find it more intuitive to imagine scaling the parameter linearly and using this plot to determine what the frequencies would be. I'm guessing this would feel a lot better. In fact, even just comparing against a screenshot of Pro-Q 2:

bilde

Just to pick a point of reference, in both pictures, 1kHz appears to be mapped to ~0.6, which is a good sign.

from wavesabre.

yupferris avatar yupferris commented on August 15, 2024

Also, to clarify: the peaking behavior of the LPF with default settings currently, is that only due to the current โ€œneutralโ€ Q mapping, and/or is it also related to the trig tables like the HPF?

from wavesabre.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.