Exclude Parallel Notes using Logical Editor


I have a midi recording of a pianist playing a melody with his right hand and some chords with his left hand.

I am trying to use Logical Editor to isolate the melody from the chords, without choosing each note by hand.

I have set up the following simple criteria:
Type Is – Equal – Note -> and
Context Variable – Less or Equal – Highest Pitch -> and
Pitch – Bigger or Equal – C-2 (the lowest note played by the melody)

I am looking to implement one more criterium so that only one note is selected at each time point.

So, if at some point the melody is playing much higher than the lowest allowed note, lets say C-3, the chords may also invade the allowed range. At this point the chords will also be selected.

So how can I tell Logical editor to exclude those notes, and only keep the highest one at any given time-point?