-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About how to add directional simulation in the pygsound #33
Comments
It is possible. GSound has well-defined directivity described here pygsound/src/GSound/gsound/gsSoundDirectivity.h Lines 70 to 83 in 8f41cb1
But setting that flag to True only initializes an omnidirectional pattern which doesn't do anything, a specific pattern needs to be assigned following definitions in GSound/gsSoundDirectivity.cpp as you've noticed. For people who are familiar with C++, it should be easy to leverage this API. However, I have not exposed it in current python bindings just like many other functionalities that are less often used. I may not have the bandwidth to do these additions myself. But pull requests are welcome. |
Thanks for your answer, I have add a specific pattern in the program and simulate a directional acoustic wave. I want to know the definition of angle and theta in GSound/gsSoundDirectivity.cpp. I find the view direction of the source is -transform.orientioan.z. Does this mean that the value of theta and phi are corresponding to the z-axis? |
By the way, I just found that I fail to add a sound pattern to the source. I initialise the SoundSource with the pattern defined in the SoundDirectivity in gsSoundSource.cpp but get the same RIR. Is this operation right? Or should I realise other API about SoundDirectivity. Best wishes. |
I cannot comment on this case without codes. My suggestion is to step into the key functions (or just print them out if you have difficulty setting up a debugger) to make sure that your new directivity is actually being called in the expected way. Regarding coordinate convention - yes I believe the convention used throughout this project is ZYX in which -z is forward, +x is right, and +y is up. |
Dear author:
I would like to know how to add directional simulation in the pygsound. I notice that parameter "Sounddirectivity" in Context.cpp can be set true. Also, in GSound/gsSoundDirectivity.cpp, it seems that several sound pattern has been defined in the program. So how can I set up the directional simulation method.
Best wishes.
The text was updated successfully, but these errors were encountered: