Using Ambisonics Recordings

The following example uses a first order Ambisonics recording, and converts it to a binaural signal, using the SC-HOA tools. The file can be downloaded here:

The Recording

A Format

The file is a first order Ambisonics recording, shot outdoors with a Zoom H3-VR. The original raw material is the so called A Format. It features one channel for each microphone.

B Format

The file in the download is a first order Ambisonics B format recording. This is a standardized format, encoding the sound field in spherical harmonics.

Load HOA Stuff

// load HOA stuff for binaural:

Load Ambisonics File into Buffer

The following code works with the file located in the same directory as the working script. A buffer is used to read the four channel file:

var str = "210321_011_Raven.WAV";
~buf    =,str,0,-1);

// plot the audio data (may take some time):

Create a Playback Node

The buffer can be used with a PlayBuf UGen, to create a node which plays the sample in a continuous loop. An extra 4-channel audio bus is created for the Ambisonics signal. It can be monitored to check whether the signal is playing properly:

// create a 4-channel audio bus for the Ambisonics signal

// create a playback node (looped)
~playback = {

    var signal  =, ~buf, 1, loop:1);,signal*5);



// monitor all 4 Ambisonics channel

Create Binaural Decoder

An second node is created for decoding the Ambisonics signal, allowing an additional rotation of the sound image. It has three arguments for setting pitch, roll and yaw. Make sure to move the new node after the playback node to get an audible result:

// create a decoder with angles as arguments:

~decoder = {

    arg pitch=0, roll=0, yaw=0;

    var input    =, 4);

    var rotated  =, input, pitch, roll, yaw);

    var binaural =,rotated);, binaural);



// move after playback node


Exercise I

Use the mouse for a continuous control of the angles.