write_melody
Compose a melody over chords: generates rhythmic motifs, phrases, chord-tone strong beats, stepwise lines, and a closing tonic. Use seeds to explore variations.
Instructions
Composes a melody over chords: a rhythmic motif developed in phrases, chord tones on strong beats, stepwise lines with leaps recovered, a high point, a half-close at the end of the first phrase and the tonic at the end. Try several seeds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Key with any scale or mode: 'A minor', 'F# dorian', 'Bb', 'Eb mixolydian', 'C harmonic minor' | |
| low | No | Lowest note, e.g. C4 (vocal-like), A3 | C4 |
| high | No | Highest note, e.g. G5 | G5 |
| seed | No | Same seed, same melody; change it for another idea | |
| scale | No | Scale the melody uses, e.g. 'minor pentatonic', 'blues'; default: the key's | |
| start | No | ||
| chords | Yes | Chords with lengths, or one string like 'Am7 D7 Gmaj7' / 'ii7-V7-Imaj7' (each lasting chord_length). | |
| density | No | How many notes per bar | medium |
| item_id | Yes | MIDI item id from create_midi_item/get_track_details, or "selected" | |
| replace | No | ||
| velocity | No | ||
| phrase_bars | No | Phrase length: the motif repeats and the phrase closes every this many bars | |
| syncopation | No | ||
| chord_length | No |