Linear to semi-logarithmic scale
I've got some FFT results I want to draw with a log10 scale on the x axis.
Let's call
nBins the number of bins (window size / 2)
nPixels the total number of pixels
We will assume that the frequencies are between 20 Hz and 22050 Hz
For each bin, I'd like to find out the corresponding pixel.
First, converting between a bin and it's corresponding frequency is easy :
freq= nBins/22050* numBin +20
Now I have freq it would be easy to draw it on a linear x scale but how to draw it on a log10 x scale ?
My math is really rusty and this doesn't seem trivial (maybe it is ...)]