Class AudioAnalysisSegment
- All Implemented Interfaces:
Serializable
,IModelObject
Segments are sound entities (typically under a second) each relatively uniform in timbre and harmony. They are characterized by their perceptual onsets and duration in seconds, loudness (dB), pitch and timbral content.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder class for buildingAudioAnalysisSegment
instances.static final class
JsonUtil class for buildingAudioAnalysisSegment
instances.Nested classes/interfaces inherited from interface se.michaelthelin.spotify.model_objects.IModelObject
IModelObject.IJsonUtil<T>
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a builder for building an instance of a model object.Get the loudness level at the end of the segment.Get the peak loudness value within the segment.Get the offset within the segment of the point of maximum loudness.Get the loudness level at the start of the segment.Get the measure of the audio analysis segment object.float[]
Get the pitches of the segment.float[]
Get the timbre of the segment.toString()
Returns a String representation of this model object in the style:
-
Method Details
-
getMeasure
Get the measure of the audio analysis segment object. This measure contains the start point, duration and confidence of the segment.- Returns:
- The measure of the audio analysis segment object.
-
getLoudnessStart
Get the loudness level at the start of the segment.- Returns:
- The loudness level at the start of the segment.
-
getLoudnessMaxTime
Get the offset within the segment of the point of maximum loudness.- Returns:
- The offset within the segment of the point of maximum loudness.
-
getLoudnessMax
Get the peak loudness value within the segment.- Returns:
- The peak loudness value within the segment.
-
getLoudnessEnd
Get the loudness level at the end of the segment. This is only specified in the last segment of the audio analysis.- Returns:
- The loudness level at the end of the segment.
-
getPitches
public float[] getPitches()Get the pitches of the segment.
Pitch content is given by a "chroma" vector, corresponding to the 12 pitch classes C, C#, D to B, with values ranging from 0 to 1 that describe the relative dominance of every pitch in the chromatic scale. For example a C Major chord would likely be represented by large values of C, E and G (i.e. classes 0, 4, and 7). Vectors are normalized to 1 by their strongest dimension, therefore noisy sounds are likely represented by values that are all close to 1, while pure tones are described by one value at 1 (the pitch) and others near
- Returns:
- The pitches of the segment.
-
getTimbre
public float[] getTimbre()Get the timbre of the segment.
The timbre is the quality of a musical note or sound that distinguishes different types of musical instruments, or voices. It is a complex notion also referred to as sound color, texture, or tone quality, and is derived from the shape of a segments spectro-temporal surface, independently of pitch and loudness.
- Returns:
- The timbre of the track.
-
toString
Description copied from class:AbstractModelObject
Returns a String representation of this model object in the style:ModelObject(attr1=value1, attr2=value2, ...)
- Specified by:
toString
in classAbstractModelObject
-
builder
Description copied from interface:IModelObject
Create a builder for building an instance of a model object.
The type of the builder and its methods depend on its corresponding implementation.- Returns:
- A builder object.
-