instrument.volume questions...[].volume  

A few questions about this field:

Is there a way to convert this value to a “pretty” string showing the gain in db?

  1. That is totally up to you, but if you want to alter the global instrument its volume, than that is pretty much the way to go.
  2. You can find these function descriptions inside the LUA.Standard.API.lua document of the scripts’ documentation folder:
    – Converts a linear value to a db value. db values will be clipped to
    – math.infdb
    – > example: print(math.lin2db(1.0)) -> 0
    – > print(math.lin2db(0.0)) -> -200 (math.infdb)
    math.lin2db(number) -> [number]

– Converts a dB value to a linear value
– > example: print(math.db2lin(math.infdb)) -> 0
– > print(math.db2lin(6.0)) -> 1.9952623149689
math.db2lin(number) -> [number]

– db values at and below this value will be treated as silent (linearly 0)
math.infdb -> [-200]

Excellent - thank you so much!