Hi. I was currently looking at ways of manipulating steaming audio with panda3d’s built in audio engines. fmod was the most promising engine but when I look at the pricing, it discourages me from using it. After scouring the manual and internet for alternatives, I found there is is an Open AL fork called Open AL soft which comes with the audio manipulation features (like reverb) that i am looking for and am wondering if it is possible to get it implemented into panda3ds source code. Is there any way I can compile panda3d with this Open Al fork?
Panda3D uses the OpenAL soft implementation of OpenAL:
https://docs.panda3d.org/1.10/python/programming/audio/index
This page explains how to setup reverberation:
https://docs.panda3d.org/1.10/python/programming/audio/dsp-effects
thanks for the quick response. The manual shows that I have to enabled fmod as the audio engine. I have just tried to use the filtering properties class and linked it to my sfx manager, but I still don’t hear a difference in the audio playing (this is when I don’t enable fmod).
edit: I enabled fmod and now it works. Do I really need fmod for the effects to take place?
looking at the OpenAL soft source code on GitHub, it comes with effects but I don’t know how to set them in panda3d. do I have to use an module like ctypes to apply the effects?
According to the page regarding effects, they are currently only supported when using fmod. Apologies for the oversight.
You could try using a package such as PyOpenAL along with Panda3D. Perhaps that would help. It should support the full OpenAL soft API:
https://pypi.org/project/PyOpenAL/
That looks like a good way for now to do what I want. I will further look into it. Hopefully the panda3d dev team can fully implement the effects manager for OpenAL in the near future.
hmm. After looking at some documentation and forums, I found that other people have also asked how to get effects working but no forum I found has those questions answered. it looks like the creator of the library has not included a way to use the effects. This is a problem as the main reason I want Open Al soft is for the free effects that come with it.
Is reverberation the only effect you needed or were there others you need as well?
I would have liked as many effects as possible.
It’s not compiling yet, but I’m working on implementing Steam Audio into panda3d. Add steam audio support by lifelandman · Pull Request #1699 · panda3d/panda3d · GitHub
This would add several effects, all of which are processed by openal.
Sounds interesting. I guess for now the only viable choices are using fmod (which requires a special license for commercial use) or using ctypes to directly interface with OpenAL soft. Most of what I was able to find only handled simple audio playback rather than audio effects.
While investigating the possibilities for effects, I came across this library, however, it is only available for Python.
Is that library using OpenAL? if not, I wonder if it can produce spatial audio.
looking though its code, I don’t see any include of OpenAL probably meaning it can’t make spatial audio.
As far as I know, no, but it has methods and classes for building spatial sound.
https://belangeo.github.io/pyo/api/classes/pan.html#pyo.HRTF
https://belangeo.github.io/pyo/api/classes/pan.html#pyo.Binaural
If I read that correctly, it looks more like panning than actual 3d spatial positioning. I reckon it could be good for some sound effect playing, but not so good when it comes to placing the sound in a 3d scene.
As far as I know, the concept of 3D sound does not exist. This is the banal panning.
maybe by creating a new 3DAudio manager, I could make the use of this library possible but I will wait and see if there are any easier solutions.
You do not need to create a 3DAudio manager, you need to calculate the position of the sound yourself, relative to the listener, that is, calculate the elevation and azimuth.