pub enum AnalysisIndex {
Show 23 variants
Tempo,
Zcr,
MeanSpectralCentroid,
StdDeviationSpectralCentroid,
MeanSpectralRolloff,
StdDeviationSpectralRolloff,
MeanSpectralFlatness,
StdDeviationSpectralFlatness,
MeanLoudness,
StdDeviationLoudness,
Chroma1,
Chroma2,
Chroma3,
Chroma4,
Chroma5,
Chroma6,
Chroma7,
Chroma8,
Chroma9,
Chroma10,
Chroma11,
Chroma12,
Chroma13,
}Expand description
Indexes different fields of an Analysis.
- Example:
use bliss_audio::{AnalysisIndex, BlissResult, Song};
fn main() -> BlissResult<()> {
// Should be an actual track loaded with a Decoder, but using an empty
// song for simplicity's sake
let song = Song::default();
println!("{}", song.analysis[AnalysisIndex::Tempo]);
Ok(())
}Prints the tempo value of an analysis.
Note that this should mostly be used for debugging / distance metric customization purposes.
Variants§
Tempo
The song’s tempo.
Zcr
The song’s zero-crossing rate.
MeanSpectralCentroid
The mean of the song’s spectral centroid.
StdDeviationSpectralCentroid
The standard deviation of the song’s spectral centroid.
MeanSpectralRolloff
The mean of the song’s spectral rolloff.
StdDeviationSpectralRolloff
The standard deviation of the song’s spectral rolloff.
MeanSpectralFlatness
The mean of the song’s spectral flatness.
StdDeviationSpectralFlatness
The standard deviation of the song’s spectral flatness.
MeanLoudness
The mean of the song’s loudness.
StdDeviationLoudness
The standard deviation of the song’s loudness.
Chroma1
The proportion of pitch class set 1 (IC1) compared to the 6 other pitch class sets, per this paper https://speech.di.uoa.gr/ICMC-SMC-2014/images/VOL_2/1461.pdf
Chroma2
The proportion of pitch class set 2 (IC2) compared to the 6 other pitch class sets, per this paper https://speech.di.uoa.gr/ICMC-SMC-2014/images/VOL_2/1461.pdf
Chroma3
The proportion of pitch class set 3 (IC3) compared to the 6 other pitch class sets, per this paper https://speech.di.uoa.gr/ICMC-SMC-2014/images/VOL_2/1461.pdf
Chroma4
The proportion of pitch class set 4 (IC4) compared to the 6 other pitch class sets, per this paper https://speech.di.uoa.gr/ICMC-SMC-2014/images/VOL_2/1461.pdf
Chroma5
The proportion of pitch class set 5 (IC5) compared to the 6 other pitch class sets, per this paper https://speech.di.uoa.gr/ICMC-SMC-2014/images/VOL_2/1461.pdf
Chroma6
The proportion of pitch class set 6 (IC6) compared to the 6 other pitch class sets, per this paper https://speech.di.uoa.gr/ICMC-SMC-2014/images/VOL_2/1461.pdf
Chroma7
The proportion of major triads in the song, compared to the other triads.
Chroma8
The proportion of minor triads in the song, compared to the other triads.
Chroma9
The proportion of diminished triads in the song, compared to the other triads.
Chroma10
The proportion of augmented triads in the song, compared to the other triads.
Chroma11
The L2-norm of the IC1-6 (see above).
Chroma12
The L2-norm of the IC7-10 (see above).
Chroma13
The ratio of the L2-norm of IC7-10 and IC1-6 (proportion of triads vs dyads).
Implementations§
Source§impl AnalysisIndex
impl AnalysisIndex
Sourcepub const FEATURES_VERSION: FeaturesVersion = FeaturesVersion::LATEST
pub const FEATURES_VERSION: FeaturesVersion = FeaturesVersion::LATEST
The features version associated with this analysis index.
Trait Implementations§
Source§impl Debug for AnalysisIndex
impl Debug for AnalysisIndex
Source§impl Index<AnalysisIndex> for Analysis
impl Index<AnalysisIndex> for Analysis
Source§impl IntoEnumIterator for AnalysisIndex
impl IntoEnumIterator for AnalysisIndex
Auto Trait Implementations§
impl Freeze for AnalysisIndex
impl RefUnwindSafe for AnalysisIndex
impl Send for AnalysisIndex
impl Sync for AnalysisIndex
impl Unpin for AnalysisIndex
impl UnwindSafe for AnalysisIndex
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> 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