TransientSlice identifies slice points in a signal by implementing a “de-clicking” algorithm based on the assumption that a transient is a sample or series of samples that are anomalous when compared to surrounding samples. It creates a model of the time series of samples, so that when a given sample doesn’t fit the model (its “error”, or “anomalous-ness”, goes above the threshold argument threshFwd) it is determined to be a transient and a slice point is identified.

The series of samples determined to be a transient will continue until the error goes below threshBack, indicating that the samples are again more in-line with the model, preparing TransientSlice to identify the next transient slice point.

A basic sine tone with some transient clicks added. The transient slice points identified by TransientSlice are overlaid in red.

Audio Example

Audio excerpt in example below

A signal containing many transient moments with the slice points (red) overlaid.

Digital Audio Restoration

The algorithm implemented is from chapter 5 of "Digital Audio Restoration" by Godsill, Simon J., Rayner, Peter J.W. with some bespoke improvements on the detection function tracking.
Last modified: Tue Aug 23 14 by James Bradbury
Edit File on GitHub