In looking for beat detection, I came across MusicXML which appears to be able to give a better indication of many features of a note, and explicitly specifies beats, note lengths, and even gracenotes.

Implementing the use of MusicXML appears to have many advantages and could make many things easier.