Matlab Code

This page contains Matlab scripts that came out of some of the research I’ve done during my thesis and beyond.

There are two scripts to generate the vector directions for the extended energy vector, one which calculates the perceptual/precedence weights and one which calculates the vector direction using these weights. They could be combined to a single .m file but I’ve kept them separate to allow the perceptual/precedence weights to be used in other (hopefully upcoming) functions independently.

You can download the Matlab code here: Download (.zip)

And you can read the documentation here: Documentation

The download also includes a function (ambiGains) that calculates 2D Ambisonics gains that you’ll need if you want to recreate the code from the documentation page. It’s probably not the most elegant implementation, but it should work. For a more complete library of HOA and VBAP functions I’d highly recommend the work of Archontis Politis, available on github.

As a taster, here’s a localisation quality map across the listening area for a third order Ambisonics system:

maxrE_order_3_az_30

You can see some animated versions here.

If you use the code for any research please cite the appropriate JAES paper and get in touch to let me know about your research. I’d be very happy to hear about your results with it!

If you have questions, suggestions or find any bugs then feel free to get in touch.