A Smart method to Select the Highest and Lowest Pitches in MIDI

And while we’re at it, maybe we could have a 'select 2nd from bottom", “2nd from top”, “3rd from bottom”, “select notes that are *N octave intervals above the bassline”, “select all 3rds intervals of each chord”, etc…

Once you have an algorithm for finding different chords/group voicing throughout a section of MIDI, then I’m sure there’s all sorts of additional commands that could be made around it.