Some quick and dirty example of how onset detection might work