So the code appears to be working well. I posted some plots of the recored data and the FFT of the high and low version of the Sonic Screwdriver.

https://github.com/dloman/SoundLock/blob/master/samplehigh.png

https://github.com/dloman/SoundLock/blob/master/samplelow.png



Am going to test on the rpi to see how taxing the FFTs are on the processor.