Getting real dB values from AnalyserNode.getByteFrequencyData()

https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteFrequencyData gives an example of how to visualize something like dB across a range of frequencies, but it’s not very clear that the values it returns aren’t decibels.

It says that each array cell ranges from 0 to 255, so that suggests to me that one has to do the following to get a “real” dB value…

If X is a value from the array, then

X_dB = analyser.minDecibels + (analyser.maxDecibels - analyser.minDecibels) * X / 256

Is that right?

Btw, the address for this list is malformed at https://developer.mozilla.org/en-US/docs/MDN/Feedback because it contains //