Analyze, visualize and process sound field data recorded by spherical microphone arrays.

Overview

Sound Field Analysis toolbox for Python

Mentioned in Awesome Python for Scientific Audio icon_travis icon_appveyor

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. 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:

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

Documentation

https://appliedacousticschalmers.github.io/sound_field_analysis-py/ and offline as PDF.

Note: Verify the version number of the documentation to see if it reflects the latest changes.

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

AE1_img

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

AE2_img

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

AE4_img

Version history

unreleased
  • Update miro_to_struct() to work in modern Matlab versions
  • Update MIRO struct loading for SphericalGrid (forgiving empty radius and quadrature weights)
  • Add optional automatic limitation of y-axis range in plot2D()
  • Implement frac_oct_smooth_fd() with fractional octave smoothing of magnitude spectra
  • Add option for fractional octave smoothing of magnitude spectra to plot2D()
  • Fix Exp4 to replace removed deg2rad and rad2deg utility functions
v2021.2.4
  • Implement option to use real spherical harmonic basis functions
  • Update Exp4 to optionally utilize real spherical harmonics
  • Fix testing of spherical harmonics against reference Matlab implementation
  • Add testing for generation of real spherical harmonics
  • Add evaluation of performance for generation of complex and real spherical harmonics
  • Add evaluation of performance for spatial sound field decomposition
  • Remove deg2rad and rad2deg utility functions (replaced by NumPy equivalent)
  • Update Conda environment setup to combine all development dependencies
  • Update online and offline documentation
v2021.1.12
  • Update MIRO struct loading for SphericalGrid (quadrature weights are now optional)
  • Fix to prevent Python 3.8 syntax warnings
  • Improve Exp4 (general code structure and utilizing Spherical Head Filter and Spherical Harmonics Tapering)
v2020.1.30
  • Update README and PyPI package
v2019.11.6
  • Update internal documentation and string formatting
v2019.8.15
  • Change version number scheme to CalVer
  • Improve Exp4
  • Update read_SOFA_file()
  • Update 2D plotting functions
  • Improve write_SSR_IRs()
  • Improve Conda environment setup for Jupyter Notebooks
  • Update miro_to_struct()
2019-07-30 (v0.9)
  • Implement SOFA import
  • Update Exp4 to contain SOFA import
  • Delete obsolete Exp3
  • Add named tuple HRIRSignal
  • Implement cart2sph() and sph2cart() utility functions
  • Add Conda environment file for convenient installation of required packages
2019-07-11 (v0.8)
  • Implement Spherical Harmonics coefficients tapering
  • Update Spherical Head Filter to consider tapering
2019-06-17 (v0.7)
  • Implement Bandwidth Extension for Microphone Arrays (BEMA)
  • Edit read_miro_struct(), named tuple ArraySignal and miro_to_struct.m to load center measurements
2019-06-11 (v0.6)
2019-05-23 (v0.5)
  • Implement Spherical Head Filter
  • Implement Spherical Fourier Transform using pseudo-inverse
  • Extract real time capable spatial Fourier transform
  • Extract reversed m index function (Update Exp4)

Contribute

See CONTRIBUTE.rst for full details.

License

This software is licensed under the MIT License (see LICENSE for full details).

References

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.

Owner
Division of Applied Acoustics at Chalmers University of Technology
Division of Applied Acoustics at Chalmers University of Technology
ᴀ ʙᴏᴛ ᴛʜᴀᴛ ᴄᴀɴ ᴘʟᴀʏ ᴍᴜꜱɪᴄ ɪɴ ᴛᴇʟᴇɢʀᴀᴍ ɢʀᴏᴜᴘ ᴏɴ ᴠᴏɪᴄᴇ ᴄᴀʟʟ

GJ516 LOVER'S ııllıllı ♥️ ➤⃝Gᴊ516_ᴍᴜꜱɪᴄ_ʙᴏᴛ ♥️ ıllıllı ᴀ ʙᴏᴛ ᴛʜᴀᴛ ᴄᴀɴ ᴘʟᴀʏ ᴍᴜꜱɪᴄ ɪɴ ᴛᴇʟᴇɢʀᴀᴍ ɢʀᴏᴜᴘ ᴏɴ ᴠᴏɪᴄᴇ ᴄᴀʟʟ Requirements 📝 FFmpeg NodeJS nodesou

1 Nov 22, 2021
Dataset and baseline code for the VocalSound dataset (ICASSP2022).

VocalSound: A Dataset for Improving Human Vocal Sounds Recognition Introduction Citing Download VocalSound Dataset Details Baseline Experiment Contact

Yuan Gong 58 Jan 03, 2023
Use python MIDI to write some simple music

Use Python MIDI to write songs

小宝 1 Nov 19, 2021
Audio spatialization over WebRTC and JACK Audio Connection Kit

Audio spatialization over WebRTC Spatify provides a framework for building multichannel installations using WebRTC.

Bruno Gola 34 Jun 29, 2022
Welcome to Nexus. Your personal virtual assistant

AI Voice Assistant Welcome to Nexus voice assistant Description Have you ever heard of voice assistants like Cortana, Siri, Google assistant, and Alex

Mustafah Zacs 1 Jan 10, 2022
Terminal-based audio-to-text converter

att Terminal-based audio-to-text converter Project description A terminal-based audio-to-text converter written in python, enabling you to convert .wa

Sven Eschlbeck 4 Dec 15, 2022
Real-time audio visualizations (spectrum, spectrogram, etc.)

Friture Friture is an application to visualize and analyze live audio data in real-time. Friture displays audio data in several widgets, such as a sco

Timothée Lecomte 700 Dec 31, 2022
🎵 A repository for manually annotating files to create labeled acoustic datasets for machine learning.

🎵 A repository for manually annotating files to create labeled acoustic datasets for machine learning.

Jim Schwoebel 28 Dec 22, 2022
Marsyas - Music Analysis, Retrieval and Synthesis for Audio Signals

Welcome to MARSYAS. MARSYAS is a software framework for rapid prototyping of audio applications, with flexibility and extensibility as primary concer

Marsyas Developers Group 364 Oct 31, 2022
SU Music Player — The first open-source PyTgCalls based Pyrogram bot to play music in voice chats

SU Music Player — The first open-source PyTgCalls based Pyrogram bot to play music in voice chats Note Neither this, or PyTgCalls are fully

SU Projects 58 Jan 02, 2023
Speech Algorithms Collections

Speech Algorithms Collections

Ryuk 498 Jan 06, 2023
python wrapper for rubberband

pyrubberband A python wrapper for rubberband. For now, this just provides lightweight wrappers for pitch-shifting and time-stretching. All processing

Brian McFee 106 Nov 28, 2022
An AI for Music Generation

An AI for Music Generation

Hao-Wen Dong 1.3k Dec 31, 2022
Implicit neural differentiable FM synthesizer

Implicit neural differentiable FM synthesizer The purpose of this project is to emulate arbitrary sounds with FM synthesis, where the parameters of th

Andreas Jansson 34 Nov 06, 2022
?️ Open Source Audio Matching and Mastering

Matching + Mastering = ❤️ Matchering 2.0 is a novel Containerized Web Application and Python Library for audio matching and mastering. It follows a si

Sergey Grishakov 781 Jan 05, 2023
Code to work with wave files!

Code to work with wave files!

Mohammad Dori 3 Jul 15, 2022
Scrap electronic music charts into CSV files

musiccharts A small python script to scrap (electronic) music charts into directories with csv files. Installation Download MusicCharts.exe Run MusicC

Dustin Scharf 1 May 11, 2022
A simple music player, powered by Python, utilising various libraries such as Tkinter and Pygame

A simple music player, powered by Python, utilising various libraries such as Tkinter and Pygame

PotentialCoding 2 May 12, 2022
Python Audio Analysis Library: Feature Extraction, Classification, Segmentation and Applications

A Python library for audio feature extraction, classification, segmentation and applications This doc contains general info. Click here for the comple

Theodoros Giannakopoulos 5.1k Jan 02, 2023
A voice assistant which can be used to interact with your computer and controls your pc operations

Introduction 👨‍💻 It is a voice assistant which can be used to interact with your computer and also you have been seeing it in Iron man movies, but t

Sujith 84 Dec 22, 2022