I am trying to make an OpenGL program that can display music notation. Here’s an example of music notation to refresh your memory (courtesy of google images):
Currently, I have successfully drawn the horizontal lines (staves) using OpenGL and gotten them to antialias. It probably doesn’t sound like a lot, but I am an opengl beginner, and it took me a few hours to get set up.
I now need to add glyphs of various sizes and shapes to draw the actual notation. The glyphs could be the notes themselves (ovals at a slight tilt), or the clefs, or the sharps and flats, or the time signature (4/4). Additionally, I need to use a custom serif font to add in the composer’s name at the top, etc. as well as other italic markings in the score (eg the word “sim.” on the 6th line from the top).
What is the preferred way to do this sort of 2d drawing? I researched truetype fonts and OpenGL online, but it sounds like that might be impossible or very slow. There are many different glyphs used in music notation (a few hundred). Is a font a bad thing to use in an OpenGL program? As an alternative to a bitmap type font, I was considering drawing a complex glyph (like a trebel clef) with polygons. However, I read online that doing too many polygons could be really slow. What is the best method of drawing glyphs and fonts for my particular application?
As a final note, I am looking for a combination of speed and a crisp, high resolution because I will be updating the screen during a live performance, and musical notation has many tiny graphic nuances that are significant to the performer.
Any answers or advice you have are greatly appreciated.