Ambisonic reverb

Hi
I’ve been doing ambisonic FOA reverbs using AmbiVerbSC. Now I`m trying with HOA3 and, as I read, it’s necessary to exchange format. I did as indicate in decode HOA3 to FOA (Help/Ambisonic Format Exchange). In Spherical Decomposition (Help) the process is presented as decomposition (spherical to angular) and recomposition (angular to spherical). Neither work. The best answer would be a reverb ugen doing all the stuff under the hood, but I think it doesn’t exist yet.

Here is the code

sig = In.ar(out, 8);
sig = HoaDecodeMatrix.ar(
		HoaNFCtrl.ar(
			sig.keep(AtkFoa.defaultOrder.asHoaOrder.size),
			AtkHoa.refRadius,
			1.5,
			AtkFoa.defaultOrder
			),
	            
                          HoaMatrixDecoder.newFormat(AtkFoa.format, AtkFoa.defaultOrder)
	    
		);

var sigRv = AmbiVerbSC.ar(sig, 0.8, 0.8);

var sigEnc = HoaNFDist.ar(
                      HoaEncodeMatrix.ar(
                                  sigRv, 
                                  HoaMatrixEncoder.newFormat(AtkFoa.format, AtkFoa.defaultOrder)
                                ), 
                       AtkFoa.defaultOrder
                     );

result in:
ERROR: [HoaUGen] In number of channels (4) does not match expected numInputs (16).
The question is: is it possible HOA3 → FOA(truncate HOA1) ->AmbiVerbSC->HOA1->HOA3?
I also tried with .newSphericalDesign doing spherical to angular and angular to spherical. it doesn’t work either.
Thanks for any help

Marcelo

Just as a side note, the IEM plugins have a nice HOA reverb (Plug-in Descriptions). I have been using that one a lot (with VSTPlugin).

Hello Marcelo,

There error you’re seeing is that an HoaUGen is expecting 16 channels for a 3rd order input, but is only receiving 4.

For using AmbiVerbSC with HOA3 there are a few issues here to deal with:

  1. conversion of HOA3 to FOA, as AmbiVerbSC requires FOA as input
  2. re-injection of FOA reverb to HOA3

The first of these is fairly simple.

decode HOA3 to FOA illustrates that process. The returned ~myFoa can be directly fed into AmbiVerbSC, a la:

~myAmbiVerbFoa = AmbiVerbSC.ar(~myFoa, .... );

The resulting reverberated signal is FOA.

To get back into the ATK’s HOA format world (acn-n3d, ref radius = 1.5), you’ll then need to re-exchange the format. (NOTE, you’ll only be going into HOA1; further step will be required to get back up to HOA3.)

Use the example illustrated in encode HOA1 from FOA to get back into the ATK’s HOA world.


The reverb returned by AmbiVerbSC is only first order.

Spherical decomposition & recomposition is one way to further fiddle with the phase to turn the HOA1 result into HOA3. The process would look like:

  1. decompose HOA1 from spherical domain to angular domain
  2. Allpass the individual angular channels
  3. recompose individual channels to HOA3

Some details…

For step 1., you’ll need to decompose with respect to the target order, HOA3. The t-design we need would be:

~targetOrder = 3;
~optimize = \spreadE;
~tdesign = TDesign.newHoa(optimize: ~optimize, order: ~targetOrder);

This will return 24 separate virtual loudspeaker / microphone channels.

For step 2., then just apply individual Schroeder allpass reverberators (AllpassC, or AllpassN), with individual parameter settings to each angular channel. The goal is to fuzzy up the phase for each of the channels, which will then add extra spatial info to make our HOA1 reverb into HOA3.

Step 3. is to now compose the fuzzed up 24 angular channels into HOA3. The example here should suffice.


The best answer would be a reverb ugen doing all the stuff under the hood, but I think it doesn’t exist yet.

If you feel compelled, you could file an issue with AmbiVerbSC, requesting an HOA version be developed. One under the hood solution would look like what I’ve described here… but there are other possibilities. (Here’s a discussion of what to do to adapt reverb architectures to Ambisonics.)