pub struct ChromaDesc { /* private fields */ }Expand description
General object holding the chroma descriptor.
Current chroma descriptors are interval features (see https://speech.di.uoa.gr/ICMC-SMC-2014/images/VOL_2/1461.pdf).
Contrary to the other descriptors that can be used with streaming without consequences, this one performs better if the full song is used at once.
Implementations§
Source§impl ChromaDesc
impl ChromaDesc
pub const WINDOW_SIZE: usize = 8_192usize
pub fn new(sample_rate: u32, n_chroma: u32) -> Self
Sourcepub fn do_(&mut self, signal: &[f32]) -> AnalysisResult<()>
pub fn do_(&mut self, signal: &[f32]) -> AnalysisResult<()>
Compute and store the chroma of a signal.
Passing a full song here once instead of streaming smaller parts of the song will greatly improve accuracy.
Sourcepub fn get_value(&mut self) -> Vec<Feature> ⓘ
pub fn get_value(&mut self) -> Vec<Feature> ⓘ
Get the song’s interval features.
Return the 6 pitch class set categories, as well as the major, minor, diminished and augmented triads.
See this paper https://speech.di.uoa.gr/ICMC-SMC-2014/images/VOL_2/1461.pdf for more information (“Timbre-invariant Audio Features for Style Analysis of Classical Music”).
Trait Implementations§
Source§impl Clone for ChromaDesc
impl Clone for ChromaDesc
Source§fn clone(&self) -> ChromaDesc
fn clone(&self) -> ChromaDesc
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ChromaDesc
impl RefUnwindSafe for ChromaDesc
impl Send for ChromaDesc
impl Sync for ChromaDesc
impl Unpin for ChromaDesc
impl UnwindSafe for ChromaDesc
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<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