#[non_exhaustive]pub struct BeatTrackingData {
pub tempo_bpm: f64,
pub beat_times: Vec<f64>,
pub config: BeatTrackingConfig,
}Expand description
Results of a beat tracking analysis.
Holds the estimated tempo and the detected beat timestamps returned
by AudioBeatTracking::detect_beats.
§Ordering
The elements of beat_times are not sorted chronologically.
The first element is the timestamp of the global onset peak
(highest-energy onset in the signal). Forward beats follow in
causal order; backward beats are appended afterwards in reverse
temporal order. Sort beat_times if you need chronological
order.
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.tempo_bpm: f64Estimated tempo in beats per minute.
beat_times: Vec<f64>Beat timestamps in seconds, in detection order.
The first element is the global onset peak; forward beats follow in causal order; backward beats are appended last in reverse temporal order. See the struct-level documentation.
config: BeatTrackingConfigThe configuration used to produce this result.
Implementations§
Source§impl BeatTrackingData
impl BeatTrackingData
Sourcepub const fn new(
tempo_bpm: f64,
beat_times: Vec<f64>,
config: BeatTrackingConfig,
) -> Self
pub const fn new( tempo_bpm: f64, beat_times: Vec<f64>, config: BeatTrackingConfig, ) -> Self
Create a BeatTrackingData from pre-computed components.
§Arguments
tempo_bpm– Estimated tempo in beats per minute.beat_times– Beat timestamps in seconds, in detection order.config– TheBeatTrackingConfigused to produce this result.
§Returns
A new BeatTrackingData.
Trait Implementations§
Source§impl Clone for BeatTrackingData
impl Clone for BeatTrackingData
Source§impl Debug for BeatTrackingData
impl Debug for BeatTrackingData
Auto Trait Implementations§
impl Forget for BeatTrackingData
impl Freeze for BeatTrackingData
impl Move for BeatTrackingData
impl RefUnwindSafe for BeatTrackingData
impl Send for BeatTrackingData
impl Sync for BeatTrackingData
impl Unpin for BeatTrackingData
impl UnsafeUnpin for BeatTrackingData
impl UnwindSafe for BeatTrackingData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Src, Dst> ConvertTo<Dst> for Srcwhere
Dst: ConvertFrom<Src>,
impl<Src, Dst> ConvertTo<Dst> for Srcwhere
Dst: ConvertFrom<Src>,
Source§fn convert_to(self) -> Dst
fn convert_to(self) -> Dst
Dst using audio-aware scaling. Read moreSource§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