sound_field_analysis-py
Analyze, visualize and process sound field data recorded by spherical microphone arrays.
The sound_field_analysis toolbox (short: sfa) is a Python port of the Sound Field Analysis Toolbox (SOFiA) toolbox, originally by Benjamin Bernschütz. The main goal of the sfa toolbox is to analyze, visualize and process sound field data recorded by spherical microphone arrays. Furthermore, various types of test-data may be generated to evaluate the implemented functions. It is an essential building block of ReTiSAR, an implementation of real time binaural rendering of spherical microphone array data.
Requirements
We use Python 3.9 for development. Chances are that earlier version will work too but this is currently untested.
The following external libraries are required:
- NumPy
- SciPy
- Pysofaconventions
- Jupyter (for running Notebooks locally)
- Plotly (for plotting)
Installation
For performance and convenience reasons we highly recommend to use Conda (miniconda for simplicity) to manage your Python installation. Once installed, you can use the following steps to receive and use sfa, depending on your use case:
-
From PyPI /
pip
:Install into an existing environment (without example Jupyter Notebooks):
pip install sound_field_analysis
-
By cloning (or downloading) the repository and setting up a new environment:
git clone
https://github.com/AppliedAcousticsChalmers/sound_field_analysis-py.git
cd sound_field_analysis-py/
Create a new Conda environment from the specified dependencies:
conda env create --file environment.yml --force
Activate the environment:
source activate sfa
Optional: Install additional dependencies for development purposes (locally run Jupyter Notebooks with example, run tests, generate documentation):
conda env update --file environment_dev.yml
Examples
The following examples are available as Jupyter Notebooks, either statically on GitHub or interactively on nbviewer. You can of course also simply download the examples and run them locally!
Exp1: Ideal plane wave
Ideal unity plane wave simulation and 3D plot.
View interactively on nbviewer
Exp2: Measured plane wave
A measured plane wave from AZ=180°, EL=90° in the anechoic chamber using a cardioid mic.
View interactively on nbviewer
Exp4: Binaural rendering
Render a spherical microphone array impulse response measurement binaurally. The example shows examples for loading miro or SOFA files.
View interactively on nbviewer
GitHub
https://github.com/AppliedAcousticsChalmers/sound_field_analysis-py