Skip to main content
Glama

mcp_opendaw_apply_rhythm_pattern

Reposition existing notes onto a target grid by applying a rhythm pattern. Use rhythm_string or onset_grid to stamp a groove, with velocity and duration modes.

Instructions

Apply a rhythmic pattern to existing notes — reposition onsets to match a target grid.

Takes a rhythm pattern (either a rhythm_string like "x.x.x..x" or an onset_grid like "1,0,1,0,1,0,0,1") and repositions existing notes onto the onset positions. This is the inverse of extract_rhythm — it lets you stamp a groove onto any note content.

How it works:

  1. Reads existing notes and their pitches/velocities/durations

  2. Computes the target onset positions from the pattern (cycling if pattern is shorter than the region)

  3. Distributes notes across onset positions:

    • If fewer onsets than notes: extra notes are placed at the nearest onset

    • If more onsets than notes: notes are assigned round-robin to onsets

  4. Optionally adjusts velocity (accent onsets) and duration (staccato/legato)

velocity_mode:

  • "preserve": keep original velocities

  • "accent": strong beats (0,4,8,12 in 16th) get +20% velocity, weak get -10%

  • "flat": all notes get 0.8 velocity

  • "pattern": use onset_velocities from extract_rhythm if provided in onset_grid

duration_mode:

  • "preserve": keep original durations

  • "staccato": each note lasts 50% of the grid step

  • "legato": each note lasts until the next onset

unit_index: AU index. track_index: Note track index. region_index: Region index (-1 = first region). rhythm_string: Compact pattern "x.x.x..x" (x=onset, .=rest). Used if onset_grid is empty. onset_grid: Comma-separated "1,0,1,0,1,0,0,1" or "1;0.5;0;0.8" (value=velocity). Takes priority over rhythm_string. grid: Grid resolution (16th/8th/32nd/quarter). velocity_mode: How to handle velocities (preserve/accent/flat/pattern). duration_mode: How to handle durations (preserve/staccato/legato).

Returns modification summary with repositioned note count.

Example:

Extract groove from drums, apply to bass

rhythm = extract_rhythm(0, 0, grid="16th")

... parse rhythm_string from result ...

apply_rhythm_pattern(0, 1, rhythm_string="x...x...x...x...", grid="16th")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gridNo16th
onset_gridNo
unit_indexYes
track_indexYes
region_indexNo
duration_modeNopreserve
rhythm_stringNo
velocity_modeNopreserve

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure. It describes the note distribution algorithm in detail ('If fewer onsets than notes: extra notes are placed at the nearest onset'), the effects of velocity/duration modes, and notes that it returns 'a modification summary with repositioned note count.' It implies in-place modification by saying 'repositions existing notes.' It does not discuss undo or reversibility, but the level of detail is strong given the lack of annotations.

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

Conciseness5/5

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

The description is long but every section is purposeful: a summary sentence, numbered algorithm steps, a parameter glossary, and a usage example. It is structured and front-loaded with the one-line purpose, making it easy to scan.

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 tool with 8 parameters and no schema descriptions, the description covers all parameters, behavior, precedence, and an example workflow. It also mentions the return value ('modification summary'), and since an output schema exists, we don't need exact return fields. The only minor gaps are edge cases like empty note regions, which aren't critical for typical use.

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?

The schema has 0% coverage, but the description defines every parameter, including default values and precedence (e.g., 'onset_grid: ... Takes priority over rhythm_string'). It explains valid values for velocity_mode and duration_mode with examples, providing far more semantics than the schema alone.

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 action: 'Apply a rhythmic pattern to existing notes — reposition onsets to match a target grid.' It also explicitly distinguishes itself from extract_rhythm ('This is the inverse of extract_rhythm'), establishing a clear purpose unique among siblings.

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?

It explains when to use this tool by framing it as the inverse of extract_rhythm, saying it 'lets you stamp a groove onto any note content,' and provides a concrete example workflow ('Extract groove from drums, apply to bass'). It does not, however, list exclusions or alternatives beyond extract_rhythm, so it's clear but not exhaustive.

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