Subj. Talking about performFrequencyOnlyForwardTransform function. It doesnt seem to be 0-1, alot of values are way above 1. I want to get it in dBs if possible.

# In what units does frequency fft return values?

**noahdayan**#2

As shown in the `SimpleFFTExample`

project from the JUCE example folder, you can map the output values of the FFT by using the `jmap`

function and the `FloatVectorOperations::findMinAndMax()`

function beforehand to find the minimum and maximum values in your output values.

To convert from a gain value to a decibel value, use the `Decibels::gainToDecibels()`

function and specify the value you want for -INF dB.

**CustomPhase**#3

Except it wouldnt be correct, since the values always gonna be normalized, and changing the volume of the incoming sound wouldnt affect the spectrum analyzer output. Anyway, ive done it already, more or less acceptably correct, just by using log(2 * level / fftSize)

**daniel**#4

That seems like a good starting point. Can somebody with good elementary maths skills comment on that, if that is the right approach, or is it just approximating?

When I start to add a serious analyser to my projects, I would want it to be based on proper maths rather than guesswork…

**Im_Jimmi**#5

The output from preformFrequencyOnlyForwardFFT() is in the range 0 to the size of the FFT.

**daniel**#6

The output from preformFrequencyOnlyForwardFFT() is in the range 0 to the size of the FFT.

And this is then gain values, so I transform them to dB using the Decibels::gainToDecibels, right?

Lovely, that makes sense now. Thanks!