pub enum ClipOutput {
RmsDb,
PeakDb,
PeakToRmsDb,
DurationS,
EnvelopeDistanceDb,
}Expand description
An output of a clip that a spread covers.
Variants§
RmsDb
The RMS level. Two clips compare over their common span, the shorter clip’s length from the onset, so a cut tail does not change the level.
PeakDb
PeakToRmsDb
The peak over the RMS level, in dB: the crest factor. Two clips
compare with the RMS level over their common span, as
ClipOutput::RmsDb does. A gain shifts the peak and the RMS level
alike, so it moves the ratio only where it moves the clip’s end.
DurationS
EnvelopeDistanceDb
The envelope distance, envelope_distance.
Implementations§
Source§impl ClipOutput
impl ClipOutput
Sourcepub const SHAPE: [Self; 3]
pub const SHAPE: [Self; 3]
The outputs of the sound’s shape, which compare_fitted compares
after a gain fit: the peak-to-RMS ratio, the duration to the tail
floor and the envelope distance. The RMS level and the peak follow
the level, so the fit takes them out. The duration and the
envelope still depend on the level, which is why the fit comes
first.
Sourcepub fn value(self, clip: &ClipMetrics) -> Option<f64>
pub fn value(self, clip: &ClipMetrics) -> Option<f64>
The value of the output for one clip; None for the envelope
distance, which only two clips have. The RMS level is the one from
onset to end, here and in the peak-to-RMS ratio.
Sourcepub fn distance(self, a: &ClipMetrics, b: &ClipMetrics) -> f64
pub fn distance(self, a: &ClipMetrics, b: &ClipMetrics) -> f64
The distance of two clips on the output.
Sourcepub fn floor(self, sample_rate: SampleRate) -> f64
pub fn floor(self, sample_rate: SampleRate) -> f64
The floor of the tolerance: LEVEL_FLOOR_DB for a level and one
sample for the duration.
Trait Implementations§
Source§impl Clone for ClipOutput
impl Clone for ClipOutput
impl Copy for ClipOutput
Source§impl Debug for ClipOutput
impl Debug for ClipOutput
impl Eq for ClipOutput
Source§impl PartialEq for ClipOutput
impl PartialEq for ClipOutput
impl StructuralPartialEq for ClipOutput
Auto Trait Implementations§
impl Freeze for ClipOutput
impl RefUnwindSafe for ClipOutput
impl Send for ClipOutput
impl Sync for ClipOutput
impl Unpin for ClipOutput
impl UnsafeUnpin for ClipOutput
impl UnwindSafe for ClipOutput
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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