Error when trying to generate binaural sound with ATK

I get a strange error when trying to generate binaural output with the ATK.
This is what I do:

// test binaural
(
{
	var sig;
	var bsig;
	var azi, ele;

    azi = MouseX.kr(pi, -pi);
    ele = MouseY.kr(-pi/2, pi/2);

	// test signal
	//sig = Decay.ar(Dust.ar(20), 0.01, WhiteNoise.ar(0.5));
	sig = WhiteNoise.ar(0.1);

	// encode
	bsig = FoaEncode.ar(sig, FoaEncoderMatrix.newOmni);
	bsig = FoaTransform.ar(bsig, 'push', pi/2, azi, ele);

	// decode
	sig = FoaDecode.ar(bsig, FoaDecoderKernel.newCIPIC(21,s));

	Out.ar(0,sig);

}.play
)

The error I get is:
ERROR: Convolution2 arg: ‘framesize’ has bad input: nil
I have no idea where this comes from.
Any suggestions?

IIUC the FoaDecoderKernel should be prepared in advance, outside the SynthDef, then referenced in the SynthDef.

FoaDecoderKernel loading is asynchronous, so you can’t stick this operation in just anywhere.

hjh

Thanks, that was the problem.

Thanks @jamshark70 for the quick answer!

As a reminder, the ATK offers online Guides & Tutorials.

And, an example of using the binaural decoder can be found here.