2018-06-13 23:51:20

Hello.
Guys, who have worked with 3D audio in Python, tell me what I can use.
I looked at the audio in the pyglet, but it's not comfortable for me. When I need to play the sound in the loop, difficulties begin. I need to create a player, etc. I can't understand this.
I know about Libaudioverse, but it does not have good documentation and 3D sound examples.
OpenAL is a low-level audio library. I understand why a listener and source positions are needed, but there are parameters that I can't understand.
If I worked in C++, maybe I could find a wrapper over a low-level library. But in Python, I can't find it.
Ideally, I need a solution where I can just specify the coordinates of the listener and source, change it and update the parameters for playback in the game.
I will be glad to hear any information on this topic.
Thanks in advance!

Thumbs up +1

2018-06-14 01:03:40

try using sound_lib and the AGK sound_positioning.py file, that contains some formulas with which you can position audio

If you want to get in touch with me you can follow me on Twitter
have a nice day.
Paul

2018-06-14 05:23:10 (edited by magurp244 2018-06-14 05:23:39)

You can use PyAL with OpenAL Soft for 3D positional audio, Pyglet's driver scripts need a little tweaking to do the same. I have a few examples examples with custom player and source handlers available in my repository that also include more fancy things like HRTF and EFX effects like reverb, echo, etc.

[OpenAL Python Example]
[HRTF Python Example]
[EFX Python Example]

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

Thumbs up

2018-06-15 17:48:44

I looked at libaudioverse and PyOpenAL.
If there were wrappers over OpenAL, there are no problems. But PyOpenAL has incomprehensible things. For example, orientation. The documentation does not say why and how to use it.

Thumbs up

2018-06-15 20:14:35

Camlorn_audio is easy to use, but there's a major bug that causes NPEs when any sounds are garbage-collected. I don't know if it's still available anywhere.

Some of my games
Keep up to date by following @Jeqofire on twitter!
Ear Ninja?

Thumbs up