Optimized transform code to selectively filter frequencies. Filtered wave is run through an amplitude checker.