v2

latestOpenAPI 3.0.12026-08-074878134.7 KB
Beta

Beats

The beats endpoint provides information about the timestamps of beats in a track. You can use this endpoint to simplify the process to cut the video in sync with the music.

Unlike BPM which is a single number for the entire track, beats can change dynamically across a music piece. This is particularly valuable for capturing variations in tempo, such as a slower intro, a build-up with faster beats, or changes in rhythm throughout the composition.

The response includes two types of metadata: time and value.

time represents the timestamp of the beat in seconds. value indicates the beat's position in a bar (or measure in the US), where 1 corresponds to the first beat (downbeat).

Examples:

Most pop songs have four beats in a bar. For example, if we looked at the beats data for Coolio's 1, 2, 3, 4 it would look something like: 1-2-3-4, 1-2-3-4

However, a waltz has three beats in a bar, and the data would look something like: 1-2-3, 1-2-3

Usage Scenarios:

  • Automatically cut a video in sync with the beat

  • Adding snap markers aligned with beat timestamps in the UI.

get/v0/tracks/{trackId}/beats

Path parameters

trackIdstring required

Track id

Response

Beats response