pytimbre.spectral.swipe.swipe¶
- pytimbre.spectral.swipe.swipe(samples, sample_rate: float = 22050, hop_size: float = 256, minimum_frequency: float = 55.0, maximum_frequency: float = 1760.0, pitch_resolution: float = 0.010416666666666666, erb_resolution: float = 0.1, strength_threshold: float = 0)¶
Implementation of a sawtooth waveform inspired pitch estimator (SWIPE). This version of the algorithm follows the original implementation, see swipe_slim for a more efficient alternative.
- Parameters:
samples (ndarray) – Audio signal
sample_rate (int) – Sampling rate
hop_size (int) – Hop size
minimum_frequency (float or int) – Minimal frequency
maximum_frequency (float or int) – Maximal frequency
pitch_resolution (float) – resolution of the pitch candidate bins in octaves (default value = 1/96 -> 96 bins per octave)
erb_resolution (float) – resolution of the ERB bands (default value = 0.1)
strength_threshold (float) – confidence threshold [0, 1] for the pitch detection (default value = 0)
- Returns:
f0 (ndarray) – Estimated F0-trajectory
t (ndarray) – Time axis
strength (ndarray) – Confidence/Pitch Strength
Remarks/Development
2023-04-01 - FSM - updated the argument names, and put the parameter helpers into the list