Select Similiar Midi Events

Hi, so here’s what I’m trying to do (but haven’t figured it out after a couple hours of work).

I want to click on a midi note and then press a key command (probably a macro) and have all rhythmically similar notes be selected.

So Let’s say I select a note on beat 2.2.3 which is the “and of beat two in bar 2”. I want to press a button and have the “and of beat three” and the “and of beat four” etc be selected. Same for 16th notes and downbeats. Then eventually triplets. I’ve been trying to figure this out for hours, I’m hoping someone can help!