The ATK workflow is encode → transform → decode, each stage operating on B-format
The Ambisonic Toolkit (ATK) for SuperCollider organises all spatial audio processing into three sequential stages. Encoding converts a mono or stereo source into a B-format signal. Transforming applies mathematical operations to the B-format signal itself — rotating the soundfield, pushing it toward a point, focusing energy. Decoding converts B-format into the channel layout required for playback (stereo, binaural, quad, etc.). Every stage passes B-format between it, so transformations are modular and composable. Keeping the signal in B-format as long as possible is correct practice: decode only at the last step, just before playback. This separation of concerns is what makes the ATK powerful: you can swap a binaural decoder for a quad decoder without touching the encoding or transformation steps.
Examples
SuperCollider skeleton: var enc = FoaEncoderMatrix.newDirection(0,0); var dec = FoaDecoderMatrix.newStereo(55.degrad,'cardioid'); SynthDef(\test,{var src = SoundIn.ar(0); var bfmt = FoaEncode.ar(src,enc); var rot = FoaRotate.ar(bfmt, LFSaw.kr(0.1,0,pi)); Out.ar(0, FoaDecode.ar(rot,dec))}).play.
Assessment
Draw the three-stage ATK signal chain and label the channel count at each stage for a stereo output scenario. Then explain why swapping only the decoder step changes the speaker topology.