Normalizing a spectrogram or a pitch class profile I am developing a chord recognition program using neural networks.I need to normalize the spectrogram or my pitch class profile to provide inputs for the neural network. The pitch class profile classifies the frequency into 12 class semitones (From note A to G). 

The problem here is it produces really high values and low values: they can be on the order of ten, one million, or even a trillion. Meanwhile, the input values for the neural network should be between 1 and -1.

What is a normalization formula that I can use to transform the values to be between 1 and -1?
Audio volume is usually measured in decibels (a logarithmic scale) precisely because there's such a wide range of input energies. But in your case, it's unlikely that you need volume at all. What you need is relative volume: what fraction of the total energy in the signal is in each FFT bin? Since the energy in each FFT bin is positive, it follows that the relative contribution of each FFT bin is strictly in the range [0,1]. Multiply by 2, subtract 1, and you're in the correct range. And as a bonus, the extremes of the range are quite unlikely in practice.