Bob,
I think the OP wants to do it programmatically in one pass, not note by note manually.
One may take much longer.
The Data Filter check box during an edit like this can usually work somehow to control data edits, but for this particular purpose I couldn't figure out a quick click path to suggest.

I tried it; I thought I would be able to instinctively do it .. but I couldn't.

Eliminate Overlap does the exact opposite.
Maybe someone can figure out how the Data Filter settings may help. (?)
My gut says any path to joy is in the Data Filter ...


I do not work here, but the benefits are still awesome
Make your sound your own!