acoustics-code-salford / uas-sound-propagation

Render movement events from static hover UAS source recordings
GNU General Public License v3.0
1 stars 0 forks source link

Ambisonic Panning #4

Closed marc1701 closed 1 year ago

marc1701 commented 1 year ago

Task

Add spatialisation method to render flyby events as plane waves in higher-order Ambisonics.

marc1701 commented 1 year ago

I have now implemented basic Ambisonic panning by multiplying the monaural rendering with the Ambisonic components for DOA values averaged per frame. This is the same mechanism by which angle-dependent low pass filters are selected and applied to the ground reflection signal.

At present, the code to generate the spherical harmonics has been copy-pasted from Ambidecstrous. It would be nice if this library could refer to that one rather than having to copy in the code.

This also needs testing - presently the UHJ rendering has the drone flying from and back to the same direction, rather than 'overhead'. The first thing to try would be a rendering in the Y direction rather than X, and if this doesn't result in a proper flyby effect, perhaps looking at how the angles are passed to the SH generator to make sure it's receiving the correct angles without any kind of weird rectification or quadrant issues.

marc1701 commented 1 year ago

Source of problem is use of WYZX (ACN) channel ordering. UHJ processing renders as expected when WXYZ (FuMa) ordering used. This is weird...

marc1701 commented 1 year ago

Update: looks like I got phi and theta the wrong way around when generating the SH arrays :-| Still getting strange artefacts where source doesn't pan as smoothly as expected in UHJ rendering. Could this be an artefact of UHJ process? Going to dig out PWD source tracking code for reference.

marc1701 commented 1 year ago

Having issues properly calculating PWD as definition of SHs now different between current and old shbeamforming code. Plotting maps calculated using both definitions of SH, I am confident that the spatialisation is happening as per expectations. It is going to be difficult to properly test this until I get access to the rig. I will provisionally close this ticket for now as numerically it looks to be working and I feel I've done all I can for now.