I'm not an experienced programmer so I'll take a wild guess and you can take it or leave it.
First, I would have an array that holds all the notes.
Second, I would use only the low value and high value to determine the note. Everything equal to or between in a group is that note. So an array of arrays. with the second array containing two values. I would use a FOR loop that uses the index to cycle through the array of notes. with an IF statement that checks for a match for the low value , then the high value using >= and <= and if no match increment the index of the note array and check the high value. If no match then increment the index of the array that holds the note arrays and check the next note array the same way, all the while incrementing the index for the array of note arrays only after failing a match for both the low value and high value.