Skip to content

Commit

Permalink
Allow hop_len > win_len
Browse files Browse the repository at this point in the history
  • Loading branch information
OverLordGoldDragon committed Apr 15, 2021
1 parent f5bf385 commit 785a115
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ssqueezepy/_stft.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ def get_window(window, win_len, n_fft=None, derivative=False, dtype=None):

def _check_NOLA(window, hop_len):
"""https://gauss256.github.io/blog/cola.html"""
if (hop_len > len(window) or
not sig.check_NOLA(window, len(window), len(window) - hop_len)):
WARN("`window` fails Non-zero Overlap Add (NOLA) criterion; STFT "
"not invertible")
if hop_len > len(window):
WARN("`hop_len > len(window)`; STFT not invertible")
elif not sig.check_NOLA(window, len(window), len(window) - hop_len):
WARN("`window` fails Non-zero Overlap Add (NOLA) criterion; "
"STFT not invertible")

0 comments on commit 785a115

Please sign in to comment.