hey, i have this multichannel signal distributed round robin to 4 or 5 channels (center + 4 channels) with pan positions for `PanAz`

.

At the moment im using these 4 or 5 input channels (center + 4 channels) into `PanAz`

with 2 output channels.

```
(
var timingInformation = { |maxOverlap, trig, grainRate|
var rate = if(trig.rate == \audio, \ar, \kr);
var arrayOfTrigsAndPhases = maxOverlap.collect{ |i|
var localTrig = PulseDivider.perform(rate, trig, maxOverlap, i);
var hasTriggered = PulseCount.perform(rate, localTrig) > 0;
var localPhase = Sweep.perform(rate, localTrig, grainRate * hasTriggered);
[localTrig, localPhase];
};
var trigsAndPhasesArray = arrayOfTrigsAndPhases.flop;
(\trigger: trigsAndPhasesArray[0], \phase: trigsAndPhasesArray[1]).postln
};
var channelMask = { |trig, channelMask, centerMask|
var channelsArray = [
Dser([-0.25], channelMask),
Dser([0.25], channelMask),
Dser([0.75], channelMask),
Dser([-0.75], channelMask),
Dser([0], centerMask)
];
Demand.ar(trig, 0, Dseq(channelsArray, inf)).lag(0.001);
};
var decoder = FoaDecoderMatrix.newStereo((131/2).degrad, 0.5);
var encoder = FoaEncoderMatrix.newOmni;
{
var maxOverlap = 4;
var tFreq = \tFreq.kr(100);
var trig = Impulse.ar(tFreq);
var grainFreq = \grainFreq.kr(400);
var grainRate = grainFreq / \overlap.kr(4);
var timings = timingInformation.(maxOverlap, trig, grainRate);
var pan = channelMask.(timings.trigger, \channelMask.kr(1), \centerMask.kr(0));
var grainWindow = (1 - (timings.phase * 2pi).cos) / 2 * (timings.phase < 1);
var sig = SinOsc.ar(grainFreq);
sig = sig * grainWindow;
sig = PanAz.ar(2, sig, pan);
/*
sig = FoaEncode.ar(sig, encoder);
sig = FoaTransform.ar(sig, 'pushX', LFNoise2.kr(0.1).linlin(-1, 1, pi/2, 0));
sig = FoaTransform.ar(sig, 'rotate', LFSaw.kr(0.1).linlin(-1, 1, pi, -pi));
sig = FoaDecode.ar(sig, decoder);
*/
}.plot(0.1);
)
```

I would like to know how to setup a First Order Ambisonic System with Encoder, Transformer and Decoder so i could use this with my stereo setup at home but could also scale the output channels later for a multichannel speaker setup instead.

what Encoder should i choose and what are the correct panning positions for the 5 panning positions?

thanks