home/ atoms/ foa-panning-foapanb

FoaPanB encodes a mono signal to FOA B-format with a dynamically modulatable azimuth and elevation

FoaPanB is the simplest FOA encoding UGen: it takes a monophonic signal and two angular arguments (azimuth and elevation in radians) and outputs a 4-channel W/X/Y/Z B-format signal. Its key advantage over FoaEncoderMatrix.newDirection is that the azimuth and elevation arguments accept UGen inputs, enabling real-time modulation — making it the natural tool for animated or spatially moving sources. It is conceptually the B-format equivalent of a stereo panner. The limitation is that it only handles mono input; for stereo or multi-source encoding, the matrix-based encoders are needed. In practice, FoaPanB and FoaRotate can often achieve similar results for a single moving mono source; FoaPanB is simpler when the encoding direction itself changes dynamically.

Examples

var bfmt = FoaPanB.ar(src, azimuth: LFSaw.kr(0.1, 0, pi), elevation: 0) — slowly rotates a source around the listener. Replacing FoaEncode with FoaPanB in any single-mono-source SynthDef is a drop-in simplification.

Assessment

Rewrite a SynthDef that uses FoaEncode.ar(src, FoaEncoderMatrix.newDirection(az,el)) to use FoaPanB instead. Then identify a use case where FoaPanB cannot replace FoaEncoderMatrix.

“we do have the alternative option of using FoaPanB, so let me just quickly show what that would look like. It's a very simple change, we replace FoaEncode with FoaPanB, providing the monophonic signal, followed by azimuth and elev”
corpus · eli-fieldsteel-supercollider-tutorials-youtube-playlist · chunk 3