pytimbre.spectral.timbral_model.timbral_util.get_bandwidth_array¶
- pytimbre.spectral.timbral_model.timbral_util.get_bandwidth_array(audio_samples, fs, nperseg=512, overlap_step=32, rolloff_thresh=0.01, rollon_thresh_percent=0.05, log_bandwidth=False, return_centroid=False, low_bandwidth_method='Percentile', normalisation_method='RMS_Time_Window')¶
Calculate the bandwidth array estimate for an audio signal.
Required inputs :param audio_samples: array of the audio samples :param fs: samplerate of the audio samples
Optional inputs :param nperseg: numper of samples used for calculating spectrogram :param overlap_step: number of samples overlap for calculating spectrogram :param rolloff_thresh: threshold value for calculating rolloff frequency :param rollon_thresh_percent: percentage threshold for calculating rollon frequency :param log_bandwidth: return the logarithm of the bandwdith, default to False :param return_centroid: return the centroid for each time window :param low_bandwidth_method: method for calculating the low frequency limit of the bandwidth,
default to ‘Percentile’
- Parameters:
normalisation_method – method for normlaising the spectrogram, default to ‘RMS_Time_Window’
- Returns:
returns the bandwidth array, time array (from spectrogram), and frequency array (from spectrogram).