-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for recorded source/mic directivities from DIRPAT database (#259
) (#302) * Support for measured source/mic directivities from DIRPAT database and other SOFA format files (#259) * This is a pretty big commit that includes loading recorded directivity files and using them in the simulation * Supports source/receiver for shoebox rooms * Interpolation in spherical harmonic domain * Adds option for using minimum phase filters See the CHANGELOG for more details. --------- Co-authored-by: prerak23 <[email protected]> * Adds download functions for the SOFA files from DIRPAT. Adds tests for the SOFA directivities. Adds samples some pre-generated samples for the tests. Removes some print statements from room.py. * open_sofa_interpolate.py: vectorizes fibonnaci computations, use spherical/cartesian conversion functions from doa sub-package. Adds a generalized pinv computation function. Adds a new plotting function. Moves doa sub-package fibonacci mapping to a dedicated function to make it available everywhere. * Adds two SOFA files for MIT Kemar HRTF. Adds an example script for binaural simulation * Modularize the RIR building routines for ISM and RT * adds soxr to requirements for doc building * Disallow directivities for 2D rooms. --------- Co-authored-by: prerak23 <[email protected]> Co-authored-by: prerak23 <[email protected]>
- Loading branch information
1 parent
890fc37
commit 38871cc
Showing
107 changed files
with
4,958 additions
and
797 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ | |
"mpl_toolkits.mplot3d", | ||
"joblib", | ||
"scipy.io", | ||
"soxr", | ||
] | ||
|
||
try: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SOFA Database | ||
============= | ||
|
||
.. automodule:: pyroomacoustics.datasets.sofa | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,75 @@ | ||
pyroomacoustics.directivities module | ||
==================================== | ||
Directional Sources and Microphones | ||
=================================== | ||
|
||
.. automodule:: pyroomacoustics.directivities | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Analytic Directional Responses | ||
------------------------------ | ||
|
||
.. automodule:: pyroomacoustics.directivities.analytic | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Measured Directivities | ||
---------------------- | ||
|
||
.. automodule:: pyroomacoustics.directivities.measured | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Built-in SOFA Files Database | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. automodule:: pyroomacoustics.datasets.sofa | ||
:members: SOFADatabase, get_sofa_db | ||
:noindex: | ||
|
||
|
||
Reading Other or Custom File Types | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
It is possible to read other file types by providing a custom reader function to | ||
:py:class:`~pyroomacoustics.directivities.measured.MeasuredDirectivityFile` with the | ||
argument ``file_reader_callback``. | ||
The function should have the same signature as :py:func:`~pyroomacoustics.directivities.sofa.open_sofa_file`. | ||
|
||
|
||
SOFA File Readers | ||
................. | ||
|
||
.. automodule:: pyroomacoustics.directivities.sofa | ||
:members: | ||
:show-inheritance: | ||
|
||
Direction of the Patterns | ||
------------------------- | ||
|
||
.. automodule:: pyroomacoustics.directivities.direction | ||
:members: | ||
:show-inheritance: | ||
|
||
|
||
Creating New Types of Directivities | ||
----------------------------------- | ||
|
||
.. automodule:: pyroomacoustics.directivities.base | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Spherical Interpolation | ||
----------------------- | ||
|
||
.. automodule:: pyroomacoustics.directivities.interp | ||
:members: spherical_interpolation | ||
|
||
Numerical Spherical Integral | ||
---------------------------- | ||
|
||
.. automodule:: pyroomacoustics.directivities.integration | ||
:members: spherical_integral |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pyroomacoustics.simulation.ism module | ||
===================================== | ||
|
||
.. automodule:: pyroomacoustics.simulation.ism | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Simulation Routines Sub-package | ||
=============================== | ||
|
||
This sub-package contains some internal routines to simulate room acoustics. | ||
|
||
Submodules | ||
---------- | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
pyroomacoustics.simulation.ism | ||
pyroomacoustics.simulation.rt | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: pyroomacoustics.simulation | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pyroomacoustics.simulation.rt module | ||
==================================== | ||
|
||
.. automodule:: pyroomacoustics.simulation.rt | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.