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 =, -pi);
    ele =, pi/2);

	// test signal
	//sig =, 0.01,;
	sig =;

	// encode
	bsig =, FoaEncoderMatrix.newOmni);
	bsig =, 'push', pi/2, azi, ele);

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


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.


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.