Here is a bunch of scripts for working with MIDI notes. I generated most of them with ChatGPT, something I'm not extremely proud of, but at least they get the job done. There are currently 26 scripts in total, although the number of unique scripts is actually lower. That's because most of them use configuration variables to alter how they behave and so it's easy to create variations. You can use these scripts to select, shorten or extend chords/notes, to select specific voices within chords, or to navigate to the next or previous chord. Most of the note extending scripts use a chord window variable which determines how far individual notes can be from one another in order to still be considered the same chord. The value is in percentages and relative to the currently chosen grid division. The default value is 50. Note extending works similar to how Reaper's native 'Set note ends to start of next note (legato)' action behaves, except the scripts try to pair notes according to pitch rank. The highest note of chord 1 gets extended until the start of the highest note of chord 2, the second highest note of chord 1 gets extended until the start of the second highest note of chord 2 and so on... You can choose to start pairing notes either from the highest or the lowest note - useful in case chord sizes do not match up. If the target chord has a larger number of voices/notes than the source chord, depending on the pairing order the remaining notes will just be ignored. If you don't entirely like how a given script behaves, take a look at the configuration variables at the top - maybe changing their values will give you the behavior you want.