chris-hld / spaudiopy

Spatial Audio Python Package
https://spaudiopy.readthedocs.io/
MIT License
136 stars 13 forks source link

Tutorial or demo exemple? #16

Open Tetsujinfr opened 3 years ago

Tetsujinfr commented 3 years ago

Hi I am trying to use this great piece of code to simulate 3d spacial audio but I am not sure where to start. Is there a tutorial or some basic test exemples to get started and understand the basic concepts / building blocs and then develop from there? I had a look at the doc and it is great but it assume already a good understanding of the overall expertise domain. I went to the exemple folder but I am not sure what the exemlles are doing, I could not find a description except in the file names.

Looking for some guidance and first steps push, if you can point me to some documentation I would have missed that is great.

Thanks

chris-hld commented 3 years ago

Hi! Thanks for your comment! This package is mainly focused on research / development purposes, and you are right I kind of assume some expertise in audio signal processing.

What exactly are you trying to simulate? I'm sure I can help you getting started and maybe also improve the examples for others.

E.g. for a basic auralization of a mono sound source you only have to choose the direction and a (virtual) loudspeaker setup + decoder. I included a minimal example here: https://github.com/chris-hld/spaudiopy/blob/master/examples/Signal_auralization.ipynb

Tetsujinfr commented 3 years ago

I would like to set up a scene with the camera (I saw that in one of your exemples I think), then 2 sound sources (more sources actually but 2 will do the job to explain) would play some sound sample, and render that realtime on the audio stereo output with proper spacialization. The sources and the camera 3d coordinate would move to demonstrate the spacialization. I hope that makes sense.

jacksongoode commented 3 years ago

Just to add onto this, I was wondering if you could show an example of a simple 4 speaker setup (right, left, back right, back left) with audio loaded into each?

chris-hld commented 3 years ago

I would like to set up a scene with the camera (I saw that in one of your exemples I think), then 2 sound sources (more sources actually but 2 will do the job to explain) would play some sound sample, and render that realtime on the audio stereo output with proper spacialization. The sources and the camera 3d coordinate would move to demonstrate the spacialization. I hope that makes sense.

I currently do not support encoding moving sound sources. However, if you have an ambisonics audio file with your (dynamic) scene, you can decode and auralize it with the provided decoders, e.g. AllRAD. In particular, this package is not designed for any realtime application. You would typically use different software for this kind of application. If your host (e.g. a DAW) supports VST plugins, I would recommend our VST plugins here: https://github.com/leomccormack/SPARTA