Class AudioFeatures
- java.lang.Object
-
- com.wrapper.spotify.model_objects.AbstractModelObject
-
- com.wrapper.spotify.model_objects.specification.AudioFeatures
-
- All Implemented Interfaces:
IModelObject
public class AudioFeatures extends AbstractModelObject
Retrieve information about Audio Feature objects by building instances from this class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAudioFeatures.BuilderBuilder class for buildingAudioFeaturesinstances.static classAudioFeatures.JsonUtilJsonUtil class for buildingAudioFeaturesinstances.-
Nested classes/interfaces inherited from interface com.wrapper.spotify.model_objects.IModelObject
IModelObject.IJsonUtil<T>
-
-
Method Summary
Modifier and Type Method Description AudioFeatures.Builderbuilder()Create a builder for building an instance of a model object.java.lang.FloatgetAcousticness()Get the acousticness of the track as a value between 0.0 and 1.0.java.lang.StringgetAnalysisUrl()Get the Spotify Web API endpoint URL for a full audio analysis.java.lang.FloatgetDanceability()Get the danceability of the track as a value between 0.0 and 1.0.java.lang.IntegergetDurationMs()Get the duration of the track in milliseconds.java.lang.FloatgetEnergy()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.java.lang.StringgetId()Get the Spotify ID of the track.java.lang.FloatgetInstrumentalness()Get the instrumentalness of the track as a value between 0.0 and 1.0.java.lang.IntegergetKey()Get the main key of the track.java.lang.FloatgetLiveness()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.java.lang.FloatgetLoudness()Get the average loudness of the track.ModalitygetMode()Get the modality of the track.java.lang.FloatgetSpeechiness()Get the speechiness of the track as a value between 0.0 and 1.0.java.lang.FloatgetTempo()Get the estimated tempo of the track in beats per minute.java.lang.IntegergetTimeSignature()Get the estimated overall time signature of the track.java.lang.StringgetTrackHref()Get the Spotify Web API endpoint URL of the track.ModelObjectTypegetType()Get the model object type.java.lang.StringgetUri()Get the Spotify URI of the track.java.lang.FloatgetValence()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.
-
-
-
Method Detail
-
getAcousticness
public java.lang.Float 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
public java.lang.String 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:
AudioAnalysis
-
getDanceability
public java.lang.Float 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
public java.lang.Integer getDurationMs()
Get the duration of the track in milliseconds.- Returns:
- Track duration.
-
getEnergy
public java.lang.Float 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
public java.lang.String getId()
Get the Spotify ID of the track.- Returns:
- Spotify track ID.
-
getInstrumentalness
public java.lang.Float 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:
getSpeechiness()
-
getKey
public java.lang.Integer getKey()
Get the main key of the track.- Returns:
- Main key.
- See Also:
- Wikipedia: Pitch class notation
-
getLiveness
public java.lang.Float 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
public java.lang.Float getLoudness()
Get the average loudness of the track. These values have mostly a range between -60 and 0 decibels.- Returns:
- Loudness value.
-
getMode
public Modality getMode()
Get the modality of the track. (either "major" or "minor")- Returns:
Modalitytype.- See Also:
- Wikipedia: Mode (music)
-
getSpeechiness
public java.lang.Float 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:
getInstrumentalness()
-
getTempo
public java.lang.Float getTempo()
Get the estimated tempo of the track in beats per minute.- Returns:
- Tempo value.
-
getTimeSignature
public java.lang.Integer 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
public java.lang.String getTrackHref()
Get the Spotify Web API endpoint URL of the track.- Returns:
- A Spotify Web API endpoint URL.
-
getType
public ModelObjectType getType()
Get the model object type. In this case "audio_features".- Returns:
- A
ModelObjectType.
-
getUri
public java.lang.String getUri()
Get the Spotify URI of the track.- Returns:
- Spotify track URI.
-
getValence
public java.lang.Float 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.
-
builder
public AudioFeatures.Builder builder()
Description copied from interface:IModelObjectCreate 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.
-
-