scipy.signal.ShortTimeFFT.
nearest_k_p#
- ShortTimeFFT.nearest_k_p(k, left=True)[source]#
- Return nearest sample index k_p for which t[k_p] == t[p] holds. - The nearest next smaller time sample p (where t[p] is the center position of the window of the p-th slice) is p_k = k // - hop. If- hopis a divisor of k then k is returned. If left is set then p_k *- hopis returned else (p_k+1) *- hop.- This method can be used to slice an input signal into chunks for calculating the STFT and iSTFT incrementally.