Skip to content
Analyze, visualize and process sound field data recorded by spherical microphone arrays.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Sound Field Analysis toolbox for Python

The sound_field_analysis toolbox (short: sfa) is a Python port of the Sound Field Analysis Toolbox (SOFiA) toolbox, originally by Benjamin Bernschütz[1]. 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.

The package is pure python and PEP8 compliant (except line-length). Please expect things to be slow for now and for the API to break, as the development is still very much ongoing.


We use Python 3.5 for development. Chances are that earlier version will work too but this is currently untested.

The following external libraries are required:


You can simply install sfa through pip (pip install sound_field_analysis).

We highly recommend the Anaconda python environment. Once installed, you can use the following steps to create a new environment with the sfa toolbox.

  1. Create a new environment: conda create --name sfa numpy scipy plotly
  2. Activate this environment: source activate sfa
  3. Install from pypi: pip install sound_field_analysis

Soon, you may also install directly from the conda-forge channel using conda install -c conda-forge sound_field_analysis.


Please find the full documentation over at!


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


Exp3: Import data in SOFA format

  1. Install dependencies for netCDF4 (see example documentation) (this only worked on Mac OS X): brew install hdf5 brew install netcdf
  2. Install additional dependency from pypi: pip install sound_field_analysis[sofa_import]

SOFA format

View interactively on nbviewer

Exp4: Binaural rendering

Render a spherical microphone array measurement binaurally

View interactively on nbviewer


The sound_field_analysis toolbox is based on the Matlab/C++ Sound Field Analysis Toolbox (SOFiA) toolbox by Benjamin Bernschütz. For more information you may refer to the original publication:

[1] Bernschütz, B., Pörschmann, C., Spors, S., and Weinzierl, S. (2011). SOFiA Sound Field Analysis Toolbox. Proceedings of the ICSA International Conference on Spatial Audio

The Lebedev grid generation was adapted from an implementation by Richard P. Muller.

You can’t perform that action at this time.