#[non_exhaustive]pub struct Weights {
pub cut: f64,
pub level: f64,
pub pause: f64,
pub pause_ref: Duration,
pub target: f64,
pub short: f64,
}Expand description
Cost weights of the planner.
A cut at x costs cut + level · norm(x) + pause · (1 − min(1, q(x) / pause_ref)), where
norm is the level smoothed over 150 ms and scaled between the noise floor and the reference
(at least 20 dB apart), and q is the
length of the quiet stretch around x. A piece of length ℓ costs
target · ((ℓ − target_len) / target_len)² + short · (min − ℓ) / min when ℓ < min.
crate::adjust() adds |x − p| / window for the distance from the requested point.
The defaults are starting values that have not been tuned on a corpus.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cut: f64Fixed cost of every cut. Keeps free cuts in digital silence from multiplying.
level: f64Weight of the level at the cut.
pause: f64Weight of cutting outside a long pause.
pause_ref: DurationPause length that earns the full pause credit.
target: f64Weight of the squared relative distance from the target length. Zero cuts only to stay within the maximum.
short: f64Weight of pieces shorter than the minimum.