https://gist.github.com/2cf4998949f49b58ff284239784e1561
This is an experiment with real time spectrogram display of microphone audio.
It uses AvAudioEngine and installs a tap to access raw samples , then performs an fft and displays it. I would like to experiment with with an open gl shader, but have not tried yet.
Currently this runs at about 3Hz update rate, which is an AvAudioEngine limitation. It is theoretically possible to install a renderer at the audiounit level, to access data faster, but I have not tried yet. Also, it should be possible to fill a circular buffer at 3Hz, but use scene at 60Hz to access the data for more frequent updates.

