Jump to content
  • Advertisement
Sign in to follow this  
vinb

Music notation approaches

This topic is 4704 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to translate MIDI data into music notation. I know there are very good software packages that already do this. I was just wondering what their basic approach is. I was thinking it would be something like creating a music notation font which would include staff lines and notes and other symbols, then use a graphics api to display it based on MIDI data. I also have read about a new XML format for music. Any insights would be greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
hi.

midi is allready stored in a pitch/octave format.
so all u basically need to do is read it
and draw using fonts or gdi or whatever.

Share this post


Link to post
Share on other sites
Quote:
Original post by Idan Bachar
so all u basically need to do is read it
This part is fairly easy, if irritating.
Quote:
and draw using fonts or gdi or whatever.
This is fairly easy to do for a single voice on a single staff, and surprisingly difficult in the general case. Apart from recoding the MIDI (which is a series of timed events) into rhythmic notation, even drawing a general music score turns out to be a royal PITA. I've been working on it for the last day or two myself, and it is not easy.

Why is it so bad? First of all, consider the various music fonts out there. They're doable for a single staff, although I haven't actually tried to use them from code. Throw in multiple staves, proper key signature recognition, time signature and correctly placed bar lines, etc. and the problem becomes rather more complex. The spacing information in the font becomes mostly useless, and in the case of many fonts completely useless because those values have been set to 0 to make editing in a text editor possible. Only glyph boundaries are at all relevant. Next you need to deal with note assembly. Depending on how you deal with things, a note head, stem, and flag may need to be manually composited on, and you'll need the font to have baseline info in order to do that properly. And it's a good guess that you'll need to draw note bars procedurally (never mind the fact that you'll need to figure out where to put them in the first place). You're completely on your own for horizontal spacing -- and don't forget that all your staves have to be vertically lined up by time! And good freaking luck making all of that scale properly across different font sizes.

Just a small taste of the frustrations I've had over the past 3 days or so that I've been trying to do this for my own app.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!