Mode C: a recording instead of a file. The tempo is an argument rather than something read off the signal, because timing is meaningless without it.
Mode A: align two performances of the same material - one played straight, one played - and keep how far each played note sat from its quantized counterpart.
Mode B: one performance and no reference. The notes themselves are projected onto the nearest grid slot, so what comes back is the residual of a played file against its own implied grid - the deviations a straight quantization would remove.
Extracts a groove template from a pair of performances of the same material.
Every note-on in
recordedMidiis matched to the closest still-unused note-on of the same channel and pitch inquantizedMidi. A match is only taken when it falls inside half a slot, so a recorded part with notes the quantized one never plays is ignored instead of being forced onto a neighbour, and a slot the pair never reaches keeps the neutral offset rather than a value invented from no evidence at all.Example