How to analyze BPM from an audio URL

The URL analyzer is useful when a file is publicly reachable and the hosting server allows browser access. Most failures are caused by the URL returning a web page, an unsupported codec, or missing CORS permission.

Updated 2026-08-01

Use a direct file response

A direct URL returns audio bytes such as MPEG audio or WAV data. A link to a streaming-service track page usually returns HTML and cannot be decoded as audio.

Open the URL in a private tab to inspect its behavior. If it presents a player page, sign-in screen, or expiring redirect, it may not be suitable for direct analysis.

Understand CORS

The browser applies the remote server CORS policy before JavaScript can read the response. The server must include an Access-Control-Allow-Origin header that permits bpmtech.no or all origins.

This is a browser security boundary. Changing the BPM Techno frontend cannot grant access to a server that refuses the cross-origin request.

Codec and container support

A filename extension is only a hint. The browser must support the codec inside the file and the response should use a sensible content type. Common MP3 and uncompressed WAV files have broad support, while specialized or malformed files may fail.

Browser support can differ across operating systems, so a URL that works in one browser is not guaranteed to decode everywhere.

What happens after the fetch

The response is read into browser memory and decoded with the Web Audio API. The analyzer examines the decoded samples and returns a BPM estimate. BPM Techno does not proxy or permanently store the file.

Large files take more time and memory. Use a representative excerpt when you control the source and do not need to analyze an entire long recording.

Troubleshooting

  • Confirm the URL uses HTTPS and returns successfully without authentication.
  • Check the browser developer console for a CORS or decoding error.
  • Try the included sample to confirm that local analysis works.
  • Use a conventional MP3 or WAV encoding.
  • Host your own authorized file with appropriate CORS headers when necessary.