WINDOW
From STX Wiki
Jump to navigationJump to search
WINDOW - signal window function
Usage:
WINDOW x type c mode
Inputs:
| Name | Description |
|---|---|
| x | window length or frame buffer |
| type | window function type |
| c | window function parameter |
| mode | processing mode |
Outputs:
| Name | Description |
|---|---|
| y | window function or windowed signal |
| k | window scaling factor |
Function:
This atom implements a set of well known signal windowing functions. It can be used to compute a windowing function (which should be applied to the signal in a later processing step) or to multiply the signal with a windowing function directly.
The output k is set to a (average) scaling factor that can be used to align the energy of the input signal x and the weighted signal y. To compute the scaling factor, one frame of white noise is used as a test signal. The input mode determines whether the window function should be multiplied with the energy-scaling-factor k (mode=1) or not (mode=0).
Window computation, controlled by data input x
| type of input x | description |
| number | The value of x (>2) is used as window length. The selected window function is computed and stored in the output vector y.
|
| vector | The input x is used as signal vector (length >2) and multiplied with the selected window function. The weighted signal is stored in the output y. |
Windowing function, selected by type (function type) and c (parameter).
| value of type | value of c | window function / comment |
0 or RECTANGLE
|
- | rectangle window |
1 or HANNING
|
- | Hanning window |
2 or HAMMING
|
- | Hamming window |
3 or BLACKMAN
|
- | Blackman-Harris window |
4 or KAISER
|
exponent (>0) | Kaiser-Bessel window |
5 or BARTLETT
|
- | Bartlett (triangle) window |
- See also
<SP-atoms>