Algorithm to find spike
A statistical test might be appropriate.  For instance, if you assume the noise floor is Gaussian, then you could compute the standard deviation in any particular octave (or other appropriate sub-band), and look for maxima that are whatever multiple of standard deviations above the local average that you might consider to be statistically significant for your application.