-5

EDITED, see below

I need an library to display graphics of music notation on a music making software. It will be Sibelius-like: Basically the user creates the sheet music and the app sends midi output.

I'm not looking for an library to display music notation, as for various reasons i must implement it myself. Also, the library i'm looking for must be cross-platform (should run at least on Windows and Linux).

The graphics will be vector-based or drawn with functions like "line(point1, point2);"

(Before continuing let me state that i'm new to C++ and most of my experience is with interpreted languages - PureData and Processing, mostly)

Now to the question:

  1. I've found Cinder. You think Cinder is sutiable for the task? If no, you might skip 2 and 3.
  2. I don't have experience with OpenGL. I couldn't actually figure out if Cinder uses OpenGL exclusively or if it uses it only on demand. My doubt here is, when using OpenGL libraries my application will only be able to run on computers with dedicated graphics cards?
  3. Cinder doesn't have the hability to create GUIs like Qt or GTK+. Is it possible to integrade Cinder in another window, created by Qt/GTK+/SDL/etc ? I want something like Sibelius, where you have normal GUI (buttons, menus, etc) integrated in the notation graphics window.
  4. If Cinder is not a good option, what might you recommend for that specific application needs? OpenCV? SDL? SFML?

EDIT:

I see this was marked as off-topic. Sorry, i'm new here. I've seen some posts asking for this kind of recomendation so i thought it was okay. Well, i will try to be objective and straight-forward

Question:

I need to draw music notation graphics, but i don't want to deal with low-level stuff (like Cinder, SDL, SFML, Ati-Grain). So, what are the other technologies available? That is, what are the other options?

Community
  • 1
  • 1
Henri Augusto
  • 309
  • 3
  • 14
  • OpenGL can run on integrated graphics cards easily (come on now, they're more powerful than dedicated ones from 15 years ago). Theoretically it can also run on the CPU, but no operating systems bother with that now that every computer has a GPU. – user253751 Feb 12 '16 at 01:00

1 Answers1

0

What you are describing is a LOT of work and something impossible for someone with limited programming experience such as yourself. C++ is neither an easy language nor a language that forgives.. it's not just about learning the syntax (as is the case with processing or similar languages with automatic garbage collection) - it's also about managing memory and other resources, invariants, etc - leaving aside the complexities of linkage, compilation, etc: in turn this prerequisites that you have a thorough understanding of how computers work at a lower level.

Anyway, I'll try to answer your questions:

  1. You could do this with cinder - this would probably mean having to re-invent the wheel - but you can do. I wouldn't say, however, that cinder is really suitable for such a task. This is meant for accelerated 2D/3D computer graphics. What you want is some more generic GUI library (maybe QT?). Regarding midi-support, you'll probably have to rely on some other library for this anyway.

  2. Most computers these days do support openGL. Again you don't really need openGL for what you want to do.

  3. Yes you can do this in theory - but it won't be easy and it's not really necessary for what you want to do.

  4. OpenCV definitely NOT. This is for image processing - i.e. raster graphics - you need vector graphics. Let aside that OpenCV's Highgui is really slow on certain things so you'd have to use some other library for rendering anyway. I have no experience with the other libraries. My suggestion would be to either use some interpreted language such as python, luaAV or maybe SuperCollider (which does have built-in midi support by the way) which is far easier than C++, or to search for some open-source music-notation alternative (if there any) -> you can always build something of your own upon an existent code-base - reinventing the wheel is not necessary...

Marinos K
  • 1,779
  • 16
  • 39
  • I know i'm kind o crazy to try this. But it will be a side project i will work without time restrictions. I'm very patient. I've imagined OpenGL was overkill. If i could have something as simple as "processing" i could just handle the input and save the music information in a smart way. Then timing the midi output would be ne next step. Not easy, but i think i can do it. I've heard about SuperCollider, but since it's a interpreted language, it is possible to incorporate it in an c++ app? I don't know if it would be possible to make the graphical stuff in SC. – Henri Augusto Feb 12 '16 at 03:06
  • Why you want it to be a C++ app? If you can do it in processing then why not doing so? If you are indeed very patient and you do want to make it in C++, nevertheless, you need to first learn the language and its idiosyncrasies - first read a couple of good books about **modern** C++, the standard library, good coding practice/techniques, etc and then try to get your hands dirty. Bare also in mind that C++ is **NOT** cross-platform.. you can make something cross-platform with it depending on the libraries you use but you'll also need something such as cmake to allow cross-platform compilation. – Marinos K Feb 12 '16 at 08:12
  • Actually, i thought about c++ because i've read it is cross-platform haha i'm confused now. Let's say i only use cross-platform libraries. The app would be cross-platform, right? – Henri Augusto Feb 12 '16 at 14:00
  • (sorry for double comment. pressed enter without shift accidentally) I'm using learncpp.com for now. I'm familiar with O.O and how computers store information in binary, etc. That might not be much, but i can already make simple console apps. I really wanted to create a full-fledged composition tool, so i don't feel like using an interpreted language like processing. I know it's a many years long project, but i won't have any time constraints and i will try to learn as much as i can. I will probably make a lot of prototypes while learning, before going for the real app. – Henri Augusto Feb 12 '16 at 14:09
  • The short answer is yes, if you make sure that your program does properly compile and link in all the platforms you are interested in.. This almost certainly means different compile settings per platform (e.g at the very least the paths of the dynamically-linked libraries and the various headers) and possibly different compile and runtime dependencies. There are whole books dedicated to the subject.. C++ is a beast! It has nothing to do with Processing, PureData and the rest languages you've mentioned.. It's designed for performance and stability, not for ease of use or portability – Marinos K Feb 12 '16 at 14:20
  • Go on, but it might take you months if not years :) I'd suggest that you start with a good book about modern C++ (that is C++11 or C++14) and then try to familiarise yourself with techniques, common practice and the STL. Try this list http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list Once you're done with one of the primers you should also read something dedicated to the STL and ALL of Scot Meyer's and Herb Sutter's books :) good luck! – Marinos K Feb 12 '16 at 14:25
  • Well, then i think it will be at least worth a try! I've found Cairo. Also i've seen that the GTK+ project uses cairo for all rendering. And it allows [Custom drawing](https://developer.gnome.org/gtk3/stable/ch01s05.html). Yet i see [sometimes](https://www.backblaze.com/blog/10-rules-for-how-to-write-cross-platform-code/) people saying to use a different GUI for each platform (#2). But it wouldn't be necessary in my case, or would it? – Henri Augusto Feb 12 '16 at 14:33
  • the last thing you should worry about now is which library to use... you first have to learn C++, model the application, implement the core design, etc. it doesn't matter that much which library you will use once you're there. And there can be no answer to questions such as whether you should use a different GUI for each platform or not.. it really depends.. if you are a big company you do want your apps to have 'native' feel and this is os-dependent. If you're working in closed research projects you are only interested in very particular architectures. etc etc etc – Marinos K Feb 12 '16 at 15:08
  • I didn't even knew there was those book lists on SO. I can't get those because i'm not in the US, but i will look for similar stuff. I'm currently writing the structure of it. Mainly how the music information will be stored. (Bar, note, staff classes etc) and how the score will be interpreted from that information. I know i should be finish my c++ tutorials before asking those questions haha i just like to know and plan ahead. Plus i wanted to create other smaller apps with those libraries, just to have prior experience when creating the composition software. But i get your point, you're right – Henri Augusto Feb 12 '16 at 15:23