Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Audio/MIDI C++ library for a real-time application

As I've already said in another thread, I'm working on a project related to real-time graphical programming for audio (something like Pure Data, Max/MSP, Reaktor).

I did a day of research on Internet, looking for a good (maintained, well documented and highly portable) C++ library for low level interaction with audio and MIDI, but I still can not make up my mind about a library.

I'm considering PortAudio+PortMIDI (PortMedia), but they lack of documentation (especially PortMIDI) and there is no official community, just a mail list (and I think forum communities are very important!), same (or worst) situation with RTAudio and RTMidi libraries.

I also give a try to:

  • STK, I dodn't like its file organization.
  • Juce, I think it does too much for me, I need only an easy hardware integration
  • OpenAL, I didn't understand its architecture, it relies on ASIO/ALSA/CoreAudio...? Can I access to MIDI port?

So... My question is: have you any experience with real-time audio/MIDI? Which library do you recommend me?

Thanks

like image 336
Kill KRT Avatar asked Apr 10 '11 14:04

Kill KRT


2 Answers

I've used both PortAudio/PortMidi and Juce with great results on both. I'm in the process of switching a project over from PortMidi to Juce, because for my uses all that other app framework stuff ends up being incredibly useful (and in my experience, it's rock solid.). YMMV.

like image 166
bgporter Avatar answered Sep 28 '22 17:09

bgporter


I've created a C++ audio library named "Crosstalk".

Crosstalk is a real-time C++ audio engine that allows you to create and route audio systems in real-time (Pretty much what your trying to achieve graphically), and it's really easy to use.

Here's an example of how to play an mp3 file:

XtSystem system;
XtMp3Decoder mp3Decoder;
XtAudioDevice audioDevice;

long md = system.addComponent(&mp3Decoder);
long ad = system.addComponent(&audioDevice);

system.connOutToIn(md,0,ad,0);
system.connOutToIn(md,1,ad,1);

mp3Decoder.loadFile("../05 Tchaikovski-Swan Lake-Scene.mp3");
mp3Decoder.play();

You can check out the API documentation and licensing details here: http://www.adaptaudio.com/Crosstalk

EDIT (01-12-2012):

Crosstalk has been replaced by an open-source project called "DSPatch". DSPatch is essentially an upgraded version of the routing engine behind Crosstalk that is no longer limited to only audio processing. DSPatch allows you to create and route almost any type of process chain imaginable, and free for personal AND proprietary use :)

like image 45
Adapt Audio Avatar answered Sep 28 '22 17:09

Adapt Audio