pub struct DropFit {
pub onset: Seconds,
pub f_end: Hz,
pub df_hz: f64,
pub tau: Seconds,
pub residual: f64,
pub points: usize,
}Expand description
A fitted drop.
Fields§
§onset: SecondsThe onset the fit counts t from.
f_end: HzThe settled frequency.
df_hz: f64The frequency above f_end at the onset, in hertz; negative for a
rise.
tau: SecondsThe time constant.
residual: f64The RMS residual over the fall the fit span shows,
|df_hz| exp(-DROP_FIT_START / tau). Over the extrapolated df_hz
a fast swing at the onset, fitted with a tau under a millisecond,
would read a tiny share.
points: usizeThe number of line values the fit read.
Implementations§
Source§impl DropFit
impl DropFit
Sourcepub fn settled(&self) -> Seconds
pub fn settled(&self) -> Seconds
Five time constants after the onset, where 99.3 % of the fall is done: the drop has settled.
Sourcepub fn df(&self) -> Option<Semitones>
pub fn df(&self) -> Option<Semitones>
The drop in semitones, 12 log2((f_end + df) / f_end), or None
when f_end + df is not above zero.
Sourcepub fn visible(&self) -> Option<Semitones>
pub fn visible(&self) -> Option<Semitones>
The drop the line shows inside the fit span, in semitones: from the
fitted frequency at DROP_FIT_START down to f_end. A fast fall
that ends before the span starts is extrapolated, not seen, such as
the overshoot of the line at a tone’s onset.
Sourcepub fn accepted(&self) -> bool
pub fn accepted(&self) -> bool
Whether the fit counts as a drop: df from above DROP_MIN up
to DROP_MAX, the visible drop above DROP_MIN, tau above
DROP_TAU_MIN and the residual below DROP_MAX_RESIDUAL. A
tau on the bound means the best fit lies below it.
Sourcepub fn miss(&self) -> Option<DropMiss>
pub fn miss(&self) -> Option<DropMiss>
The first condition of Self::accepted the fit misses, or None
when it counts as a drop.
Trait Implementations§
impl Copy for DropFit
impl StructuralPartialEq for DropFit
Auto Trait Implementations§
impl Freeze for DropFit
impl RefUnwindSafe for DropFit
impl Send for DropFit
impl Sync for DropFit
impl Unpin for DropFit
impl UnsafeUnpin for DropFit
impl UnwindSafe for DropFit
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more