Here is a bunch of scripts for working with MIDI notes. I didn't have the nerve to learn lua and so I just used ChatGPT to generate them. I'm not exactly proud of it, but at least the scripts get the job done. There are currently 22 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 or extend chords/notes, to select specific voices within chords, or to navigate to the next or previous chord. Most of the scripts use a chord window variable which determines how far individual notes can be from one another in order to still be considered one chord. The value is in percentages and relative to the currently chosen grid division. The default value is 50. If you don't like entirely 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. The note extending scripts behave 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.