Skip to main content

TrackAnalysis

Struct TrackAnalysis 

Source
pub struct TrackAnalysis {
Show 26 fields pub num_samples: u32, pub duration: f32, pub sample_md5: String, pub offset_seconds: u32, pub window_seconds: u32, pub analysis_sample_rate: u32, pub analysis_channels: u32, pub end_of_fade_in: f32, pub start_of_fade_out: f32, pub loudness: f32, pub tempo: f32, pub tempo_confidence: f32, pub time_signature: u32, pub time_signature_confidence: f32, pub key: i32, pub key_confidence: f32, pub mode: Mode, pub mode_confidence: f32, pub codestring: String, pub code_version: f32, pub echoprint_string: String, pub echoprint_version: f32, pub synchstring: String, pub synch_version: f32, pub rhythmstring: String, pub rhythm_version: f32,
}

Fields§

§num_samples: u32

The number of audio samples from the track that were analysed.

§duration: f32

The length of the track in seconds.

§sample_md5: String

This field will always contain an empty string.

§offset_seconds: u32

An offset to the start of the segment of the track that awas analysed. As the entire track is analysed, this should be 0.

§window_seconds: u32

The length of the segment of the track that was analysed, if only a subset was. As the entire track is analysed, this should be 0.

§analysis_sample_rate: u32

The sample rate used to decode and analyse the track. May vary from the track’s sample rate on Spotify.

§analysis_channels: u32

The number of channels used in the analysis. If the value is 1, all the channels were combined to mono before analysis.

§end_of_fade_in: f32

The time, in seconds, when the track’s fade-in ends. If the track has no fade-in, the value is 0.

§start_of_fade_out: f32

The time, in seconds, when the track’s fade-out begins. If the track has no fade-out, this will match the track’s length.

§loudness: f32

The average loudness of the track in decibels (dB). Loudness values are averaged across the entire track and are useful for comparing relative loudness of tracks.

Values typically range between -60 and 0 dB.

§tempo: f32

The estimated pace of the track in beats per minute (BPM).

§tempo_confidence: f32

A value ranging between 0.0 - 1.0 that indicates the confidence of the tempo.

§time_signature: u32

An estimated notation of how many beats are in each measure.

Values range between 3 - 7, indicating time signatures ranging between 3/4 - 7/4.

§time_signature_confidence: f32

A value ranging between 0.0 - 1.0 that indicates the confidence of the time_signature.

§key: i32

A value ranging between -1 - 11 that denotes musical key of the track, represented by integers mapping to pitches using standard [Pitch Class notation] (https://en.wikipedia.org/wiki/Pitch_class).

If no key is detected, the value is -1.

§key_confidence: f32

A value ranging between 0.0 - 1.0 that indicates the confidence of the key.

§mode: Mode

Indicates the modality (major or minor) of a track.

§mode_confidence: f32

A value ranging between 0.0 - 1.0 that indicates the confidence of the mode.

§codestring: String

An ENMPF codestring for the track.

§code_version: f32

The version for the ENMPF used in the codestring.

§echoprint_string: String

An EchoPrint codestring for the track.

§echoprint_version: f32

The version for the EchoPrint format used in the echoprintstring.

§synchstring: String

A SynchString for the track.

§synch_version: f32

The version for the Synchstring used in the synchstring.

§rhythmstring: String

A Rhythmstring for the track. Its format is similar to that of the synchstring.

§rhythm_version: f32

The version for the Rhythmstring used in the rhythmstring.

Trait Implementations§

Source§

impl Clone for TrackAnalysis

Source§

fn clone(&self) -> TrackAnalysis

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TrackAnalysis

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TrackAnalysis

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for TrackAnalysis

Source§

fn eq(&self, other: &TrackAnalysis) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for TrackAnalysis

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,