Hippy, for curiosity, I eliminated the n samples average and just compared last with this; it works almost as well giving much larger execution speed spectrum. in fact I had to increase the final pause from nothing to 200 ms.
Here the code:
#Picaxe 08M2
#Terminal 4800
#No_Data
setfreq m8...