Skip to main content
Glama

mcp_opendaw_detect_bpm

Read-only

Detect the BPM of a WAV file using onset detection and autocorrelation. Returns BPM, confidence, onset count, and duration to set project tempo for beat-aligned stem placement.

Instructions

Detect BPM (tempo) of an exported WAV file using onset detection + autocorrelation.

Pure Python implementation (no external dependencies):

  1. Parse WAV → mono mixdown

  2. Energy envelope (1024-sample windows)

  3. Onset detection (energy spikes above local average)

  4. Autocorrelation of onset train → dominant periodicity → BPM

Essential for Suno integration: Suno generates at its own BPM, but the openDAW project needs matching tempo. Detect → set_bpm for correct beat alignment when placing stems.

filename: Name of the WAV file in the exports directory (without path), or absolute path to any WAV file.

Returns: bpm (60-200), confidence (0-1), onset_count, duration_seconds.

Examples:

After importing a Suno track

result = detect_bpm("suno_track.wav")

→ {bpm: 128.0, confidence: 0.85, onset_count: 240, ...}

Then set project BPM

set_bpm(128)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, and the description adds substantial behavioral detail: the algorithm steps (WAV parse, mono mixdown, energy envelope, onset detection, autocorrelation), the 'Pure Python implementation (no external dependencies)' trait, filename resolution rules (exports directory or absolute path), and the return contract (bpm, confidence, onset_count, duration_seconds). No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is longer than average but well-structured: purpose sentence, numbered algorithm list, use-case rationale, parameter definition, return values, and a worked example. Each section adds value, though the 4-step algorithm listing is arguably more detail than strictly needed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter analysis tool with readOnlyHint and an output schema, the description is remarkably complete: it covers purpose, input semantics, return values, an end-to-end example, and the motivating scenario. Missing only minor edge-case details like behavior on missing files or low confidence.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% — the schema only states 'filename' is a required string. The description fully compensates: 'filename: Name of the WAV file in the exports directory (without path), or absolute path to any WAV file.' It also shows usage in the example (detect_bpm("suno_track.wav")), removing all ambiguity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific verb+resource: 'Detect BPM (tempo) of an exported WAV file using onset detection + autocorrelation.' This clearly distinguishes it from siblings like set_bpm (which sets tempo) and get_tempo_at (which queries project tempo).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a concrete use case: 'Essential for Suno integration: Suno generates at its own BPM, but the openDAW project needs matching tempo. Detect → set_bpm for correct beat alignment when placing stems.' It names a downstream workflow but does not explicitly state when NOT to use this tool or name alternative detection tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ameobius-ai/opendaw-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server