Music notation approaches
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.
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.
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.
Quote:Original post by Idan BacharThis part is fairly easy, if irritating.
so all u basically need to do is read it
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement