1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Configuration enums shared by the forward and inverse transforms.
use ;
/// How the complex STFT coefficients are scaled.
///
/// The variants mirror the scaling modes of SciPy's `ShortTimeFFT`:
///
/// - [`Scaling::None`] leaves the raw FFT output untouched.
/// - [`Scaling::Magnitude`] divides every bin by the sum of the window
/// coefficients, so a sinusoid's bin reflects its amplitude.
/// - [`Scaling::Density`] divides by `sqrt(fs * Σ wᵢ²)`, so that `|S|²`
/// approximates a power spectral density. Requires a configured sample rate.
/// How a signal is padded when centered framing is enabled in batch mode.
///
/// With [`center`](crate::StftBuilder::center) enabled the signal is padded by
/// `frame_len / 2` samples on each side so that frame `t` is centered on sample
/// `t * hop`.