Class AudioAnalysisTrack
- All Implemented Interfaces:
Serializable
,IModelObject
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder class for buildingAudioAnalysisTrack
instances.static final class
JsonUtil class for buildingAudioAnalysisTrack
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 analysis channels.Get the sample rate in which the audio analysis was performed.Get the code string of the track.Get the version of the code string.Get the duration of the track in seconds.Get the echoprint string of the track.Get the version of the echoprint string.Get the end of fade in introduction of the track.getKey()
Get the estimated main key of the track.Get the key confidence of the track.Get the average loudness of the track in decibels.getMode()
Get the modality of the track.Get the modality confidence of the track.Get the number of samples in the track.Get the offset seconds.Get the rhythm string of the track.Get the version of the rhythm string.Get the sample MD5.Get the start of the fade out in seconds.Get the synch string of the track.Get the version of the synch string.getTempo()
Get the estimated tempo of the track in beats per minute.Get the tempo confidence of the track.Get the estimated overall time signature of the track.Get the time signature confidence of the track.Get the window seconds.toString()
Returns a String representation of this model object in the style:
-
Method Details
-
getNumSamples
Get the number of samples in the track.
The total number of samples is calculated by multiplying the duration of the track with the sample rate.- Returns:
- The total number of samples in the track.
-
getDuration
Get the duration of the track in seconds.- Returns:
- The duration of the track in seconds.
-
getSampleMd5
Get the sample MD5.
Note: The sample MD5 is probably the MD5 of the track file. In the documentation of the Analyzer software, this field is mentioned in an example and contains a value, but it seems that audio analysis objects returned by the Spotify Web API doesn't include a value in the field anymore.
- Returns:
- The sample MD5.
-
getOffsetSeconds
Get the offset seconds.
Note: There is no public documentation available for this field.- Returns:
- The offset seconds.
-
getWindowSeconds
Get the window seconds.
Note: There is no public documentation available for this field.- Returns:
- The window seconds.
-
getAnalysisSampleRate
Get the sample rate in which the audio analysis was performed.- Returns:
- The analysis sample rate.
-
getAnalysisChannels
Get the analysis channels.- Returns:
- The analysis channels.
-
getEndOfFadeIn
Get the end of fade in introduction of the track.- Returns:
- The end of fade in introduction in seconds.
-
getStartOfFadeOut
Get the start of the fade out in seconds.- Returns:
- The start of the fade out in seconds.
-
getLoudness
Get the average loudness of the track in decibels. These values are mostly in a range between -60 and 0 decibels.- Returns:
- Average loudness of the track.
-
getTempo
Get the estimated tempo of the track in beats per minute.- Returns:
- The estimated tempo of the track.
-
getTempoConfidence
Get the tempo confidence of the track.- Returns:
- The tempo confidence of the track.
-
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.
-
getTimeSignatureConfidence
Get the time signature confidence of the track.- Returns:
- The time signature confidence.
-
getKey
Get the estimated main key of the track.- Returns:
- Main key of the track.
- See Also:
-
getKeyConfidence
Get the key confidence of the track.- Returns:
- The key confidence of the track.
-
getMode
Get the modality of the track. (either "major" or "minor")- Returns:
- The modality type of the track.
- See Also:
-
getModeConfidence
Get the modality confidence of the track.- Returns:
- The modality confidence of the track.
-
getCodeString
Get the code string of the track.
Note: The code string is a fingerprint computed on the audio and were used by the Echo Nest services for song identification, which are no longer available.
- Returns:
- The code string of the track.
-
getCodeVersion
Get the version of the code string.- Returns:
- The version of the code string.
-
getEchoprintString
Get the echoprint string of the track.
Note: The echoprint string is a fingerprint computed on the audio and were used by the Echo Nest services for song identification, which are no longer available.
- Returns:
- The echoprint string of the track.
-
getEchoprintVersion
Get the version of the echoprint string.- Returns:
- The version of the echoprint string.
-
getSynchString
Get the synch string of the track.
It works with a simple synchronization algorithm to be implemented on the client side, which generates offset values in numbers of samples for 3 locations in the decoded waveform, the beginning, the middle, and the end. These offsets allow the client application to detect decoding errors (when offsets mismatch). They provide for synching with sample accuracy, the JSON timing data with the waveform, regardless of which mp3 decoder was used on the client side (quicktime, ffmpeg, mpg123, etc).
- Returns:
- The synch string.
-
getSynchVersion
Get the version of the synch string.- Returns:
- The synch string version.
-
getRhythmString
Get the rhythm string of the track.- Returns:
- The rhythm string of the track.
-
getRhythmVersion
Get the version of the rhythm string.- Returns:
- The rhythm string version.
-
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.
-