Best way to gather musical data
I think you are looking for musical optical character recognition software. A google search pointed me to Wikipedia where links to two open source applications resides: Audiveris and OpenOMR. I can not vouch for either program.