mcp_opendaw_extract_motifs
Identify and extract repeating melodic motifs from MIDI regions by analyzing interval contours, helping to understand musical structure and create variations.
Instructions
Extract repeating melodic motifs from a MIDI region.
A motif is a short melodic phrase (3-8 notes) identified by its interval contour — the pattern of pitch changes between consecutive notes. The same motif transposed to a different key still matches, because the relative intervals are identical.
Essential for: understanding melodic structure of existing pieces, finding repetitive patterns for variation, identifying verse/chorus motifs, and building call-and-response arrangements from existing material.
unit_index: AU index (-1 = all AUs). track_index: Note track index (-1 = all note tracks). region_index: Region index (-1 = all regions on track). min_motif_length: Minimum notes in a motif (default 3). max_motif_length: Maximum notes in a motif (default 8). min_repetitions: Minimum times a motif must appear to be reported (default 2). max_results: Maximum motifs to return, sorted by significance (default 20).
Returns list of motifs with contour, rhythm pattern, contour type, and occurrence positions.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "mcp_opendaw_extract_motifs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit_index | No | ||
| max_results | No | ||
| track_index | No | ||
| region_index | No | ||
| min_repetitions | No | ||
| max_motif_length | No | ||
| min_motif_length | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |