mcp_opendaw_create_random_walk_melody
Generate a melody by walking up or down a scale stepwise, producing coherent yet unpredictable sequences. Adjust step size, direction bias, rests, and note durations.
Instructions
Create a melody using a random walk through a scale — stochastic generation.
Each note is chosen by walking up or down the scale from the previous note. The walk is constrained by max_step (how many scale degrees can move per step) and direction_bias (probability of ascending vs descending).
This produces melodies that feel coherent (smooth stepwise motion) yet unpredictable — the hallmark of generative music. Brian Eno's generative systems, Xenakis's stochastic pieces, ambient textures, IDM melodies.
Unlike generate_melody (contour-guided weighted random), random walk produces stepwise motion where each note depends on the previous one — creating the melodic continuity that contour guidance doesn't guarantee.
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). At default duration=0.5, 4 bars = 32 notes. octave: Starting MIDI octave (1-6, default 4 = C4=60). max_step: Maximum scale steps per move (1-7, default 3). 1 = only adjacent scale tones (very smooth, stepwise). 2 = allow skips of up to a third. 3 = up to a fourth (mix of steps and skips). 5 = up to a sixth (dramatic leaps). 7 = full octave (free movement). direction_bias: -1.0 to +1.0 (default 0 = equal up/down). Negative = tend downward, positive = tend upward. 0.5 = 75% chance up, 25% down. duration: Note duration in beats (0.0625-4.0, default 0.5 = eighth). duration_variation: "none" (uniform), "slight" (+/-50%), "wide" (16th to half), "dotted" (mix of dotted and straight). rest_probability: 0-0.5 (default 0 = no rests). Inserts rests instead of notes at the given probability. velocity: Base velocity 0-1. velocity_variation: "none" (uniform), "slight" (+/-0.1), "dynamic" (+/-0.3), "human" (gaussian-ish, +/-0.15). boundary_behavior: "reflect" (bounce back at octave limits), "wrap" (wrap around), "clamp" (stay at boundary). seed: PRNG seed for reproducibility. unit_index: AU index. track_index: Note track index. start_beat: Starting beat position.
Returns notes created, walk statistics (range, average interval, direction ratio), and seed for reproducibility.
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_create_random_walk_melody"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bars | No | ||
| root | No | C | |
| seed | No | ||
| scale | No | minor | |
| octave | No | ||
| duration | No | ||
| max_step | No | ||
| velocity | No | ||
| start_beat | No | ||
| unit_index | No | ||
| track_index | No | ||
| direction_bias | No | ||
| rest_probability | No | ||
| boundary_behavior | No | reflect | |
| duration_variation | No | none | |
| velocity_variation | No | none |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |