Thank you for the ideas! -- given the complexity, I probably wouldn't bother someone here with a script request since it sounds like it'd be somewhat specific to my application. But if anyone wants to implement something like what you describe, I'd certainly be grateful. :-)
Re: a FR, I think the non-inclusion of tempo is relatively intentional... see e.g. my recent
thread here, where Schwa implies that it's not logical to include it, and though I know little about this all, it seems logical enough.
I can just do the specification of the bpm on the blender side in the scripts I have going there... it's just less flexible and requires more manual setting of stuff, but fortunately I'll probably be dealing with a single bpm most of the time.
I just thought maybe there was a hook to call the File -> Export Project MIDI via API but it sounds like there is not... ?