mcp_opendaw_create_markov_melody
Generate melodies with stylistic memory using a Markov chain that models interval-to-interval tendencies, capturing natural genre or composer patterns.
Instructions
Create a melody using a Markov chain over scale-degree intervals.
First-order (or higher) Markov chain: the next interval depends on the current (or previous N) interval(s) via a transition probability matrix. This produces melodies with stylistic memory — the interval patterns characteristic of a genre or composer emerge naturally.
Unlike random_walk (zero-order: each step independent of history), Markov chains capture interval-to-interval tendencies:
A small ascending interval tends to be followed by another small one
A large leap tends to be followed by a step back (regression to mean)
Specific interval sequences define melodic "style"
The transition matrix can be:
Default: built-in weights favoring smooth motion (steps > skips > leaps)
Custom: user-provided interval weights as JSON
Args: root: Root note name (C, C#, D, ...). scale: Scale name (major, minor, dorian, phrygian, lydian, mixolydian, harmonic_minor, melodic_minor, pentatonic_major, pentatonic_minor, blues). bars: Number of bars (1-32). octave: Starting MIDI octave (1-6). order: Markov chain order (1 or 2). Order 1 = depends on current interval. Order 2 = depends on last 2 intervals. interval_weights: JSON string of custom transition weights. If empty, uses built-in weights. Format for order 1: {"-3": {"-3": 0.1, "-2": 0.2, "-1": 0.3, "0": 0.1, "1": 0.2, "2": 0.1}, "-2": {...}, ...} Keys are interval sizes (-7 to +7 scale steps). duration: Note duration in beats (0.0625-4.0). velocity: Base velocity 0-1. seed: PRNG seed for reproducibility. unit_index: AU index. track_index: Note track index. start_beat: Starting beat position.
Returns notes created, transition statistics, and seed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bars | No | ||
| root | No | C | |
| seed | No | ||
| order | No | ||
| scale | No | minor | |
| octave | No | ||
| duration | No | ||
| velocity | No | ||
| start_beat | No | ||
| unit_index | No | ||
| track_index | No | ||
| interval_weights | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |