Ambisonic Tool Kit question

Hi,
Is there a difference between encoding with the newDirection() method like this:

sig = FoaEncode.ar(sig, FoaEncoderMatrix.newDirection(angle, azim));

or using the newOmni() method and applying a push transformation like this:

sig = FoaEncode.ar(sig, FoaEncoderMatrix.newOmni);
sig = FoaTransform.ar(sig, ‘push’, angle, azim);

Will one of them be more suitable for dynamic angle and azim values?

Note that I messed up the parameters. It should be:

sig = FoaEncode.ar(sig, FoaEncoderMatrix.newDirection(azim, elevation));

versus:

sig = FoaEncode.ar(sig, FoaEncoderMatrix.newOmni);
sig = FoaTransform.ar(sig, ‘push’, pi/2, azim, elevation);

And I concluded that the first version can not handle dynamically changing azim and elevation, while the second can. Because the first gives the error: ERROR: not a number in Matrix-put

It may be helpful to review the ATK’s architecture. In particular the section on static & dynamic operations.

For your use case, the Omni & Push example is what you want… which is what you’ve worked out!