sort notes before mapping (resolves issue in firefox with stavenote accidentals).