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
| Flag | Type | Default | Meaning |
|---|---|---|---|
--grid | grid | 1/16 | Grid 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
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Processing failed |
| 2 | Usage or parameter error |
| 3 | Input missing or unreadable |
| 8 | Cancelled |
| 70 | Internal error (bug) |
Common mistakes
- Forgetting that outputs are never overwritten: pass
--overwriteor a new-opath 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"}}