mcp_opendaw_force_scale_notes
Snaps out-of-scale MIDI notes to the nearest in-scale pitch, preserving octave by default. Ideal for cleaning up imported or generated melodies.
Instructions
Force all notes in a region into a specific scale — harmonic snap.
Finds every note that is NOT in the target scale and moves it to the nearest in-scale note. This is the harmonic equivalent of quantize_notes (which snaps timing to a grid). Useful after audio-to-MIDI transcription, random generation, or importing MIDI from unknown sources.
root_note: Root note name — C, C#, D, D#, E, F, F#, G, G#, A, A#, B. scale: Scale name — major, minor, dorian, phrygian, lydian, mixolydian, aeolian, locrian, pentatonic_major, pentatonic_minor, blues, harmonic_minor, melodic_minor. direction: How to resolve out-of-scale notes — "nearest" (closest, default), "up" (always shift up to next in-scale note), "down" (always shift down). preserve_octave: If True (default), keep notes in their original octave — only shift by 1-2 semitones. If False, allow octave jumps to find the nearest match.
Returns count of notes snapped, per-track breakdown, and which notes were changed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | major | |
| direction | No | nearest | |
| root_note | No | C | |
| unit_index | No | ||
| track_index | No | ||
| region_index | No | ||
| preserve_octave | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |