sample --> check_threshold --> xcorrelate --> spi --> repeat