Draw a music staff in C#

There are the required primitives to generate musical output in the Unicode code set (starting at U+1D100). For example, U+1D11A is a 5-line staff, U+1D158 is a closed notehead.

See http://www.unicode.org/charts/PDF/U1D100.pdf

..then the issue becomes making sure that you have a typeface with the appropriate glyphs included (and dealing with the issues of spacing things correctly, etc.)

IF you're looking to generate printed output, you should look at Lilypond, which is an OSS music notation package that uses a text file format to define the musical content and then generates gorgeous output.


You might look at a music editing program written in C# a few years ago. I looks somewhat promising: Music Editing Program


This will be a difficult project. Finale uses a custom font for notes and other symbols. That might be an efficient way to get you started.

You might also check out Niffty. It is open source and written in Java. You could probably translate the important parts over, or borrow concepts.

Edit: This may also be useful: http://www.c-sharpcorner.com/UploadFile/mgold/musicmaker09242005015433AM/musicmaker.aspx