[.net] [WinForms] Rendering musical score... [ANYBODY?]

Started by
5 comments, last by ernow 14 years, 5 months ago
For a project I need to create a program that will allow the user to work on a musical score using WinForms and C++/CLI. First of all a screenshot of a similar program: In more detail, I'm looking to create a control that can display staffs, notes and everything else. A clef, some free text around that, chord names, pauses etc. Now, I have a history in game programming so my first intuition was using sprites. I did that and it kinda works but it doesn't seem optimal. When I look at other software I find they all went for rendering with a special ttf-font somehow. For zooming purposes using vector art would seem like a good idea but I haven't worked before. In conclusion, what do you guys think is the easiest and most elegant way to render these elements within WinForms using C++/CLI? Hope this is the right forum and thanks ahead of time, as always! [Edited by - d h k on October 30, 2009 7:16:49 AM]
Advertisement
Bumping this one single time as there hasn't been any reaction in four days now.

If anybody has any experience doing anything similar, please do reply? Any feedback is well appreciated.

Or is my post not specific or detailed enough and that's why noone's replying? If so, please let me know.

Thanks!
I wouldn't think that rendering speed would be a huge deal here... it's likely to be pretty quick whichever method you choose. Considering that, I would just use GDI+ for notes, staff, text, (ie everything) wrapped in some specific drawing functionality. Of the 3 choices mentioned, it will give you the greatest flexibility, and will almost certainly be easier to implement as well as give you zooming... and optional antialiasing... it may possibly be faster than the other 2 methods anyway (we can discuss why if that doesn't make sense to you)

Just remember the normal stuff... only draw what you can see on the screen at a given time, keep rendering methods and data representation in separate classes so if one has to have a major change it hopefully won't completely destroy the other, etc. etc.
What they typically do is use fonts that have notation and some of the parts of notes in them (like JUST a stem), from what I've seen.

Why, I don't know, but that *does* seem to be fairly common.
Got to think about this some more on the (short) drive home. The reason to use fonts is because you'll get better caching of the shapes, and Windows will also do some optimizing for the screen. This way, you have fonts in high enough detail that you can print and they'll be good, but you're not looking at every single curve that might fit in a 2x2 pixel portion of your screen.

Use a standard font for your lyrics, fingering, tab. I don't think it'll matter much how you render the staff lines. Everything else, you're going to get more professional results using a music font, because while "mf" in bold italics will look close, anyone who reads music knows what that "mf" is supposed to look like, and if it doesn't match, we'll notice. We might not *care*, but we'll notice that it's a little off.

... like Adobe's Sonata font.
Have you considered using WPF?

This topic is closed to new replies.

Advertisement