def window_sumsquare(window, n_frames, hop_length=<NUM_LIT>, win_length=None, n_fft=<NUM_LIT>,<EOL>dtype=np.float32, norm=None):
if win_length is None:<EOL><INDENT>win_length = n_fft<EOL><DEDENT>n = n_fft + hop_length * (n_frames - <NUM_LIT:1>)<EOL>x = np.zeros(n, dtype=dtype)<EOL>win_sq = get_window(window, win_length)<EOL>win_sq = util.normalize(win_sq, norm=norm)**<NUM_LIT:2><EOL>win_sq = util.pad_center(win_sq, n_fft)<EOL>__window_ss_fill(x, win_sq, n_frames, hop_length)<EOL>return x<EOL>
Compute the sum-square envelope of a window function at a given hop length.

This is used to estimate modulation effects induced by windowing observations
in short-time fourier transforms.

Parameters
----------
window : string, tuple, number, callable, or list-like
    Window specification, as in `get_window`

n_frames : int > 0
    The number of analysis frames

hop_length : int > 0
    The number of samples to advance between frames

win_length : [optional]
    The length of the window function.  By default, this matches `n_fft`.

n_fft : int > 0
    The length of each analysis frame.

dtype : np.dtype
    The data type of the output

Returns
-------
wss : np.ndarray, shape=`(n_fft + hop_length * (n_frames - 1))`
    The sum-squared envelope of the window function

Examples
--------
For a fixed frame length (2048), compare modulation effects for a Hann window
at different hop lengths:

>>> n_frames = 50
>>> wss_256 = librosa.filters.window_sumsquare('hann', n_frames, hop_length=256)
>>> wss_512 = librosa.filters.window_sumsquare('hann', n_frames, hop_length=512)
>>> wss_1024 = librosa.filters.window_sumsquare('hann', n_frames, hop_length=1024)

>>> import matplotlib.pyplot as plt
>>> plt.figure()
>>> plt.subplot(3,1,1)
>>> plt.plot(wss_256)
>>> plt.title('hop_length=256')
>>> plt.subplot(3,1,2)
>>> plt.plot(wss_512)
>>> plt.title('hop_length=512')
>>> plt.subplot(3,1,3)
>>> plt.plot(wss_1024)
>>> plt.title('hop_length=1024')
>>> plt.tight_layout()