Skip to main content
Glama

mcp_opendaw_apply_rhythm_pattern

Apply a rhythmic pattern to reposition existing note onsets onto a target grid, with adjustable 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
Behavior5/5

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

With no annotations provided, the description fully discloses the tool's behavior: it reads existing notes, computes target onsets, distributes notes round-robin or to nearest onset, and optionally adjusts velocity/duration. Edge cases like pattern cycling and note distribution are explained, making the tool's behavior completely transparent.

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 well-structured with a clear introductory sentence, a 'How it works' section, parameter definitions, and an example. Every sentence contributes meaning, and there is no redundancy. It is comprehensive yet concise.

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?

Given the complexity of 8 parameters, no schema descriptions, no annotations, and an output schema, the description covers all necessary context: algorithm steps, parameter details, edge cases, and return value. It is fully sufficient for an agent to select and invoke the tool correctly.

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 input schema has 0% description coverage, so the description must compensate. It does so thoroughly by explaining each of the 8 parameters, including their format, default values, and behavioral implications (e.g., velocity_mode options, rhythm_string vs onset_grid priority). This adds immense value beyond the raw schema.

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 description clearly states the tool's purpose: apply a rhythmic pattern to existing notes by repositioning onsets. It uses specific verb+resource ('apply a rhythmic pattern') and distinguishes itself as the inverse of 'extract_rhythm.' The sibling context is implicitly handled by explaining the relationship to extraction.

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 clear context for when to use the tool, including an example workflow with extract_rhythm. However, it does not explicitly state when not to use it or list alternative tools beyond mentioning its inverse relationship. The guidance is strong but lacks explicit exclusions.

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-team/opendaw-mcp'

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