Determining the note name is more robust, works now when chord names are used or other text above the staff