Skip to content

Commit

Permalink
clip scales in make_VQT_filters function
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieHakim committed Feb 10, 2024
1 parent f89c669 commit e2c9a29
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vqt/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ def make_VQT_filters(
## Make sure win_size is odd
if win_size % 2 != 1:
win_size += 1
win_size = 3 if win_size < 3 else win_size

## Make windows
if isinstance(window_type, str):
Expand All @@ -334,6 +335,7 @@ def make_VQT_filters(
endpoint=True,
dtype=np.float32,
) * periods_inSamples
scales = np.clip(scales, a_min=1, a_max=None)
if window_type == 'gaussian':
## Make sigmas for gaussian windows. Use a geometric spacing.
window_type = ('gaussian', mother_resolution * 0.15)
Expand Down

0 comments on commit e2c9a29

Please sign in to comment.