Hey all - here is a useful bit of code for anyone wanting to get a Frequency Spectrum (Fast Fourier Transform) into their software.
This plugin listens for incoming audio, performs the FFT, finds the peak and tells you what note it hears (see the screenshot, where it displays a note name in the upper left). In VST mode it also outputs a midi stream indicating this note (AU plugs don't do midi, recall). In the example below you can see the FFT plugins output runs into a piano VST ..... the idea being here that you whistle a note, the FFT plug determines what note it is, and the piano plays that note along with the whistling.
It only works on mac currently because it uses Macs accelerate framework:
http://developer.apple.com/performance/ ... ework.html
Eventually I'll add FFTw support for windows - but not today.
This code is a good example of creating a plugin with Juce (it was adapted from the juceDemoPlugin example project), and also a good example of using the accelerate framework.
Blog article, an downloadable mac VST and AU plugins (compiled):
http://www.livetronicastudio.com/basic- ... en-source/
Github source code:
https://github.com/aaronleese/FFT-Plugin
Also - Vinn - if you're out there (when are you not ...), I have a plugin I'll drop here soon that creates a versatile little filter (using your code, naturally) and displays the brickwall chart with an overlay of the FFT after the filter has been applied.
