pub enum Normalizer {
Power,
Magnitude,
DecibelsDb {
floor_db: f32,
},
PowerSqrt,
LogMagnitude,
MeanNormalized,
LocalMax {
radius: usize,
},
}Variants§
Power
Magnitude
DecibelsDb
10*log10(power), mapped to [0,1] between floor_db and 0 dB
PowerSqrt
Square root of power — perceptually between Power and Magnitude, compresses dynamic range less aggressively than Power
LogMagnitude
log1p(magnitude) — log compression without needing a dB floor, good when signal has a lot of near-zero bins
MeanNormalized
Each bin normalized by the mean power across the frame — emphasizes spectral shape rather than absolute energy. Good for comparing frames with very different loudness.
LocalMax
Each bin divided by its local neighborhood max (per-bin across time). Makes quiet features visible that global normalization would crush.
Trait Implementations§
Source§impl Clone for Normalizer
impl Clone for Normalizer
Source§fn clone(&self) -> Normalizer
fn clone(&self) -> Normalizer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Normalizer
impl Debug for Normalizer
Source§impl Default for Normalizer
impl Default for Normalizer
Source§fn default() -> Normalizer
fn default() -> Normalizer
Returns the “default value” for a type. Read more
Source§impl PartialEq for Normalizer
impl PartialEq for Normalizer
Source§impl PartialOrd for Normalizer
impl PartialOrd for Normalizer
impl Copy for Normalizer
impl StructuralPartialEq for Normalizer
Auto Trait Implementations§
impl Freeze for Normalizer
impl RefUnwindSafe for Normalizer
impl Send for Normalizer
impl Sync for Normalizer
impl Unpin for Normalizer
impl UnsafeUnpin for Normalizer
impl UnwindSafe for Normalizer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more