ofxSoundObjects audio addon


Hey lovely OF community,
I recently made an addon for working with sound

It is based on what we worked at the ´13 YCAM oF devcon with @arturo, @admsyn and marek bareza. It was intended to be part of the oF core but never made it, hopefully it will be part of it in the future.

It is a super simple yet powerful way for working with audio in whichever way you want to. Get audio from any source, file or audio input stream, process it and send to whichever output you desire.
Check the documentation in guithub for a deeper explanation.
With this addon you can integrate a lot of other audio addons, giving you a lot of power.
It works over the existing oF sound implementations so it also wont break any stuff.
It is multiplatform and works on all the oF supported platforms (theoretically, I haven´t tested it in all).
So far there are some basic examples about how to use this in different way and I’ll soon push some others about integration with other addons and sound processing libraries.
Hope you like it and it becomes useful.



Thanks for this addon. I tried some of the provided examples and I would like to integrate this in an existing project. It looks very promising.
The XCode projects worked fine for me. But projects generated by the project generator or the qt wizzard didn’t compile. Also make fails.
How would i get this working?


Hi @thomasgeissl , I haven’t added the correct config files to the addon, that’s why PG doesnt work.
I’m fixing it now.
Check again the github repo in half an hour more.
Thanks for bringing up this issue.


Thanks @roymacdonald for adding the config file.
The files in src/SoundObjects are not found. I get the following error message.

/Users/thomasgeissl/programming/of/openFrameworks/addons/ofxSoundObjects/example-soundPlayerObject/src/ofApp.h:5:10: fatal error: 'waveformDraw.h' file not found
#include "waveformDraw.h"

Should not they be added automatically to the header search paths?


I just reported some issues in the repo. I will look at them later.



Looks really awsome and exactly what I might need in a current project, but compile failed:

addons\ofxSoundObjects\libs\libaudiodecoder\include\audiodecodercoreaudio.h(51): fatal error C1083: Cannot open include file: 'AudioToolbox/AudioToolbox.h': No such file or directory

PS: I included the addon to an existing project through the openframeworks plugin in visual studio

Any suggestions, what may be wrong ?


Windows 7
OF 9.3 Visual Studio


Hi, just remove that file
it is an osx implementation file.
you’ll also need to remove
that should be all.
I think that the addon_config.mk file is not working correctly. :confused:



Very excited about having an addon where it is easy to load sound and direct it to a specified output device. I’m going to integrate it into a few projects in the next couple weeks. THANK YOU!! :smile:


Thanks for the reply.

I removed these files from the project, but now I get a bunch of unresolved external symbol errors:

(error LNK2019 & error LNK2001)


I looked for a solution and they say, that I have to add the .lib files to Linker -> Input -> Additional Dependencies

Tried to clean and rebuild, but not working.

Then I looked inside the addon_config.mk file and the line:

ADDON_LDFLAGS += -lMfreadwrite.lib -lMFPlat.lib -lmfuuid.lib

When I added these manually inside Linker -> Input -> Additional Dependencies



then it finally compiled.



I tried the soundPlayerObject example and it returned an error while loading a sound file:

SSMF: failed to get buffer sizeSSMF: Duration: 200.568
Assertion failed: size(sizeof(m_destBufferShort), file ..\libs\libaudiodecoder\src\audiodecodermediafoundation.cpp, line 221


Hi Jaan,
the problem is with libaudiodecoder.
this might help:

If you remove the complete libaudiodecoder from project and then you import the ofxAudioDecoder addon it might work.

Sorry I cant be of more help but I’m really busy.



I have the same link errors. But I think I didn’t undersatnd well how you solved them.

I tried to copy paste those names in Linker -> Input -> Additional Dependencies. I can now build the solution but when I run the project, it says that Mfreadwrite.DLL, MFPlat.DLL and mfuuid.DLL are missing.
What does it mean ? I don’t have Media Foundation installed or something like that ?

Thanks a lot,

I’m on Windows 10 with oF 0.9.3 on Visual Studio 2015



I added them like this:


Hi, can you make a pull request with this modifications to the VS project? I don´t use VS.


Hello, can anybody help with using ofxSoundObjects to load multiple wav files at once.
I’m getting a segfault:

(gdb) backtrace
#0  0x00007ffff49e7f41 in free () at /usr/lib/libc.so.6
#1  0x00005555556dd67a in ofxAudioFile::ofxAudioFile(ofxAudioFile const&) ()
#2  0x0000555555604936 in ofxSoundPlayerObject::ofxSoundPlayerObject(ofxSoundPlayerObject const&) ()
#3  0x00005555555fffc7 in ofApp::setup() ()
#4  0x000055555575f8f3 in std::_Function_handler<bool (void const*, ofEventArgs&), std::shared_ptr<of::priv::Function<ofEventArgs, std::recursive_mutex> > ofEvent<ofEventArgs, std::recursive_mutex>::make_function<ofBaseApp>(ofBaseApp*, void (ofBaseApp::*)(ofEventArgs&), int)::{lambda(void const*, ofEventArgs&)#1}>::_M_invoke(std::_Any_data const&, void const*&&, ofEventArgs&) ()
#5  0x0000555555770a8d in ofCoreEvents::notifySetup() ()
#6  0x000055555575f846 in ofMainLoop::run(std::shared_ptr<ofBaseApp>&&) ()
#7  0x0000555555759224 in ofRunApp(ofBaseApp*) ()
#8  0x00005555555d6023 in main ()

my code looks like this:

 for (int i = 0; i < 9; i++){
        std::string j = to_string(i+1);

        // load sample data


I am trying to replace ofSoundPlayer with soundobjects.


first try and load fewer sounds. does it work?
I am really busy right now. I can help in a few more days. sorry.


No problems, once I started to get the segfault, even after removing the load wave file part it, would still crash. I’ll try again tomorrow, with a new project and experiment.
The main thing, I’m looking for is to load and play multiple wavs and add some basic effects.
I’ll update here tomorrow with some new findings.


I tried to load one sound from the example - and managed to get it to work…however when I try to load multiple sounds I get segfault - I think this is something to do with ofxAudioFile addon. Did you have another version which doesn’t use that? Or could you please suggest how to go about setting this up properly?



Hi @Jason_Jellyfish
sorry for the belated reply. I was super extra busy.
I just switched to use ofxAudioFile, before I was using a combination of libaudiodecoder and other stuff more, but it was a bit of a hassle to get it working correctly on all platforms. I just checked and there are some problems in the implementation, although I never got a SEGFAULT. Can you try the mixer example? You’ll need to change ofxBasicSoundPlayer for ofxSoundPlayerObject. I will update this soon.