song_to_midi
Create a two-track MIDI file combining melody and chord accompaniment. Define notes, rhythms, and chords to produce a complete song arrangement.
Instructions
Write a melody plus chord accompaniment into one two-track MIDI file.
Track 1 plays melody_notes (optionally shaped by melody_rhythm,
same rules as notes_to_midi); track 2 plays chords (same formats as
chords_to_midi), one every beats_per_chord. You decide which melody
notes go over which chords — align them by length: a melody over 4 chords
of 4 beats with 0.5-beat steps needs a 32-step rhythm/notes. General MIDI
*_program numbers pick instruments (0 piano, 32 bass, 48 strings...).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| melody_notes | Yes | ||
| chords | Yes | ||
| melody_rhythm | No | ||
| step_beats | No | ||
| beats_per_chord | No | ||
| tempo | No | ||
| melody_octave | No | ||
| chord_octave | No | ||
| octave_policy | No | nearest | |
| melody_velocity | No | ||
| accent_velocity | No | ||
| chord_velocity | No | ||
| sustain | No | ||
| arpeggiate_chords | No | ||
| melody_program | No | ||
| chord_program | No | ||
| file_name | No | ||
| output_dir | No |