mcp_opendaw_analyze_melody
Analyze melodic contour, intervals, direction changes, and climax placement to understand a melody's shape and structure for informed variation or reharmonization.
Instructions
Analyze melodic content — contour, intervals, direction, climax.
Returns a detailed melodic analysis of notes in a region:
Contour profile: direction (up/down/static) for each consecutive interval
Interval histogram: count of each interval size (semitones)
Step vs leap ratio: percentage of steps (≤2 semitones) vs leaps (>2)
Direction changes: how often melody changes direction
Climax: highest pitch and its position
Nadir: lowest pitch and its position
Phrase analysis: groups by rests (gaps > 1 beat) into phrases
Contour shape classification: ascending/descending/arch/v_shape/wave/static
Melodic range: semitone span between lowest and highest
Average interval size
Useful for:
Understanding a melody before variation/reharmonization
Comparing melodies (which is more jagged, which more stepwise?)
Identifying climax placement (is the high point early, middle, late?)
Feeding analysis to create_motif_variations
Evaluating AI-generated melodies for contour interest
unit_index: AU index. track_index: Note track index. region_index: Region (-1 = first region).
Returns analysis object.
Example: analysis = analyze_melody(0, 3)
contour_shape, climax_position, step_leap_ratio, interval_histogram
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"unit_index": "<unit_index>",
"track_index": "<track_index>"
},
"name": "mcp_opendaw_analyze_melody"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit_index | Yes | ||
| track_index | Yes | ||
| region_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |