Add some hysteresis to get rid of the worst noise.
-rw-r--r-- 2059 decode.c
-rw-r--r-- 4637 synth.cpp