log scale parameter

Author
hbeaver
Max Output Level: -90 dBFS
  • Total Posts : 1
  • Joined: 2005/06/13 05:19:08
  • Status: offline
2005/06/13 05:27:30 (permalink)

log scale parameter

I am new to making directx plugins and I am in the process of making my first one. Now, I have a parameter that controls a gain from -3 dB to +3 dB. I have everything working fine, except I want my slider (or the internal parameter range) to be on a log scale so that the interface makes more sense. As it is now, 0 dB is about one quarter of the way from the left side instead of in the middle. Also, the resolution for adjusting the slider near -3 dB is significantly different from the resolution near +3 dB and this make the interface very awkward. I would just make a new function to change the conversion from an internal parameter to an external parameter to include a log scale, but I am afraid that would mess up something with the automation. Also, I have other parameters that cannot be on a log scale. Is there any way to resolve this problem?

Thanks,
Chris
#1

1 Reply Related Threads

    bluecat
    Max Output Level: -87 dBFS
    • Total Posts : 177
    • Joined: 2004/07/02 10:04:18
    • Status: offline
    RE: log scale parameter 2005/06/14 03:22:48 (permalink)
    You have two ways to solve your problem:
    1. do the conversion afterwards (sample by sample). This way you'll keep the automation smooth the code simple.
    2. do the conversion afterwards just when getting the parameter derivatives and then multiply derivatives instead of adding them (sample by sample), because the exponential function can work this way. You'll have do work out the derivatives computation from the original parameter though.

    I hope this helps. Solution 1 is by far the easiest but it's a bit CPU consuming if you use the standard lib exp function. Try to find a faster implementation.
    For the second just write the equation and you'll get the conversion (I don't have it right now).

    But if you do a non linear operation in the external/internal conversion you'll mess the automation derivatives computations!
    #2
    Jump to:
    © 2024 APG vNext Commercial Version 5.1