def __variable_hop_response(y, n_fft, hop_length, min_filter_length,
                            fft_basis, aggregate):

    # If target_hop <= n_fft / 2:
    #   my_hop = target_hop
    # else:
    #   my_hop = target_hop * 2**(-k)

    zoom_factor = np.ceil(np.log2(hop_length) - np.log2(min_filter_length))

    zoom_factor = 2**int(np.maximum(0, 1 + zoom_factor))

    # Compute the STFT matrix
    D = stft(y, n_fft=n_fft, hop_length=int(hop_length / zoom_factor),
             window=np.ones)

    # And filter response energy
    my_cqt = fft_basis.dot(D)

    if zoom_factor > 1:
        # We need to aggregate.  Generate the boundary frames
        bounds = np.arange(0, my_cqt.shape[1], zoom_factor, dtype=int)
        my_cqt = util.sync(my_cqt, bounds, aggregate=aggregate)

    return my_cqt
Compute the filter response with a target STFT hop.
dataset/ETHPy150Open bmcfee/librosa/librosa/core/constantq.py/__variable_hop_response