1cdfcfa8a884ffb5f670812ee4b528a76f367be9,librosa/core/constantq.py,,__fft_filters,#,524

Before Change


    n_fft = basis.shape[1]

    if hop_length is not None and n_fft < 2 * hop_length:
        n_fft = int(2.0 ** (np.ceil(np.log2(2 * hop_length))))

    // normalize by inverse length to compensate for phase invariance
    basis *= lengths.reshape((-1, 1)) / n_fft

    // FFT and retain only the non-negative frequencies
    fft_basis = fft.fft(basis, n=n_fft, axis=1)[:, :(n_fft // 2)+1]

    // normalize as in Parseval"s relation, and sparsify the basis
    fft_basis = util.sparsify_rows(fft_basis / n_fft, quantile=sparsity)

    return fft_basis, n_fft, lengths

After Change


    // Filters are padded up to the nearest integral power of 2
    n_fft = basis.shape[1]

    if hop_length is not None and n_fft < 2.0**(1 + np.ceil(np.log2(hop_length))):
        n_fft = int(2.0 ** (1 + np.ceil(np.log2(hop_length))))

    // normalize by inverse length to compensate for phase invariance
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: librosa/librosa
Commit Name: 1cdfcfa8a884ffb5f670812ee4b528a76f367be9
Time: 2016-05-07
Author: brian.mcfee@nyu.edu
File Name: librosa/core/constantq.py
Class Name:
Method Name: __fft_filters


Project Name: librosa/librosa
Commit Name: 48a579ae1638f5c60e62d8f5c3bad35e0dcef249
Time: 2013-03-23
Author: brm2132@columbia.edu
File Name: librosa/beat.py
Class Name:
Method Name: onset_estimate_bpm


Project Name: craffel/mir_eval
Commit Name: 51ace7a3322c10b68fa1509a674115a28c5c82ea
Time: 2014-07-04
Author: craffel@gmail.com
File Name: mir_eval/melody.py
Class Name:
Method Name: hz2cents