Git Product home page Git Product logo

pygsound's People

Contributors

dependabot[bot] avatar royjames avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pygsound's Issues

About how to add directional simulation in the pygsound

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.

Why use a random noise to reconstruct the IR phase

Hi,

When I deployed pygsound in a very simple scene (one direct path and one reflection path), I found that sometimes the amplitude of the peak representing the reflection path would exceed the amplitude of the peak representing the direct path, which is unreasonable.

After checking out the source code, I found that in ImpulseResponse::setIR() in gsImpulseResponse.cpp,a random noise in the range -1 to 1 was used to multiply the IR (impulse response). The figure below shows the comparison among the interleaved IR (named irC in source code), the noise (named noise in source code), and the final IR output (named outputC in source code) ( They all took absolute values).

image

In gsImpulseResponse.h , the comments say that the noise is used to reconstruct the phase of the pressure IR, which I can't understand. Could you please explain more about the function of the noise?

Compilation error when setting up the project

I have attempted to download the project in two seperate linux distributions, Manjaro and Mint. In both of these, I have encountered errors with cmake when attempting to build from the repository. I have also been unsuccessful in downloading the project from PyPI. I'm not sure how to approach the project if I could successfully download it from PyPI anyways.

From a brief glance, the project does not appear to have any major issues holding it back from being compiled on a windows device. Due to this, I have attempted to download FFTW and pyGsound on a windows device instead but this was unsuccessful as well. It would be desirable to be able to compile this project on a Windows device as well; I would appreciate guidance on this if it is possible to do this.

I would highly appreciate pointers on troubleshooting steps I may have missed, as I would like to try this project. I don't currently have the error logs accessible, but can share them by compiling again later if necessary.

About diffraction effect

Hi RoyJames,

Thanks for your work and it works perfect! But I had one question, in the paper "GSOUND: INTERACTIVE SOUND PROPAGATION FOR GAMES" by C. Schiller, D. Manocha, diffraction of sound is considered instead of diffusion reflection, and it seems otherwise for pygsound.

Is these two the same algorithm, or the python version is actually different from the paper GSOUND?
Thanks!

pybind11/detail/common.h:112:20: fatal error: Python.h: No such file or directory compilation terminated.

after:
sudo apt-get update
sudo apt-get -y install cmake python3-dev gobjc++ libfftw3-dev

I run the following code :
(python3) root@iZ2zeab8t820b30ezwjthjZ:~/pygsound# python3 setup.py develop
running develop
running egg_info
writing dependency_links to src/pygsound.egg-info/dependency_links.txt
writing src/pygsound.egg-info/PKG-INFO
writing top-level names to src/pygsound.egg-info/top_level.txt
writing requirements to src/pygsound.egg-info/requires.txt
reading manifest file 'src/pygsound.egg-info/SOURCES.txt'
writing manifest file 'src/pygsound.egg-info/SOURCES.txt'
running build_ext
-- Found PythonInterp: /root/.virtualenvs/python3/bin/python3 (found version "3.5.2")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.5m.so
-- pybind11 v2.4.dev4
-- CMAKE_SYSTEM_NAME = Linux
-- CMAKE_CXX_COMPILER_ID = GNU
-- CMAKE_CXX_COMPILER_VERSION = 5.4.0
-- CMAKE_COMPILER_IS_GNUCXX = 1
Python dir: /usr/include/python3.5m
Python lib: /root/.virtualenvs/python3/lib/python3.5/config-3.5m-x86_64-linux-gnu
Building pygsound release library
-- Configuring done
-- Generating done
-- Build files have been written to: /root/pygsound/build/temp.linux-x86_64-3.5
[ 28%] Built target om-framework
[ 32%] Built target om-bvh
[ 38%] Built target om-resources
[ 64%] Built target om-sound
[ 93%] Built target gsound
[ 94%] Building CXX object src/pygsound/CMakeFiles/pygsound.dir/src/Scene.cpp.o
In file included from /root/pygsound/lib/pybind11/include/pybind11/pytypes.h:12:0,
from /root/pygsound/lib/pybind11/include/pybind11/cast.h:13,
from /root/pygsound/lib/pybind11/include/pybind11/attr.h:13,
from /root/pygsound/lib/pybind11/include/pybind11/pybind11.h:44,
from /root/pygsound/src/pygsound/src/Python.hpp:4,
from /root/pygsound/src/pygsound/src/SoundSource.hpp:4,
from /root/pygsound/src/pygsound/src/Scene.cpp:1:
/root/pygsound/lib/pybind11/include/pybind11/detail/common.h:112:20: fatal error: Python.h: No such file or directory
compilation terminated.
src/pygsound/CMakeFiles/pygsound.dir/build.make:107: recipe for target 'src/pygsound/CMakeFiles/pygsound.dir/src/Scene.cpp.o' failed
make[2]: *** [src/pygsound/CMakeFiles/pygsound.dir/src/Scene.cpp.o] Error 1
CMakeFiles/Makefile2:399: recipe for target 'src/pygsound/CMakeFiles/pygsound.dir/all' failed
make[1]: *** [src/pygsound/CMakeFiles/pygsound.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "setup.py", line 92, in
'wavefile',
File "/root/.virtualenvs/python3/lib/python3.5/site-packages/setuptools/init.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/root/.virtualenvs/python3/lib/python3.5/site-packages/setuptools/command/develop.py", line 38, in run
self.install_for_development()
File "/root/.virtualenvs/python3/lib/python3.5/site-packages/setuptools/command/develop.py", line 140, in install_for_development
self.run_command('build_ext')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 36, in run
self.build_extension(ext)
File "setup.py", line 68, in build_extension
cwd=self.build_temp)
File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release']' returned non-zero exit status 2

how can I fix this problem? (python-dev and python3-dev are already installed, Python.h is available),thank you very much!

An error occurred on the first run

I'm really sorry to disturb you in your busy schedule. I follow your tutorial to operate, but I encounter some problems. I hope you can spare some time to give me some advice.Thank you very much!

sudo apt-get update
sudo apt-get -y install cmake python3-dev gobjc++ libfftw3-dev
Both steps have been completed!

(python3) root@iZ2zeab8t820b30ezwjthjZ:~/pygsound# python3 setup.py develop
running develop
running egg_info
writing src/pygsound.egg-info/PKG-INFO
writing requirements to src/pygsound.egg-info/requires.txt
writing dependency_links to src/pygsound.egg-info/dependency_links.txt
writing top-level names to src/pygsound.egg-info/top_level.txt
reading manifest file 'src/pygsound.egg-info/SOURCES.txt'
writing manifest file 'src/pygsound.egg-info/SOURCES.txt'
running build_ext
CMake Error at /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Call Stack (most recent call first):
/opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FindPkgConfig.cmake:41 (find_package_handle_standard_args)
CMakeLists.txt:22 (find_package)

-- Configuring incomplete, errors occurred!
See also "/root/pygsound/build/temp.linux-x86_64-3.5/CMakeFiles/CMakeOutput.log".
See also "/root/pygsound/build/temp.linux-x86_64-3.5/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "setup.py", line 91, in
'wavefile',
File "/root/.virtualenvs/python3/lib/python3.5/site-packages/setuptools/init.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/root/.virtualenvs/python3/lib/python3.5/site-packages/setuptools/command/develop.py", line 38, in run
self.install_for_development()
File "/root/.virtualenvs/python3/lib/python3.5/site-packages/setuptools/command/develop.py", line 140, in install_for_development
self.run_command('build_ext')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 36, in run
self.build_extension(ext)
File "setup.py", line 65, in build_extension
cwd=self.build_temp, env=env)
File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/root/pygsound', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/root/pygsound/src/pygsound', '-DPYTHON_EXECUTABLE=/root/.virtualenvs/python3/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1
————————————————————————————————————————————————
environment:
cmake 3.14.5
python 3.5.2
Linux iZ2zeab8t820b30ezwjthjZ 4.4.0-151-generic #178-Ubuntu SMP Tue Jun 11 08:30:22 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Building on mac m1 chip

Hi,
I am unable to install with pip due to cmake related error. Any suggestions or updates to support this issue?
Thank you!

clang: error: the clang compiler does not support '-march=native'

About theta and phi in directivity definition

Dear author,

https://github.com/GAMMA-UMD/pygsound/blob/8f41cb13da5dba9aa09cac3f42e668005ed5cf11/src/GSound/gsound/gsSoundDirectivity.cpp#L152C1-L179C160

In gsSoundDirectivity.cpp, According to the Macro definition of SPHERICAL( theta, phi ), it's

[0, 0, 1; 0, 1, 0; 1, 0, 0] * [ sin(theta) * cos(phi), sin(theta)*sin(phi), cos(theta) ]' =
[ cos(theta), sin(theta)*sin(phi), sin(theta) * cos(phi) ]'
,

which means x = cos(theta), y = sin(theta)*sin(phi), z = sin(theta) * cos(phi).

So I think theta represents angle between ray and X-axis; phi represents angle between ray's projection in YZ plane and Z-axis (as shown in the figure below).

Is my understanding correct?

9fd1d0a1a4cc2bd88b2ddb8e3db5770

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.