< Back to IRCAM Forum

HOA non-realtime rendering of HOA audio for multichannel speaker system

What is the best patch approach for the following?:

  1. Decode a B-format recording (third-order Ambix, .aiff) for a 23 channel surround speaker system
  2. Render/bounce the decoded speaker stream as a new audio file, for testing in situ.

I have only used hoa.encoder for a handful of virtual sources with ambisonics before, and not used sound files, so I’m not sure about the best workflow, how to position the sources, if at all, as well as how to bounce the decoded stream, ideally non-realtime, as the file is long.

Any tips are appreciated - attached is a patch with the speaker layout and a start of what I thought would be the basic patch design, though I’m not sure about the source number for the decoder: do I need to put it at 16, or is there an automatic way appropriate for an ambix/sn3d ambisonic audio file?

thanks!
Nick


----------begin_max5_patcher----------
2610.3oc6bs0bahjE9Y6eETp1GsIzW319Tlp1G121e.oR4BI0Rpmf.U.xwdl
Zxu8su.HPBPGIcrmLyXmJNnta3qOW5uy4zzQ+982Mad9KhxYN+amu3b2c+98
2cmoIcC2U+46lsM4kEoIklgMaqnrLYsX1C19pDuTYZ2qokr8ay2WkJpLimT2
psopW2IrfMalyWq6ZWR0hMxr0OUHVTY6Mx2y06AGRD20+AGZr42TWu16QAhL
qACZcixklYR97e8QFclts+3960+5gaT1HnJadQZw4FjMOLksOIyVkio7E600
1wH5ObQxGM7ZjuLw2U27IhWgZxKblmjsdXYjNpL9vYjShG2ykvN7SPP3CN9D
iXGDbwhMO5pLq6SqjkoxkhhaR.yKjhrpjJYdlteuKVtiLNxLdnQvi5H3kpYR
0qohttTp1TZCkjXelVOFsiyvpKx.qB3yZmiEIaEUhhmDYIys3zL+kqyxUS8T
4huYdN34XUpTM9t4kKbstXeZWQ95B0hrlQtJOqpT9aVwVuJ3FrN5mUlRHMH+
KExjzYWrAxmZTxLlw.Qt.UMOtAsxjmEKeR0lBrmRppJjyUxdYs1qV8MoEoam
aS1sqsaSuFSCZLa46DYWj0..g2EYIBC5QEFMsleHpP90vIjJeV3trHeWyT64
jh147IchoeZpXsHyN80P3jreoL2YkLU3rQTHlPUwi8MppPqWZjQwoISl1Kco
XQ9Rw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WEjYTHfEGDVbTvhA
BKFJXQAgEEErHfvhfBVdfvBE+vXHPEiARQPPJBCjBgfTHFHE.Ao.LPBDcAJr
EfHKPgq.DUAJLEfHJvgm.zRWLPBDIwsxQPfj4MAinh5Bu0a3yYfJpdTHfEAD
VDTvxCDVnnCIwPvhDiBVQfvJBErBAgUHJXE.Bq.TvxGDV9nfEGDVbTvhABKF
JXAh2ffBuAADuAAEdCBHdCBJ7FfnMPg0.DoAJbFfnLPgw.DgAJ7EfnKPgs.D
YAJbEfnJPgo.VBFnr1EzRWLPBDIwMuSLdfxOihQ9YVrHfvhfBVdfvBEc34yO
ihQ9YVrh.gUDJXEBBqPTvJ.DVAnfkOHr7QAKNHr3nfECDVLTvBDuAAEdCBHd
CBJ7FDP7FDT3M.QafBqAHRCT3L.QYfBiAHBCT3K.QWfBaAHxBT3J.QUfBSAr
DLPYsKnktXfDHRhatFNNjXUsQzP.KNHr3nfECDVLTvhBBKJJXQ.gEAEr.8N7
In3GFCApXLPJBBRQXfTHDjBw.o.HHEfARfnKPgs.DYAJbEfnJPgo.DQAN7Df
V5hARWwA8wdPxN56g.MHG88OvQe2Cb526.i+cNvweeCX9Of0XeOCb+eb++Gf
SuRZt
-----------end_max5_patcher-----------
1 Like

to simplify/clarify, first, is this the correct approach for an third-order ambix/sn3d aiff file?

[spat5.sfplay~ @channels 16]
[spat5.hoa.rotate~ @order 3 @dimension 3d @yaw -90]
[spat5.hoa.decoder~ @order 3 @dimension 3D @norm SN3D @outputs 23] +speaker positions
[dac~ 1-23]

If the mixing desk already has speaker delays and gains configured, I don’t need to use spat5.align?


----------begin_max5_patcher----------
3268.3oc6cE0bbhiD9YmeETScOZOlVRfD2SYqZe3d5tGtGSkxEdF7X1v.SAL
NN6Va9seBIfQLFvMdjtjra7VNFjD70pUqutagf8Od2Uqtu34jpUd+SuO3c0U
+w6t5JUQMEbU64WsZe7yaxhqTMa0lh86SxqWcstt5jmqUk+K6uO8Yua89u+a
5u5Em9vCcsH+39hi0Y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ured on the mixing desk, then no need for spat5.align.

If you need to process large files in non-realtime, then you could use some command line tools. They are shipped with the Spat package, inside the “/media/tools” folder.
The command line executables “spat5.hoa.rotate~” and “spat5.hoa.decoder~” behave just like the corresponding Max objects. Let me know if you need further help to run them.

Best,
T.

2 Likes

Tiny details :

should be replaced by :
[spat5.hoa.rotate~ @order 3 @dimension 3d @initwith “/yaw -90, /norm SN3D”]

Yaw is not an attribute, so you cannot write @yaw.
“/norm SN3D” is not mandatory (SN3D is the default anyway), but just here for clarity.

2 Likes

Thanks very much, T

I’ll check out the command line tools for offline bouncing.