librosa.core.fft_frequencies

librosa.core.fft_frequencies(sr=22050, n_fft=2048)[source]

Alternative implementation of np.fft.fftfreqs

Parameters:
sr : number > 0 [scalar]

Audio sampling rate

n_fft : int > 0 [scalar]

FFT window size

Returns:
freqs : np.ndarray [shape=(1 + n_fft/2,)]

Frequencies (0, sr/n_fft, 2*sr/n_fft, …, sr/2)

Examples

>>> librosa.fft_frequencies(sr=22050, n_fft=16)
array([     0.   ,   1378.125,   2756.25 ,   4134.375,
         5512.5  ,   6890.625,   8268.75 ,   9646.875,  11025.   ])