AudioAnalysis

data class AudioAnalysis(bars: List<TimeInterval>, beats: List<TimeInterval>, meta: AudioAnalysisMeta, sections: List<AudioSection>, segments: List<AudioSegment>, tatums: List<TimeInterval>, track: TrackAnalysis)

The Audio Analysis endpoint provides low-level audio analysis for all of the tracks in the Spotify catalog. The Audio Analysis describes the track’s structure and musical content, including rhythm, pitch, and timbre. All information is precise to the audio sample. Many elements of analysis include confidence values, a floating-point number ranging from 0.0 to 1.0. Confidence indicates the reliability of its corresponding attribute. Elements carrying a small confidence value should be considered speculative. There may not be sufficient data in the audio to compute the attribute with high certainty.

Parameters

bars

The time intervals of the bars throughout the track. A bar (or measure) is a segment of time defined as a given number of beats. Bar offsets also indicate downbeats, the first beat of the measure.

beats

The time intervals of beats throughout the track. A beat is the basic time unit of a piece of music; for example, each tick of a metronome. Beats are typically multiples of tatums.

meta

Analysis meta information (limited use)

sections

Sections are defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitar solo, etc. Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.

segments

Audio segments attempts to subdivide a song into many segments, with each segment containing a roughly consitent sound throughout its duration.

tatums

A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing of perceived musical events (segments).

track

An analysis of the track as a whole. Undocumented on Spotify's side.

Constructors

AudioAnalysis
Link copied to clipboard
common
fun AudioAnalysis(bars: List<TimeInterval>, beats: List<TimeInterval>, meta: AudioAnalysisMeta, sections: List<AudioSection>, segments: List<AudioSegment>, tatums: List<TimeInterval>, track: TrackAnalysis)
The time intervals of the bars throughout the track.

Properties

bars
Link copied to clipboard
common
val bars: List<TimeInterval>
The time intervals of the bars throughout the track.
beats
Link copied to clipboard
common
val beats: List<TimeInterval>
The time intervals of beats throughout the track.
meta
Link copied to clipboard
common
val meta: AudioAnalysisMeta
Analysis meta information (limited use)
sections
Link copied to clipboard
common
val sections: List<AudioSection>
Sections are defined by large variations in rhythm or timbre, e.g.
segments
Link copied to clipboard
common
val segments: List<AudioSegment>
Audio segments attempts to subdivide a song into many segments, with each segment containing a roughly consitent sound throughout its duration.
tatums
Link copied to clipboard
common
val tatums: List<TimeInterval>
A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing of perceived musical events (segments).
track
Link copied to clipboard
common
val track: TrackAnalysis
An analysis of the track as a whole.

Sources

common source
Link copied to clipboard