The spectrum code that I wrote a few months ago was updated with a fourier transform of the audio signal that makes plotting a proper spectrum(frequency vs. amplitude) possible. The code is here. The integration uses Simpson’s 1/3 rule. Below are a few references that I found useful, plus some trigonometry knowledge from school days came in handy!
This is the source of a demo that we did for comparing root finding methods. It needs to have gnuplot installed for the graphs, and will only compile on POSIX systems due to the wrapper for gnuplot using POSIX API.
Please download the newest multi-axel
There is still one bug that has to be fixed, it is not that major but needs fixing. A double free at startNewDownload(), I fail to see where the hell that happens!