Below, you’ll find information on:
SoundScape Renderer (SSR)
I have been a contributor to the development of the SoundScape Renderer (SSR), an open-source software package for realtime spatial audio presentation. It supports Linux and Mac OS X operating systems currently and uses the JACK Audio Connection Kit. SSR implements basic versions of most of the presentation methods that are treated in the book. Notably,
- HRTF-based presentation in various variations
- Amplitude Panning Ambisonics
- Wave Field Synthesis
You can also configure it to be a general-purpose multichannel convolution engine.
Other features :
- Fancy GUI
- TCP/IP interface for remote control of SSR from any desired device from anywhere in the world
- Support for Intersence InertiaCube3, Polhemus Fastrack, and 9DOF Razor IMU headtrackers
C++ Audio Processing Framework
The Audio Processing Framework is a collection of realtime code that was created in the development of the SSR. It contains tools for FFTW, a partitioned convolution engine, a JACK wrapper, and the like.
Matlab Script for Ear Training on Equalization
Find here a Matlab script that I use for ear training on equalization. Dave Moulton’s Golden Ears package inspired me to this. The script takes a file name as input. It then boosts or attenuates the signal from the file at a randomized set of frequencies for a couple of seconds followed by a couple of seconds of the unprocessed signal and so forth. The result is then saved in the same folder like the original file.
Open the script to see the options that you have in terms of what frequency bands you want to manipulate, whether you want to boost or attenuate, with what bandwidth, and by how much.
The script saves a second file, a text file, that contains the parameters for the equalization that has been applied. The way I use it is I import the equalized audio files in iTunes and copy them onto my iPod. I then copy and paste the equalization parameters from the text file into the ‘lyrics’ field associated with the file (right click in iTunes on the file on the iPod -> Info -> Lyrics). I can then listen to the file while en route and confirm whether I identified the parameters correctly by uncovering the correct answers on the iPod.
For increased convenience, the package contains batch file (for Windows, obviously), onto which you can drag and drop as many files as you like from anywhere on your computer. Keep the batch file in the same folder like the Matlab script. It automatically starts Matlab in the background and processes all dropped files. You don’t need to bother with typing the file names etc..
The Matlab script can only process .wav files (of any sampling rate and any number of channels). All other files are discarded. You can enable the processing of mp3s, e.g., by using the mp3read and mp3write functions by Dan Ellis. The latter are a bit tricky to install but I am sure that you’ll make it.
You then need to modify the wavread and wavwrite commands as well as the check for the file extension in my Matlab script accordingly.
I recommend to start training with one-actave wide boosts of a limited set of frequency bands and pink noise as signal. You can obtain the latter from here. Once you are confident try 1/3-octave bands on speech and then all sorts of music.
Acknowledgements: My script uses a 2nd-order IIR peak filter written by Piotr Majdak, which I obtained from here. (You don’t need to download it.)
Tutorial on Animating Sound Field Simulations
Animations are a helpful tool in the interpretation of simulations of sound fields or for pimping up presentations. Generally, there are two different ways to achieve them:
- Animated gif-files that loop infinitely. These are most convenient for static scenarios.
- Movies. These are more memory heavy and therefore often require data compression, which reduces the quality. The advantage is that they allow to pause, fast forward, and rewind.
All you need is a sufficient number of snapshots at equal time intervals during one period of the sound field that you want to animate. This is what this MATLAB script creates (change the file extension to ‘.m’; I haven’t figured out how to make WordPress allow downloading of non-standard files…). I used the sound field of a dipole as example.
The ‘saveas’ command in newer versions of MATLAB is capable of creating animated gifs right away. I am not quite sure why but they seem to be a bit bumpy at times. You can also create the gifs manually from the snapshots, which tends to achieve a better result. I have included both variants. Open the script and change the variable ‘format’ according to what you want. If you choose ‘gif’ it will create a subfolder and directly store the gif showing the sound field that the dipole source radiates.
If you choose ‘png’ the script stores 24 snapshots of the sound field in Portable Network Graphics (png) format. I’ll use VirtualDub for the assembly.
- Run VirtualDub.exe (or Veedub64.exe), go to ‘File -> Open video file’
- A dialog appears. Select “Files of type: Image Sequence” and open the file ‘dipole_01.png’ from the directory ‘images’ that was created by the MATLAB script. All other files will be loaded automatically.
- Click ‘Video -> Frame Rate’. Select ‘Change frame rate to (fps): 30. Click ‘OK’.
- Click ‘Video -> Compression’. Select, e.g. ‘uncompressed’.
- Click ‘File -> Export -> Animated GIF…’
- Enter the file name and choose the animation to loop infinitely.
- Open the exported file in a browser (image viewers often show only the first image of the sequence) and it should look like this:
Non-static scenarios such as moving sources are often better animated as movies. This MATLAB script (change the file extension to ‘.m’ …) ceates snapshots of the sound field of a moving source and stores them in a subfolder. The first three steps of the process are similar to what is described above (you should open the file ‘moving_source_01.png’, of course). Then do the following:
- Click ‘Video -> Compression’. Select, e.g. ‘uncompressed’ if you don’t care about file size or any other codec that you have available. DivX might be worth trying. VirtualDub recognizes DivX automatically once it is installed.
- Click ‘File -> Save as AVI’. The result should look like this:
– Sorry, I need to disable this content until I’ve fixed the cookie thingy.
Animations of the Sound Field of a Supersonic Source
Sound Field Synthesis Toolbox for Matlab/Octave and Python
My former colleagues at TU Berlin have released the Sound Field Synthesis Toolbox. It constitutes a significant step towards reproducible research in the sense that, if you use it for an experiment, simply publish the parameters and everybody can repeat it. There is some overlap with the scripts of the book but the toolbox also complements them. It covers – of course – Wave Field Synthesis, Spectral Division Method, and Near-field Compensated Higher Order Ambisonics. The essential functionalities are:
- Simulations of monochromatic sound fields.
- Time-domain simulations of temporally broadband sound fields.
- NFC-HOA filter design.
- Headphone auralization of synthetic sound fields (either for straightforward playback or for use with the SoundScape Renderer).
The documentation includes an Engineering Brief that was presented at the 132nd AES Convention in Budapest.
Various other Matlab, Python, and other implementation resources
- IEM Plug-in suite: Plenty of Ambisonics plug-ins and related
- Coding and Multidirectional Parameterisation of Ambisonic Sound Scenes (COMPASS): Plug-ins for parametric audio spatial audio processing and playback
- k-Wave: A powerful Matlab toolbox for time-domain simulation of sound fields
- SOFiA toolbox: Tools for spherical microphone array processing (the maintained and updated Python port call sound_field_analysis-py is available here)
- MCRoomSim: A simulator for microphone signals in shoebox rooms including spherical harmonics expansions
- SMIRgen: Spherical Microphone array Impulse Response generator for MATLAB
- Image-source method for room acoustics: Extension to the famous method by Jont and Allen
- Spatial Decomposition Method Toolbox: Matlab toolbox that accompanies this JAES paper
- CVX: Toolbox for convex optimization; comes with a free book by Boyd and Vandenberghe (highly recommended!)
- Auditory Modeling Toolbox: A comprehensive toolbox for modeling auditory perception; partly accompanies the book The technology of Binaural Listening
- Playrec: multichannel and non-blocking access to soundcards and much more
- LTFAT: The Large Time-Frequency Analysis Toolbox for Matlab (spectrograms and the like)
- Parallel, fixed-pole filter design
- FastICA: Independent component analysis and projection pursuit for Matlab, C++, and others.
- Connecting Matlab and Pure Data via TCP/IP: Look here
- Playing audio from Matlab using JACK
- JACK client for Python: Look here
- The Telephone: Fast-convolution externals etc. for Pure Data
- HISStools: Fast-convolution externals etc. for Max/MSP
- HULTI-GEN: Listening test GUI generator
- HAART: Multichannel impulse response measurement tool
- IAR: VST plugin for 3D panning and binauralization
- KFRlib: C++ library for FFT, audio filters, resampling, etc.
- Gnuplotting: Creating beautiful plots from Matlab / Python / etc. data
Repositories of Impulse Responses
- Quality and Usability Lab Impulse Response Measurements: BRIRs, HRIRs
- Database of the Two!Ears project: BRIRs and a lot more
- BRIRs of the 64-channel loudspeaker array of Signal Theory and Digital Signal Processing group at Rostock University (includes different room configurations)
- SOFA repository: HRTFs, headphones, and the like
- FH Köln Audio Group Downloads: BRIRs, spherical microphone array data
- AcouSP: Vast collection of databases (RIRs, BRIRs, etc.)
- C4DM RIR database: Omni-directional and B-Format RIRs
- Microphone Array Impulse Responses (MAIR) – Library and Renderer: RIRs captured with 2- to 9-channel microphone arrays incl. AES e-Brief
- Las Vegas Tango played by students of Rostock University of Music and Drama (Hochschule für Musik und Theater Rostock)
- BBC R&D’s SAQAS (Spatial Audio Quality Assessment Scenes)
- The ‘Mixing Secrets’ Free Multitrack Download Library: Vast resource of (mostly) raw multitrack recordings
- MedleyDB, another extensive resource
- Converse Rubber Tracks Sample Library
- Live and studio multi-track sessions provided by Telefunken Elektroakustik
- Mixes specifically prepared for WFS: Here and here
Other Spatial Audio Sites
- The spatial audio blog of QU@TU Berlin. Sascha and Matthias moved on to the University of Rostock. Their new blog is here.
- Nils Peters’s site