AudioAnalysis

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

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

Link copied to clipboard
constructor(bars: List<TimeInterval>, beats: List<TimeInterval>, meta: AudioAnalysisMeta, sections: List<AudioSection>, segments: List<AudioSegment>, tatums: List<TimeInterval>, track: TrackAnalysis)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard