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. Ifhopis a divisor of k than k is returned. If left is set than 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.