Graphics for C++ cross-platform music making software [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
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:
I've found Cinder. You think Cinder is sutiable for the task? If no, you might skip 2 and 3.
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?
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.
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?

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:
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.
Most computers these days do support openGL. Again you don't really need openGL for what you want to do.
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.
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...

Related

C++ cross-platform framework for mobile app development [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Improve this question
I'm planning on developing mobile application for both iOS and Android and I want to use C++ for the development.
Which cross-platform framework is available for building mobile application using the C++ language.
I'm sure a lot of people have this question as well, so read this if you'd really like to know the answer. Marmalade is probably the BEST solution. Code once, deploy to mobile devices, desktops, even some TV's. Many popular games have been created with Marmalade.
Extensive games like:
Lara Croft and the Guardian of Light
Call of Duty: World at War Zombies
But also simple games like:
draw something.
Doodle Jump
They've added a free package. You can create your game for free and if you want to get rid of the ad splash screen, it's $150,- per year for mobile devices or $500,- per year for other devices as well.
A big advantage is the native speed. It doesn't matter what people claim about other languages like javascript or java (and unfortunately Qt, which of course isn't a language but you know what I mean) running as fast as C or C++. It's simply not true. For simple applications this is of course not important, but when you're looking at (simple) games, this is crucial.
At the moment version 7.3 is available, but this version has a problem with the ARM emulator. I would download 7.0.
Whether you choose Marmalade or not, make sure you read the documentation. You don't want to end up missing some functionality and switch to another option when you're almost finished.
I've looked into portable code between Android and iOS before and I don't think it's possible.
To release apps into the Android market it needs to be in Java, and anything with a GUI on iOS needs to use Objective-C.
You might be able to have partial portable C++ layer, but in reality it's probably quicker to write the same app twice in Java and Obj-C than it would be to write it once in C++ as a portable solution.
Qt or Wx-Widgets might have some support, but I have not looked into mobile platforms for these, and I suspect the reality is that Apple, Microsoft and Oracle want you to be tied into their technologies these days and have no incentive to make things portable.
C# and Java provide a complete framework that allows code to be written much quicker using well documented classes and libraries, especially when dealing with user interfaces.
C++ on the other hand relies on many open source projects that take a lot of effort to get functioning on multiple platforms, and much time is spent dealing with subtle platform problems.
My suggestion was simply that it might be easier to pick a language better suited to the platform you are dealing with, as C++ tends to be lower level than other languages, the syntax can seem verbose and many hours can be wasted trying to make things work that you would expect to just work, and unfortunately documentation for many open source projects is poor.
Maybe this can be considered to be an opinion, but then the shift from C++ to C# or Java commercially might also indicate that I'm not the only one believing this.
You can take a look on openFrameworks, maybe it fits on your needs:
http://openframeworks.cc/about/
There ARE solutions for C++ cross-platform development for Android and iPhone, despite what other answers say here.
The best is probably Marmalade, but it's expensive, so only useful for commercially viable apps: https://www.madewithmarmalade.com/
Then there's MoSync, which you can use for free. Unfortunately they went bankrupt last year, so there's no ongoing support. Still, might be worth a look depending on your needs. http://www.mosync.com
OpenFrameworks is one I hadn't seen, so thanks Rodrigo for that answer: http://openframeworks.cc/
There is no cross platform solution using C++, unless you're interested in making games. There are a few options available if you don't mind using another programming language. Take a look at Titanium SDK (Javascript), Xamarin (C#) or the multitude of HTML5/CSS/Javascript frameworks (Phonegap comes to mind).
Look for the DragonFire SDK it allows you to write apps and games in c/c++. Not cross-platform and never used it but looks good. It uses Visual Studio and has its own simulator for iOS development.

Where to start and what to choose for a simple gui project in c++? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I know this question has been answeared before, since i rad most of the answears already, but they didn't fully address what i was looking for, also i'm trying to get a heads up really really case-specific, since i need to develop an app really fast and i have almost no G.U.I. experience, so here is my problem:
I need to develop an application wich allows the input of some text fields (actually a database support-like would be awesome) and i need to store the inputs (like in a database, a .txt file could be good too if it would fasten up the developing)
once the input are fully stored (some text field must be unique) i need to pull some data from the database.
the final intention is to code a simple "random winner extractor" by simplying assigning a list of "number" to each entry and then calling the rnd function i will check who is the winner.
in addition to this i would love to be able to add a little animation to the whole gui (a gif would be enough)
Coming from vb6 Gui developing (that's the only G.U.I. developing experience i have so far) i searched from some good "drag and drop visual gui framework" and i bumped up into QT and into the .net Framework for visual c++ 2010, and i must admit i like them both, but i have no idea where can i get the Heads up to start coding in them... for example i have no idea how to change a text field value, or how to call the equivalent of "onChange" javascript handler for any of the forms (in neither the Qt or .net framework)
since i'm a little rusty with actual Event handlers and api codes,here are my 2 questions:
1.Between .NET and QT, for the sole realization of this single application, wich will be run in a windows computer, based on the "simplicity to learn and develop" wich should i choose?
2.Given the answear for point 1, where could i get some reference or material on how to easly understand the basics? (all the tutorial i found or tried so far gives me only case specific knowledge, but they won't cover overall function i need to know, like how to display a message box, or how to interact with the object values, or how to write down the values into a file...)
C++ is more difficult than C#. But it is more flexibel. C++ is an independent standard. C# on the other hand is safer to use.
Qt is cross platform. It can be used almost everywhere (except web applications) easily. .NET is for Microsoft and Windows only but common on that platform.
Qt is easy to learn and it is powerful. .NET is also powerful but I experienced .NET being harder to learn than Qt.
Qt is open source while .NET is closed source.
Pick the points that are important for you. I think the main question you should consider is: Do you intend to create a cross-platform application (today or in future)?
PS: Normally you should not ask such questions here since they tend to start endless discussions. The above is my personal opinion and hopefully it will be taken as subjective without the need of commenting it.
"Simplicity to learn and develop" is kinda subjective if you think about it and can rely on what you feel more comfortable with I think. I don't know much about .NET but you said you have a background in VB so maybe .NET might be the best approach for GUI development for you. If you know your way around C++ better, QT is surely the way to go, it's fast and powerful. I can't give you any reference material for .NET but you should definitely start with the qt documentation provided online. If you prefer to learn from video tutorials you can check out the Void Realms Qt youtube tutorials. The videos target Qt 4.7 if my memory serves me correctly but alot of the stuff he teaches are still more or less applicable with the newer versions of Qt. And finally, if you look in the examples section of Qt Creator (or online as well), they are some examples that are tutorial style and they can teach you some core concepts of Qt like the signals and slots system for one.
"simplicity to learn and develop" is what .NET is for, especially for database apps. But to get that simplicity use VB.NET or C#, not C++.

Open source libraries for sound effects in games [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
does aybody know about an open source sound library in C++ or some other popular language that can be used in open source games for recreating sounds and especifically in car racing games to recreate engine sound?
Thanks
A long time ago, there was OpenAL and was moderately successful on Linux.
It's fairly easy, modelled around the OpenGL library principles.
While you got a few answers regarding how to output sound I believe that wasn't your question.
If I got your question correctly I think "Sound Synthesis" is what you are looking for.
All you need is a bunch of generators (e.g. Sine, Sawtooth, Noise)
and filters (low,high,band); And combine these.
Next step would be adding LFOs (Low-Frequency-Oscillators) to modulate parameters of the generators and filters.
I'm aware that this is not the full answer you looked for, but sound synthesis is a science in itself and the above keywords should get you started on the right track.
As for realtime synthesis of SFX for games. Simple answer:
Don't do it!
It's a waste of resources and - unless you have very strict size limits - the size of the samples used for SFX won't kill you.
For our current game the average sample has a(n on disk) size of around 7KB.
(We use 16KHz, mono, ADPCM wavs most of the time.)
I've only trivially poked around with it, but SDL is a very popular, cross-platform, C++ game dev library. It includes support for graphics, sound, input.
I also recall that it's very modular. That is, it's less of a framework and more of a library than some other solutions. Give it a look.
Is there a specific reason you need open source, or is "source available" good enough? A popular one is fmod http://www.fmod.org
It is free for non-commercial products, and also offers sourcecode under a license. It is very popular and isused in many well known games.
The irrKlang sound engine is very popular amoung independent developers. It is free for non-commercial use and still very cheap, if you want to start earning some money with your game.
It supports all major plattforms (Windows, Linux, Mac) and has APIs for C++ and .Net languages.
I know it's an old question, but I think SFML needs to be represented here. SFML is available in C++, C, .Net (C#, VB.Net, C++/CLI, etc), Python, D, and Ruby, and is designed to be small and fast.
Features specific to audio:
Uses hardware acceleration whenever possible
Can load and save standard sound formats : ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64
Can load all audio resources directly from files in memory
3D sound spacialization
Easy interface for capturing audio
Manages memory efficiently, so that you don't have to worry about resources lifetime or storage
Supports streaming for big files ; you can even write your custom streaming class for any source (network, ...)
Supports multi-channels formats (mono, stereo, 4.0, 5.1, 6.1, 7.1)
For the specific question of recreating engine sounds, usually games take a single looping sound and adjust the pitch. An open source game that does this very well is VDrift.
SDL is Good Option for Graphics/Sound
QT frame work has also good support for sound and graphics
PortAudio is also good option

minimal cross-platform gui lib? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a minimal and easy to learn C or C++ cross platform gui library.
In a nutshell I only need the following functionality:
application window
menu bar
some simple dialogs, File-open and save. Maybe a user-written one.
user canvas where I can draw lines an circles on.
some kind of message/event loop mechanism.
Target platforms would be Win32 and linux. MacOS would be nice to have but is not important at the moment.
Why am I looking for something minimal? I don't want to spend much time to learn a big and full blown abstraction system for a really small application. The easier and leaner, the better.
Any suggestions?
If you need something small, try FLTK libs: I used them at work (embedded development) and I think it's a valid option. Maybe apps are not as "cool" as QT-based ones, but developing with FLTK libs is fast and easy.
I don't know about minimal, but Qt is pretty easy to learn.
Its light-weight enough to run on embedded devices, so you be the judge.
EDIT after seeing the comments:
Yes, Qt is a fullblown application framework, but here's my case: an app with cross platform GUI but other platform-dependent code is not really platform independent. I don't think moving existing C++ code into Qt entails any work at all. If anything, this would allow Nils to use his existing C++ code, and only use Qt for a GUI. But of course, I assume that the existing C++ code is portable.
wxWidgets (formerly wxWindows) is a widget toolkit for creating graphical user interfaces (GUIs) for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with minimal or no code changes. It covers systems such as Microsoft Windows, Mac OS X, Linux/Unix (X11, Motif, and GTK+), OpenVMS, OS/2 and AmigaOS. A version for embedded systems is under development.
http://www.wxwidgets.org/
See Good C++ GUI library for Windows for relevant answers.
Personally, I would go with Qt, now that it's open. You don't necessarily want a minimal library, you want one that is easy to use, and quality documentation and community support will give you just that.
Small projects have the nasty habit of sticking around and picking up scope -- as things get hairier, you don't want to be stuck with some small library that nobody knows about.

Gui toolkits, which should I use? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am writing a fairly large and complex data analysis program and I have reached the point where I think it is about time to build a GUI for the program. So my question is:
Which GUI toolkit should I use?
I am completely new to coding and building GUIs and would appreciate any guidance that can be offered. It doesn't have to be the simplest tool kit in the world, I learn rather fast. However, it does need to be able to do the following things (some if not all of these are probably incredibly basic for any given toolkit but I thought that it would be good to throw all this out there just in case).
It has to allow me to draw directly to the screen so that I can put graphs (spectra really), plots and things like them up for the user to see. I need to be able to collect position information on where they clicked on aforementioned spectra. I need to be able to display text and take text input from the user. It needs to be able to generate menus (you know File, Edit, etc). If it were to have some built in widget for generating tables that would be handy (though I can surmount a lack of that if I can draw directly to the screen). It needs to be able to pop up warnings, dialogue boxes, save and open boxes, etc. That is pretty much it, most of these seem pretty basic when I write them out but I don't want to get the GUI partly coded and then realize that I I need to rewrite it with a different toolkit.
It should be noted that I have written this program in C++ and that I don't want to have to write the GUI part in C or something else so the toolkit needs to support C++.
Additionally a cross platform toolkit would be preferable over a single platform toolkit. However if it must be a single platform toolkit then I would prefer it be for Linux.
Finally, I would DRAMATICALLY prefer an open source toolkit to a closed source toolkit.
Beyond that I cannot think of anything to add. Thank you in advance for your time and answers.
Hmmm based on the answers I shall look at both Qt and wxWidgets and see which appeals to me more. I with I could accept multiple answers as accepted but I can't, and since I am looking at two things it would be unfair to only accept one of the answers, perhaps in a week or two then I have looked at the toolkits and figured out which I want to use.
For C++, in my opinion, Qt is the least frustrating and most fully featured toolkit. Its also fully cross platform. Note that Qt will be LGPL licensed some time in March 2009, when version 4.5 becomes available. Currently, its only offered in a GPL and commercial license version.
Qt's GUI designer is good. It has lots of utility functions (scene graph library, translation support, built-in Javascript engine, built-in WebKit library). Via the MOC (a special pre-compiler) it also brings a few run-time binding capabilities and introspection to C++.
For your technical application, you might find that Qwt (http://qwt.sourceforge.net/) provides what you need. It is built upon Qt.
Qt can even be used "headless" if you want its utility support (such as networking, etc) without a GUI.
The other cross platform C++ option is wxWidgets, which is usable but not really comparable to Qt. Its a much lower level toolkit, and isn't as easy to use or fully rounded. Gtkmm is another option, in the spirit of GTK+.
Try WxWidgets. Cross platform (compile on Linux, Mac OS X, and Windows) and widely accepted.
http://www.wxwidgets.org/
Open Source too!
I see nobody commented on GTKmm. It is the C++ incarnation of GTK+, and it is a real pleasure to use. I have also used Qt, but I don't like the messy signal/connect code, the moc_XXX generated files, etc. GTKmm has signals and such, but not that preprocessing step, as well as almost all of the Qt toolkit can offer in the graphics arena.
I'd say it depends on whether or not you want the native Look and Feel of the OSes you're targeting for your application. Qt, like said earlier, is probably the easiest of the cross platform toolkits to use, however it is its own widget set. You don't get a native app look & feel unless you happen to be running on KDE.
I use wxWidgets at work. It can be frustrating at times and in some places not very polished, but it does give the native look and feel for the platforms you're targeting. It actually wraps the native UI controls to give them a common API on all platforms that wxWidgets is ported to.
I had the same question and searched for good GUI toolkits.
At the end I found out, that a GUI toolkit isn't enough - I need a complete platform independent solution providing me the build environment, IDE integration and lower level functions like network sockets and file I/O.
My result? Since nearly 9 years I use Qt (but the first years only for GUI stuff) - now I have highly complex networking apps with load balancing, massive multithreading and image processing.
You can use Qt as commercial user with professional support (like me) or just start your own projects under GPL and with 4.5 with LGPL (which allows commercial use).
The other alternatives like wxWidgets and GTK++ are very good choices for GUI programming.
But if you want a well documented and complete solution, then Qt is your choice.
Best Regards,
3DH
I'd also recommend wxWidgets together with DialogBlocks, which is a really nice visual GUI builder.
I will say that wxWidgets has a few rough edges, but the development community is very active and extremely responsive to bug reports / questions / contributions.
I use wxWidgets(toolkit) + wxFormBuilder(gui-designer) + eclipse(ide).
All tools are cross-platform and free.
Qt. Also you can use KDE which is built on top of Qt.