function Hanning(const Src: TVec; WindowMode: TSignalWindowMode): TVec;
Hanning (raised-cosine) window.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TVec | |
| 2 | WindowMode | TSignalWindowMode |
Returns: TVec
Multiplies Src in place by the Hanning window so that, for a unit input, the i-th sample becomes
w[i] = 1/2(1 - cos(2pi i)/(N-1)), 0 <= i <= N-1
where N is the operand length (Len). With WindowMode = wmSymmetric the window is symmetric (endpoints ); with wmPeriodic the length-N+1 symmetric window is built and its last sample dropped, giving w[i]=1/2(1-cos(2pi i)/N) which keeps the FFT periodicity. Window functions are applied prior to the FFT to reduce spectral leakage at the cost of frequency resolution; Hanning is a good general default. Domain: N >= 1 (no effect for N <= 1); the routine touches only elements Index..Index+Len-1 and validates that range against Src, raising an exception on an out-of-range Index or Len. No NaN is produced for finite input.
References:
[1] Digital signal processing, Vinay K. Ingle and John G. Proakis, Brooks-Cole, 2000.
Indexed: function Hanning(const Src: TVec; WindowMode: TSignalWindowMode; Index: Integer; Len: Integer): TVec;
Hamming window.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TVec | |
| 2 | WindowMode | TSignalWindowMode | |
| 3 | Index | Integer | start index |
| 4 | Len | Integer | element count |
Returns: TVec
Applies Hamming window to Src vector from element at Index to element at Index + Len - 1.