ferraus midi groove extract

Capture a groove from a reference part

Synopsis

ferraus midi groove extract <input> [options] [-o <output>]

What it does

Measures, for every grid position in a bar, the average timing offset (as a fraction of the grid step) and velocity deviation of the reference notes, and writes them as groove JSON for 'midi quantize --groove'.

Examples

Capture a drummer's sixteenth-note feel

ferraus midi groove extract drums.mid -o groove.json

Measure the feel on an eighth-note grid

ferraus midi groove extract ref.mid -o groove.json --grid 1/8

Capture a shuffle feel against an eighth-note triplet grid

ferraus midi groove extract shuffle.mid --grid 1/8T -o shuffle_groove.json

Options

FlagTypeDefaultMeaning
--gridgrid1/16Grid the offsets are measured against (1/16, 1/8, 1/8T)

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.

For models

  • MCP tool: ferraus_midi_groove_extract
  • Schema: ferraus schema midi groove extract
  • Pipeline: { op: midi groove extract, args: { ... } } (flag names with _ instead of -)
  • fx stage: no
{"command": "midi groove extract", "defaults": {"grid": "1/16"}}