The (typically "groovy", human-played) events to analyze.
The time signature, used to compute the bar length.
Grid resolution: equal grid steps per quarter-note beat. Defaults to a sixteenth-note grid, which is where the timing deviations a template records — swing, push, drag — are audible.
The extracted groove template.
Extract a groove template from a set of note events: for each grid slot, the average timing deviation from the quantized grid and the average velocity of events landing on it. Slots with no velocity-carrying event record
velocity: null(the "unrecorded" sentinel); empty slots default to{ timingOffset: 0, velocity: null }. The time signature is stored on the template so applyGrooveTemplate can verify the meter matches.