Question

I'm a python hacker looking to build a sheet music app. I'm comfortable with reading/understanding sheet music (played piano for many years). Here are my complete newbie questions..

Is there a standard for representing notes digitally? I don't want to reinvent any wheels.

Given a sequence of notes and durations, is there a library for displaying these in a sheet music format?

Basically I'm looking for a place to get started. I'm not heavily into graphics, so a existing open-source library would be awesome. If none exists in Python, I'm competent at Java/Javascript/C as well.

Thanks

Was it helpful?

Solution

Take a look at lilypond. It uses LaTeX to typeset sheet music. Its input format is simple text, and can be generated pretty easily with Python or whatever.

Abjad is a "Python API for Formalized Score Control" and a wrapper around lilypond, but I haven't used it and so can't vouch for it.

OTHER TIPS

As far as I know, abc notation is still the de facto standard text format in traditional/folk music circles. There is quite a bit of software available for it, including abctool and abc2ly (part of GNU LilyPond), both of which are written in python. Being a self-described python hacker, I imagine you could turn either of these into a library without much trouble.

Is there a standard for representing notes digitally?

I assume you've heard of MIDI (which encompasses far more than simply notes and durations, but which is a standard that represents notes digitally).

I recommend looking at the Music Notation programs listed in the Python in Music Python wiki page and seeing if you can extend or contribute to those applications before rolling your own.

Probably not exactly what you're looking for, but there is a commercial program called capella (from a small German software company; there is an English version, too). It supports the MusicXML format, and it uses Python for scripting, so you can write scripts for extending its functionality (which is already quite impressive, though).

I learned Python because of capella. (Turns out I never did write any scripts for capella - never needed to - but it sure made me curious about Python :))

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top