centroidbpf

maelzel.snd.features.centroidbpf(samples, sr, fftsize=2048, overlap=4, winsize=None, window='hann')[source]

Construct a bpf representing the centroid of the given audio over time

Parameters:
  • samples (ndarray) – a 1D numpy array representing a mono audio fragment

  • sr (int) – the sampling rate

  • fftsize (int) – the fft size

  • overlap (int) – amount of overlap

  • winsize (Optional[int]) – the size of the window. If not given then winsize is assumed to be the same as fftsize. if given it must be <= fftsize

  • window – kind of window

Return type:

Sampled

Returns:

a bpf representing the centroid over time