pub struct SubBandLine { /* private fields */ }Expand description
The instantaneous frequency of the 20 to 200 Hz band of a segment, with the envelope of that band.
Implementations§
Source§impl SubBandLine
impl SubBandLine
Sourcepub fn of(
segment: &[f64],
rate: SampleRate,
start: Seconds,
) -> Result<Self, FilterError>
pub fn of( segment: &[f64], rate: SampleRate, start: Seconds, ) -> Result<Self, FilterError>
Builds the line of segment, whose first sample lies start into
the stem.
The analytic signal is meant for note-sized segments. Each cut end carries an error that decays with the distance from it, so a caller keeps a margin of silence or signal around the span it reads.
§Errors
Returns a FilterError when the rate puts 200 Hz at or above the
Nyquist frequency.
Sourcepub fn with_low_edge(
segment: &[f64],
rate: SampleRate,
start: Seconds,
lo: Hz,
) -> Result<Self, FilterError>
pub fn with_low_edge( segment: &[f64], rate: SampleRate, start: Seconds, lo: Hz, ) -> Result<Self, FilterError>
Builds the line as Self::of does, with the high-pass at lo.
§Errors
Returns a FilterError when lo is not above 0 Hz or the rate
puts 200 Hz at or above the Nyquist frequency.
Sourcepub fn with_edges(
segment: &[f64],
rate: SampleRate,
start: Seconds,
lo: Hz,
hi: Hz,
) -> Result<Self, FilterError>
pub fn with_edges( segment: &[f64], rate: SampleRate, start: Seconds, lo: Hz, hi: Hz, ) -> Result<Self, FilterError>
Builds the line as Self::of does, with the high-pass at lo and
the low-pass at hi.
§Errors
Returns a FilterError when an edge is not above 0 Hz or the rate
puts hi at or above the Nyquist frequency.
Sourcepub fn hz(&self) -> &[f64]
pub fn hz(&self) -> &[f64]
Returns the frequency between samples n and n + 1, in hertz. A
value can be negative where the band holds no signal.
Sourcepub fn sample_rate(&self) -> SampleRate
pub fn sample_rate(&self) -> SampleRate
Returns the rate of the segment.
Sourcepub fn time_of(&self, n: usize) -> Seconds
pub fn time_of(&self, n: usize) -> Seconds
Returns the time of frequency value n: halfway between samples n
and n + 1.
Sourcepub fn sample_time(&self, n: usize) -> Seconds
pub fn sample_time(&self, n: usize) -> Seconds
Returns the time of sample n.
Trait Implementations§
Source§impl Clone for SubBandLine
impl Clone for SubBandLine
Source§impl Debug for SubBandLine
impl Debug for SubBandLine
Source§impl PartialEq for SubBandLine
impl PartialEq for SubBandLine
impl StructuralPartialEq for SubBandLine
Auto Trait Implementations§
impl Freeze for SubBandLine
impl RefUnwindSafe for SubBandLine
impl Send for SubBandLine
impl Sync for SubBandLine
impl Unpin for SubBandLine
impl UnsafeUnpin for SubBandLine
impl UnwindSafe for SubBandLine
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