"Linear-to-GUI" live value -to- understandable dB or amplitude

    Max For Live

    Guillaume Bertrand's icon
    Guillaume Bertrand's icon
    Guillaume Bertrand
    Sep 28 2012 | 10:21 am
    I would like to make a max for live device that can offset multiple live tracks volumes at once, given a dB value.
    I managed to get the ids of the tracks I want the volume changed. I currently use a live.observer to get the current volume.
    The problem is that live.observer gives me a "Linear-to-GUI" value (as described in the Live Object Model reference). I can't figure out how to convert this "Linear-to-GUI" value of a volume to an amplitude or a dB value that I can do my math on... It seems that from 1. to 0.85 it goes from +6dB to 0dB and from 0.85 to 0. it goes from 0dB to -70dB
    But even splitting those two cases appart I cant figure out how to get an amplitude or a dB value.
    Any thougths?
    PS : I don't paste my patch since the helpfile of live.observer is pretty much it !

    • Stephane Morisse's icon
      Stephane Morisse's icon
      Stephane Morisse
      Sep 28 2012 | 11:09 am
      I had the same problem when I wanted to make a fader in Lemur that would reflect, using a script, the fader's value as dB. I tried this expression, found on the Liine forum : 20*(log(x*127/108))*6/3.241. It works for the upper part of the fader, but quickly drifts away from the values as readable in live. I had a mail conversation with Ableton because I supposed that at least a programmer, if not the support guys, could give me an answer, but they never came back to me. You should read this related topic : https://forum.ableton.com/viewtopic.php?f=1&t=182375&p=1418659&hilit=lemur+right+expression.
    • Guillaume Bertrand's icon
      Guillaume Bertrand's icon
      Guillaume Bertrand
      Sep 28 2012 | 12:37 pm
      Seems like a tough problem ! I'll keep looking at the topic you mentioned in case there's something there someday. Thanks for the formula, but without the lower part of the fader, there's not so much we can do with it.
      Until then I think I will try to conceive my patch and its use another way.
      Thank you very much for your time.
    • Stephane Morisse's icon
      Stephane Morisse's icon
      Stephane Morisse
      Aug 26 2015 | 5:40 pm
      Hi Guillaume, I come back to this old thread, did you see this : http://flo.szk.fr/2015/06/07/how-to-remote-volume-using-db-values-in-max-for-live-db-conversion-to-0-to-1-linear-value/ ? although nearly three years later we sill wait a clear answer from Ableton...
    • Drum Stix's icon
      Drum Stix's icon
      Drum Stix
      Dec 18 2019 | 11:08 am
      Old post I know, but still relevant because not answered yet. Anyway, I was able to get it almost perfect.
      It is exactly right as Live's reported value from +6dB down to -18dB. From -18dB down to -70dB I have it almost perfect. Just sometimes there's a neglectible 0.1dB difference. Please see my Max for live patch for more info. It contains my convertLiveFaderTodB and convertdBToLiveFader patchers. The formulas are in there. https://maxforlive.com/library/device.php?id=5886
    • Roman Thilenius's icon
      Roman Thilenius's icon
      Roman Thilenius
      Dec 18 2019 | 6:01 pm
      wrong linear to db conversion is an old tradition around here.
    • ET FY's icon
      ET FY's icon
      ET FY
      Mar 29 2022 | 9:00 pm
      Thank you DRUM STIX for sharing your solution, I was going crazy :)