Struct bliss_audio::Analysis [−][src]
pub struct Analysis { /* fields omitted */ }
Expand description
Object holding the results of the song’s analysis.
Only use it if you want to have an in-depth look of what is happening behind the scene, or make a distance metric yourself.
Under the hood, it is just an array of f32 holding different numeric features.
For more info on the different features, build the
documentation with private items included using
cargo doc --document-private-items
, and / or read up
this document, that contains a description
on most of the features, except the chroma ones, which are documented
directly in this code.
Implementations
Create a new Analysis object.
Usually not needed, unless you have already computed and stored features somewhere, and need to recreate a Song with an already existing Analysis yourself.
Return an ndarray Array1
representing the analysis’ features.
Particularly useful if you want to make a custom distance metric.
Return a Vec
Particularly useful if you want iterate through the values to store them somewhere.
Compute distance between two analysis using a user-provided distance
metric. You most likely want to use song.custom_distance
directly
rather than this function.
For this function to be integrated properly with the rest of bliss’ parts, it should be a valid distance metric, i.e.:
- For X, Y real vectors, d(X, Y) = 0 ⇔ X = Y
- For X, Y real vectors, d(X, Y) >= 0
- For X, Y real vectors, d(X, Y) = d(Y, X)
- For X, Y, Z real vectors d(X, Y) ≤ d(X + Z) + d(Z, Y)
Note that almost all distance metrics you will find obey these properties, so don’t sweat it too much.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Analysis
impl UnwindSafe for Analysis
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V