ferraus midi legato

Extend notes to the next onset

Synopsis

ferraus midi legato <input> [options] [-o <output>]

What it does

Lengthens every note to the next note-on in its track and channel (chords move together), leaving --gap of space. The last notes keep their length.

Examples

Connect every note to the next

ferraus midi legato lead.mid -o smooth.mid

Nearly legato with a 20 ms gap

ferraus midi legato pad.mid --gap 20ms -o pad-legato.mid

Legato on track 1 only, leaving a twentieth of a beat between notes

ferraus midi legato song.mid --gap 0.05b --tracks 1 -o song-legato.mid

Options

FlagTypeDefaultMeaning
--gaptime0msSpace left before the next note (10ms, or 0.05b in beats)
--trackslist—1-based track numbers to change, comma separated (default: every track)

Global options

Every command also accepts the global options (-o, --json, --dry-run, --overwrite, --progress, ...). See Global options.

Exit codes

CodeMeaning
0Success
1Processing failed
2Usage or parameter error
3Input missing or unreadable
8Cancelled
70Internal error (bug)

Common mistakes

  • Forgetting that outputs are never overwritten: pass --overwrite or a new -o path when re-running.
  • Beat-based times (4b, 1/4) need a tempo: pass --bpm or write 4b@120.

For models

  • MCP tool: ferraus_midi_legato
  • Schema: ferraus schema midi legato
  • Pipeline: { op: midi legato, args: { ... } } (flag names with _ instead of -)
  • fx stage: no
{"command": "midi legato", "defaults": {"gap": "0ms"}}