HOA Technical Notes - B-Format Rotation

Once you have a B-Format audio stream, it's possible to manipulate it in various ways. For instance, you can rotate it using matrix multiplication. This moves all material in the soundfield.

Conventions

This page includes second order rotation matrices for SN3D-encoded B-Format for each of the three axes (X, Y and Z) given a rotation angle. It's possible to form other rotations by combining these. These are left-hand-side matrices (and so should be applied as out[t]=matrix*in[t]).

These rotations are sometimes known as "rotate" (Z), "tilt" (X) and "tumble" (Y) in the Ambisonic literature, or "yaw" (Z), "pitch" (Y) and "roll" (X).

For first order rotation, just use the top left corner four-by-four matrix. For rotations up to third order, you can use the O3A Rotation plugin from the O3A Core plugin library.

X Axis Rotation ("Roll")

This rotates around the X (front/back) axis. This is sometimes known as "tilt" in the Ambisonic literature.

ACN0 In1 In2 In3 In4 In5 In6 In7 In8 In
0 Out100000000
1 Out0cos(a)-sin(a)000000
2 Out0sin(a)cos(a)000000
3 Out000100000
4 Out0000cos(a)00-sin(a)0
5 Out00000cos(2a)-sqrt(3/4) sin(2a)0-1/2 sin(2a)
6 Out00000sqrt(3/4) sin(2a)1/4 (1+3cos(2a))0-sqrt(3/16) (1-cos(2a))
7 Out0000sin(a)00cos(a)0
8 Out000001/2 sin(2a)-sqrt(3/16) (1-cos(2a))01/4 (3+cos(2a))

Y Axis Rotation ("Pitch")

This rotates around the Y (left/right) axis. This is sometimes known as "tumble" in the Ambisonic literature.

ACN0 In1 In2 In3 In4 In5 In6 In7 In8 In
0 Out100000000
1 Out010000000
2 Out00cos(a)sin(a)00000
3 Out00-sin(a)cos(a)00000
4 Out0000cos(a)-sin(a)000
5 Out0000sin(a)cos(a)000
6 Out0000001/4 (1+3cos(2a))sqrt(3/4) sin(2a)sqrt(3/16) (1-cos(2a))
7 Out000000-sqrt(3/4) sin(2a)cos(2a)1/2 sin(2a)
8 Out000000sqrt(3/16) (1-cos(2a))-1/2 sin(2a)1/4 (3+cos(2a))

Z Axis Rotation ("Yaw")

This rotates around the Z (up/down) axis, i.e. horizontally. This is sometimes known as "rotate" in the Ambisonic literature.

ACN0 In1 In2 In3 In4 In5 In6 In7 In8 In
0 Out100000000
1 Out0cos(a)0sin(a)00000
2 Out001000000
3 Out0-sin(a)0cos(a)00000
4 Out0000cos(2a)000sin(2a)
5 Out00000cos(a)0sin(a)0
6 Out000000100
7 Out00000-sin(a)0cos(a)0
8 Out0000-sin(2a)000cos(2a)