Blog

Song sections that follow the real tempo

Audial's rebuilt analysis maps a song's tempo as it actually plays, piece by piece, so section boundaries stay on the beat from the first bar to the last. What changed, and how to use it.

November 7, 2026 5 min readAudial

Naming the sections of a song is the easy part of song structure analysis. Intro, verse, chorus, breakdown: most people can hear them. The hard part is the grid underneath. A section boundary is a bar line, and if the beat grid is off, every boundary placed on it is off too, by a little at the start of the song and by a lot at the end.

Audial's analysis was rebuilt in November 2026 around that grid. This post explains what was wrong before, what the analysis does now, and how to use the result in a DAW.

What went wrong before

The previous analysis took one tempo for the whole song, rounded to a whole number, and laid a fixed grid from the first drum hit. That works for a track programmed at exactly 128 BPM. It does not work for a track at 127.6 BPM.

The arithmetic is unforgiving. Six minutes at 127.6 BPM is about 766 beats. Played back on a 128 BPM grid, those beats take 1.1 seconds less than they really do, so by the end of the song the grid is more than two beats ahead of the music. Every late section boundary inherits that error. Live recordings, rubato intros and anything not programmed to a click were the worst case, because they never sat on one tempo in the first place.

What it does now: a tempo map

The rebuilt analysis finds the beats first and describes them afterwards, as a tempo map: the song as a series of constant-tempo pieces. A piece keeps growing while its beats stay on one straight line, and the map reproduces every detected beat to within 25 milliseconds. Where the tempo moves, or a bar is cut short, a new piece starts with the right bar and beat number.

So a track programmed to a click comes back as one piece, or very few. A track that drifts comes back as however many pieces it needs, instead of one tempo forced onto all of it. The analysis says which kind it is: tempo_mode is constant or variable.

The demo track on our song segmentation page is a club mix at 129 BPM. Its map has four pieces, all between 128.99 and 129.02 BPM, holding 841 beats and 208 bars. That is about as steady as music gets, and the map still records the tiny differences instead of rounding them away.

Bar 1 and the lead-in

Where bar 1 falls is a musical decision, not a technical one. Plenty of tracks have a pickup, a count-in or a few beats of noise before the song really starts. The analysis finds the song's start and its first bar separately, and anything before bar 1 is a lead-in, numbered bar 0, bar −1 and so on, rather than shifting the whole count.

On the demo track, bar 1 lands at 5.768 seconds; the first piece of the tempo map starts at bar −2, beat 1.

Sections and phrases

On top of the grid the analysis finds phrases, usually 8 or 16 bars long, and merges neighbouring phrases of the same kind into sections. Each section has a label, a start and end in seconds, the bar it starts on, its length in bars, the phrases it contains, and the times of any fill-ins.

Here is the demo track:

Section Start End Starts at bar Bars
INTRO 5.77 s 35.51 s 1 16
UP 35.51 s 65.30 s 17 16
CHORUS 65.30 s 154.59 s 33 48
UP 154.59 s 195.55 s 81 22
CHORUS 195.55 s 284.85 s 103 48
DOWN 284.85 s 305.30 s 151 11
OUTRO 305.30 s 391.00 s 162 47

Labels come from one of two vocabularies. Dance music gets INTRO, UP, CHORUS, DOWN and OUTRO; songs get INTRO, VERSE, UP, CHORUS and OUTRO. Pick a genre when you analyse and it decides which; leave it out and the analysis decides from the audio.

All of this needs only the mix, and it takes about half a minute. There are no stems to prepare first and no tempo or key to type in.

Using it in your DAW

For a track with one piece, or a handful at nearly the same tempo:

  1. Set the project tempo to the analysis's bpm.
  2. Move the audio so the time in bar1 sits on bar 1 of your project.
  3. Drop a marker at the start of each section.

For a variable-tempo track, use the pieces: each one is a tempo change at a known time, so they translate directly into tempo automation or tempo markers. If you want every beat as a time, expanding the map takes a few lines of Python. This is the same snippet as on the API reference, with seg being the analysis:

def expand(grid):  # every beat as (time, bar, beat)
    out = []
    for p in grid["pieces"]:
        bar, beat = p["bar"], p["beat"]
        for k in range(p["count"]):
            out.append((round(p["start"] + k * (60 / p["bpm"]), 3), bar, beat))
            bar, beat = (bar + 1, 1) if beat == grid["beats_per_bar"] else (bar, beat + 1)
    return out

beats = expand(seg["grid"])
bar_times = [t for t, bar, beat in beats if beat == 1 and bar >= 1]

The Python SDK does this for you: audial.segment() adds beat_times and bar_times to the result, so scripts written for the old format keep working.

What it does not decide for you

An analysis makes judgement calls, and it is worth knowing which ones:

  • Section names come from one of two vocabularies. Your bridge might come back as an UP; your pre-chorus might be folded into the verse. Rename them in your DAW; the boundaries are the useful part.
  • Where a section changes is decided from the audio. A producer might hear a section starting four bars earlier, where the energy starts building.
  • Half time and double time are a matter of feel. The analysis reports one tempo, and if you hear the track at half of it, halve it.

Older analyses

Analyses made before November 2026 list beat_times and bar_times directly instead of a grid, and their sections were placed on the old fixed grid. Analyse the track again to get the tempo map.

Try it

Upload a track on the Audio Analysis tab, or start from song segmentation and the BPM and key finder. An analysis counts as one run, and everything you add to it afterwards (audio features, tags, lyrics, a sample pack) is included.

analysissegmentationtempo