< Back to IRCAM Forum

Ambisonic decoding

Hi,

The support for spat v4 is discontinued. I’m sending you a (tentative) patch for b-format to binaural conversion using spat v5. (I hope you can upgrade)
The main limitation (was in v4, and still in v5) is that the B-format (or HOA) stream needs to be decoded over a set of virtual loudspeakers, prior to binauralization. There is yet no support for “direct transcoding” from Ambisonics to binaural (a pity).

The attached patcher is mostly “pedagogical”. Feel free to adapt it to your needs.
Also, have a look at “spat5.tuto-bformat” for additional information.

Best,
T.

  
----------begin_max5_patcher----------  
5200.3oc6cs0iiiar94d9UPXbBPBP2dDI00yS6tYwj8gylDjM.I4zyfAxVzt  
0NxR9nKcOSBx7a+vKR1T1Rxkrna6MXGra2tEkUUrpheUwhEo9Wu4tYKx9LqX  
F5+F8H5t69Wu4t6jWRbg6p+66lsI7yKSBKj21rkYa1vRKmcupsR1mKkW+IVX  
z1mxRYnh30ogIEM2QZ0l3zDVo7qiqu31vxkOEmt9i4rkkJxioj4V2ibIdheg  
w9heQnysPen9KsnZwhDl9iYUVZYQ7+TcML+KrijYUkMzzR6lSC2Hu4YeadbX  
RCKtMmUv6SgkwYoihihijOrrE+7CD+Yhq8ueyaD+39IJMWDmFVkGlD+OkLEJ  
aEp7IFhRPIYUQEaYgehkuSDmDmxVlUkJ+tjt5TcdGP0Lj.641XrmME6Za4Rb  
tG4HDCbYBIP7KpyUTKMNtSWi4XRMVdFmyXRszKOkkvGFrjkxtGEuBkxXQrnQ  
OdvW1IH9dy4cIr+Mv3gSxQ5RW6yQ5lD+LadjFq7bX9NdbWiO5+gwJMs8slay  
+miukkmOVXkfoxtiss7m9Zci1xKxN40xphEY4Qr7kYIY4pGr0bJl5Iddc+o8  
OU0ir7KaYpu4rY2ilsJIKjyheXXI+n3dMk.krSkFlyEikr7OxRCOvpoH7YVz  
GCKKyiWTUx1+ohZMUspRnMRpXYqZtby00e7EOkku2rJOKoQU15tZjBVczVUZ  
bYQ4WZwistgMbUtnsGntVy65IjjkttCqF7Gl04SKTZQJeXplkFsM+5xXA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AkHPnDwDThBgRSMTNLDGBlH6wMZfSRHrIHDA.gHlfPT.DxH5Ha.Dx1  
DDxA.gbLAgbAPHWSPHO.DxyDDxG.g7MAgB.Pn.iLfEBz.1LXCf.GLB5.FB7.  
1H3CXH.DXifPfg.QfMBFAFBHA1HnDXHvDXifSfg.TfMBRAFBTA1HXEXHfEXi  
fVPffVPLBZAABZAwLwR.JXBifVPffVPLBZAABZAwHnEDHnEDifVPffVPLBZA  
ABZAwHnEDHnEDifVPffVPLBZAEBZA0HnETHnESNMdXHEHC0Dk.B1FxrqolhR  
XHTZxROLj7sXhxKRQIL.JYl9DA.kHFgRT.TZxdOvfJYRrQxhjjVXPzBaDZQ.  
QKhQnEEDslr9BRxVONQbpBy9f2BZBZbva+rCdymc7a8r9eimc3a6L41MV8le  
5fhAe+VmoJJN6mju1t93OxRqTUmdyKWr1RhEqWEmjrLKI6nW5aM0R+LUq6dA  
q0buhsVBIvFi84hk4TL0i3J+D+CNN5a4c02A27krcrCrHha01k3Y6H+jOg5P  
uu0Q2p5qQ1SKKbfhBVA9V1pOwuD9dj9gW6rvz00ulx7z2SK4YaEGOj0R84zf  
c2eUY157vn35yDq1u2tuu1PJm25guvslsgKPia9N5Fd6TFeuRpymT92kkDg9  
yYhsDR7PpD88L0ixcMUiMmgXkez9+YH5uaLyAZ59k9Vy8c5bKe0v9crAudrd  
KdgDhkYluGBQRa1dp0Upm1b1OB2Z5d3i82Mtn6gxTOWaOobg5aSwRYk8ACGO  
yQwf0Im0X+1GcCcotl0RY1ro0ebuKTSoAC+rGDi0eUaYF.4edwB3iWB90gKv  
GtXD0ymJRh4A772DQCMjdRq+J2H+s9gg3E0tk96RpXCiwFtbISrUc0z.TrPU  
Kj6t6h1InV6aZF7OjyXoilCsDrji3HaVF1E10mGLlQYtpMKX4+AtSuQyaBAk  
kz90IffcjxQrt863YPUn5871A9M+627+CYITURA  
-----------end_max5_patcher-----------  

Hi,

The support for spat v4 is discontinued. I’m sending you a (tentative) patch for b-format to binaural conversion using spat v5. (I hope you can upgrade)
The main limitation (was in v4, and still in v5) is that the B-format (or HOA) stream needs to be decoded over a set of virtual loudspeakers, prior to binauralization. There is yet no support for “direct transcoding” from Ambisonics to binaural (a pity).

The attached patcher is mostly “pedagogical”. Feel free to adapt it to your needs.
Also, have a look at “spat5.tuto-bformat” for additional information.

Best,
T.

b-to-binaural.maxpat (52.3 KB)