hello,
i was trying to use ofSoundPlayer to load a .wav audio file that has 36 channels (5th order ambisonics), which returns:
[ error ] ofFmodSoundPlayer: loadSound(): could not load
i was able to load a 25 channels audio file (4th order). my question is whether there is a limit on maximum number of channels for ofSoundPlayer? thanks!
hello! the actual “sound player” used by OF depends on a variety of factors, most importantly your platform.
what is your OS platform? (and version of OF?). and what sound card are you using to output the 36 channels?
also, the soundplayer is meant as as simple sound playing tool and might not cut it for 36 channel files. for more complex usage see GitHub - roymacdonald/ofxSoundObjects: Simple yet super powerful modular sound architecture for openFrameworks. and check how it reacts to your file (but there might also be issues with ofSoundStream in managing all these channels.)
1 Like
@wyang03 am I correct in understanding that the output of the ambisonics is still stereo, but the source is 36 channels? if so what you need to do is play the large multichannel file and compute the output based on the listener position and then pass the audio buffer to the OF audio out buffer. If you are up to it there are a number of c++ libraries that could work with OF. There was an OF addon released a long time ago but not updated - https://github.com/CICM/ofxHoa/tree/master that could be a starting point (use chatGPT to help get it to work with the current OF?)
There are also a number of VST plugins that can handle this well - I prefer to keep everying in a single application, but this could be a possible workflow (and seems to be the way things like SPAT work to do similar tasks). Here are a few:
These can be hosted in reaper (AFAIK there is no OF up to date addon for working with VST- but there is this GitHub - Meach/ofxVstHost: Enable to load VST plugins and use them as audio effects in openFrameworks.) which lets you have amazing control of pretty much everything remotely- this may not be the ideal workflow but using DANTE this could let you offload audio processing to another application or even computer.
hi, thank you for the reply! i am on Mac OS13.2.1/OF0.11.2, and playback is via fireface that properly decodes the ambisonics… i am more inclined to the idea that soundplayer is not cut for 36 channels files but i cannot find any documentation in the regard… i will look into the ofxSoundObjects!
hi thank you for the reply! the output is properly decoded to the playback system. the SoundPlayer loads 4th order fine but maybe i do need to allocate sufficient buffer for 5th order.
i do use the the Ambisonic Toolkit in SuperCollider (it is actually developed in my department!). i think i can look into build a workflow with SC! thanks for pointing out the ofxHoa. let’s see how that goes!
there has been movement since 11.2 regarding audio on mac; please try with the nightly build:
and activate the new player by uncommenting the AV_ENGINE define here:
and just to be sure to comprehend your workflow: the 36 channels is an ambisonics encoded file that gets decoded externally (via 36 channels of analog audio)?
1 Like
@burton hello, thanks for the suggestion, i will look into the nightly build.
as for my workflow, the 36 channels audio file is HOA5 file (acn-n3d) on my laptop, the decoding happens externally - the decoder is setup in the studio and specifically designed to the speaker array there, so that users can just plug in their machine, choose the right order, and play their ambisonic file. the HOA5 file has 36 channels, which is the input of the decoder, which then outputs audio signal that doesn’t necessarily contain 36 channels. i don’t think i am describing it in the most clear way but i hope it makes some sense…