Class AudioFeatures
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject
se.michaelthelin.spotify.model_objects.specification.AudioFeatures
- All Implemented Interfaces:
Serializable
,IModelObject
Retrieve information about
Audio Feature objects by building instances from this class.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder class for buildingAudioFeatures
instances.static final class
JsonUtil class for buildingAudioFeatures
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.boolean
Get the acousticness of the track as a value between 0.0 and 1.0.Get the Spotify Web API endpoint URL for a full audio analysis.Get the danceability of the track as a value between 0.0 and 1.0.Get the duration of the track in milliseconds.Get the energy of the track as a value between 0.0 and 1.0.
The energetic value of the track depends on factors like speed and loudness.getId()
Get the Spotify ID of the track.Get the instrumentalness of the track as a value between 0.0 and 1.0.getKey()
Get the main key of the track.Get the liveness of the track as a value between 0.0 and 1.0.
The liveness depends on ambient sounds like the presence of an audience.Get the average loudness of the track.getMode()
Get the modality of the track.Get the speechiness of the track as a value between 0.0 and 1.0.getTempo()
Get the estimated tempo of the track in beats per minute.Get the estimated overall time signature of the track.Get the Spotify Web API endpoint URL of the track.getType()
Get the model object type.getUri()
Get the Spotify URI of the track.Get the valence of the track as a value between 0.0 and 1.0.
A track with a high valence sounds more positive (happy, cheerful, euphoric) like the track with a low valence.int
hashCode()
toString()
Returns a String representation of this model object in the style:
-
Method Details
-
getAcousticness
Get the acousticness of the track as a value between 0.0 and 1.0.
The higher the value, the higher the chance the track is acoustic.- Returns:
- Acousticness value.
-
getAnalysisUrl
Get the Spotify Web API endpoint URL for a full audio analysis. An audio analysis contains additional information to audio feature objects.- Returns:
- Spotify Web API endpoint URL.
- See Also:
-
getDanceability
Get the danceability of the track as a value between 0.0 and 1.0.
The danceability depends on factors like tempo and rhythm stability. Higher is better.- Returns:
- Danceability value.
-
getDurationMs
Get the duration of the track in milliseconds.- Returns:
- Track duration.
-
getEnergy
Get the energy of the track as a value between 0.0 and 1.0.
The energetic value of the track depends on factors like speed and loudness. Fast and loud tracks feel more energetic than slow and quiet tracks.- Returns:
- Energetic value.
-
getId
Get the Spotify ID of the track.- Returns:
- Spotify track ID.
-
getInstrumentalness
Get the instrumentalness of the track as a value between 0.0 and 1.0.
The higher the value, the higher the chance the track contains no vocals.- Returns:
- Instrumentalness value.
- See Also:
-
getKey
Get the main key of the track.- Returns:
- Main key.
- See Also:
-
getLiveness
Get the liveness of the track as a value between 0.0 and 1.0.
The liveness depends on ambient sounds like the presence of an audience. The higher the value, the higher the chance the track was performed live.- Returns:
- Liveness value.
-
getLoudness
Get the average loudness of the track. These values have mostly a range between -60 and 0 decibels.- Returns:
- Loudness value.
-
getMode
Get the modality of the track. (either "major" or "minor")- Returns:
Modality
type.- See Also:
-
getSpeechiness
Get the speechiness of the track as a value between 0.0 and 1.0.
The higher the value, the higher the chance the track only consists of spoken words.- Returns:
- Speechiness value.
- See Also:
-
getTempo
Get the estimated tempo of the track in beats per minute.- Returns:
- Tempo value.
-
getTimeSignature
Get the estimated overall time signature of the track. The time signature (or meter) is the number of beats in a bar.
Example: A Viennese waltz has a three-quarters beat, so this method would return the value 3 in this case.- Returns:
- Time signature value.
-
getTrackHref
Get the Spotify Web API endpoint URL of the track.- Returns:
- A Spotify Web API endpoint URL.
-
getType
Get the model object type. In this case "audio_features".- Returns:
- A
ModelObjectType
.
-
getUri
Get the Spotify URI of the track.- Returns:
- Spotify track URI.
-
getValence
Get the valence of the track as a value between 0.0 and 1.0.
A track with a high valence sounds more positive (happy, cheerful, euphoric) like the track with a low valence. (sad, depressed, angry)- Returns:
- Valence value.
-
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.
-
equals
-
hashCode
public int hashCode()
-