I figured out the format for mixer gain parameters in djmdMixerParam. The High and Low values are the upper and lower halves of a packed 32-bit IEEE754 float value. Each value represents a linear voltage gain factor, i.e. 1 = 0dB, 10 = +20dB, 0.1 = -20dB.
The gain value is the value of the auto-gain knob in the Grid Edit panel, which is also set by the analysis process. The peak value doesn't seem to be actually exposed in the UI, but it's the peak amplitude of the track (I've verified that this matches the peak amplitude in Tenacity) and is updated when the waveform is loaded.
You can convert the dB numbers back to linear gain factor by calculating pow(10.0, g/20.0), then re-packing the float to a pair of 16-bit unsigned integers using the same struct.unpack approach.
Would be cool to get this conversion in the API, either as a property or a function on the DjmdMixerParam class.
I figured out the format for mixer gain parameters in
djmdMixerParam
. The High and Low values are the upper and lower halves of a packed 32-bit IEEE754 float value. Each value represents a linear voltage gain factor, i.e. 1 = 0dB, 10 = +20dB, 0.1 = -20dB.Here's a quick script to convert the values:
Example output:
The gain value is the value of the auto-gain knob in the Grid Edit panel, which is also set by the analysis process. The peak value doesn't seem to be actually exposed in the UI, but it's the peak amplitude of the track (I've verified that this matches the peak amplitude in Tenacity) and is updated when the waveform is loaded.
You can convert the dB numbers back to linear gain factor by calculating
pow(10.0, g/20.0)
, then re-packing the float to a pair of 16-bit unsigned integers using the samestruct.unpack
approach.Would be cool to get this conversion in the API, either as a property or a function on the
DjmdMixerParam
class.