Thought I'd query if this need had already been coded by someone. Issue: Old paper player piano rolls are scanned and recorded into MIDI files. The recorded "events" are placed onto a somewhat arbitrary MIDI tempo "grid", such that the timing resolution (PPQN Clock?) is sufficient to capture the piano roll performance relatively accurately, but the tempo is not consistent with the "real" time value of quarter notes (BPM 120 default, FF 51 03 tt tt tt = 0x07A120). Thus, when loaded into a sequencer app, beats don't start at the top of measures, and measures start in the middle of phrases, and the whole piece progressively "drifts" into other measures. However, sonically, the file plays fine, you just can't use the sequencer editing tools to manipulate the data using any conventional musical standard (bars, measures, etc.). I've tried making tempo maps using sequencer tools designed to accomodate this need, but I can't manage to get them to work. Resolution? Some of the lower octave piano notes hammer out quarter note beats regularly throughout the composition. Has anyone written a "filter" to "statistically analyze" or extract the apparent tempo timing to more accurately define a Tempo Event (FF 51 03 tt tt tt, in MTrk)? Thanks, Rick