notes_to_midi
Write a note sequence to a MIDI file with optional rhythm patterns, accenting, and octave assignment. Supports scales, arpeggios, and melodies.
Instructions
Write a note sequence (scale, arpeggio or melody) to a MIDI file.
Plays the notes in order, one per step_beats. With rhythm (a pattern
like 'O.oo.O..' from random_rhythm or hand-written), each step follows the
pattern: O = accented note, o = soft note, . = pause (notes are consumed
in order and wrap around if the pattern needs more; with sustain=true
pauses extend the previous note instead). Octave-less notes are placed by
octave_policy: 'nearest' for melodies, 'ascending' for scale runs.
Returns the file path and base64 plus the exact note events written.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | ||
| rhythm | No | ||
| step_beats | No | ||
| tempo | No | ||
| octave | No | ||
| octave_policy | No | nearest | |
| velocity | No | ||
| accent_velocity | No | ||
| sustain | No | ||
| program | No | ||
| file_name | No | ||
| output_dir | No |