Quad panner with width control

Hawthorn's icon

Hi all,

I've got a concert coming up and I've design a "wide stereo" quad system: 4 speakers in an arc, so I've got sort of a "far left", "inner left", "inner right", "far right" setup. I'm trying to write a M4L panner device which would be easy if it were simply a slider: use a few [scale] or [zmap] to control [gain~] objects. [mc.mixdown~ 4 @pancontrolmode 1] also works. However, I want to also incorporate width. So that a signal can be sent to, say, the inner two, or all four, etc.

[rslider] gives me the upper and lower values, which works for the outer speakers: "far left" always looks at the lower value to see if it's within a range of, say, 0. and 40. and "far right" looks for 86. to 128.

The inner two speakers, though, are more complicated. They need to look at either the upper value or the lower value. Or maybe they look at the center value (upper + lower / 2)? Or they need to somehow look at both the upper and lower values? For example, if the lower value is at 1 and upper value is at, say, 50, I want both left speakers to be fed the signal. If that upper value extends to, say, 70 and the lower value stays at 1, I would want all three speakers (far left, inner left, and inner right) to turn on, but if the inner left speaker is only watching the upper value, 70 would be outside its range and it would turn off. And I think I can imagine scenarios using the lower value or the middle value that would also fail.

Here's what I've got so far, I think I'm close-ish:

Max Patch
Copy patch and select New From Clipboard in Max.

Source Audio's icon

whatever you end up using, setting slider to 158 will boost 7.4 db,

and your signal might distort.

Hawthorn's icon

Yeah, downside to using [scale] is no clipping like zmap, but I needed the inverted scaling. That’s on the list to fix, but less important that the general issue of width.

Roman Thilenius's icon

while this somewhat works, it will not much be any much more work to use either a vbap soundfield panner or a regular matrix with a dedicated surround panner.

"quad panner" is a useful search term here in the forums and should bring up various examples.

Source Audio's icon

do you need mono channel spread between 4 speakers,

or stereo signal which needs to balance between 2 inner and outer pairs

to mimick "width" ?

Hawthorn's icon

@Roman, thanks, I'll look a little harder, but on first look, nothing addressed width in quite the way I'm imagining it. Quad panner often assumes 4 corners of a room, from what I can tell. Happy to be directed elsewhere if I missed a post.

@Source, ideally it's both. But I'd happily settle for mono with width and pan and then probably I'd build a stereo version that is just width (moving the stereo source from inner pair to outer pair). I'll build your patch and take a look - thank you!

Roman Thilenius's icon

there are multiple concepts how and what to pan, even for a simply dolby matrix format.
but the only ones which allow a "wideness" parameter are VPAB and ambisonics, where VPAB works best for circular panning and in ambisonics it is based on the recorded material.
(matrix formats for that matter are not even uniform, they have a front and a rear)

your basic idea to convert the values from one slider to the amplification values for all 4 speakers seems right, and it is also a good idea to use a rangeslider in the first prototype (wysiwyg!), but the math used (linear crossfades) is not ideal, as this does not even make a square.

you should also be aware that a width of 0 (only one speaker) can not be panned at all, and a width of 25% (2 speakers) can also not be panned i an ideal way.
the minimum width to obtain equal amplitude when changin the panning position must already be greater than 180°/number of speakers.

otoh it might be fine like that in case you do not want to modulate the pan position... or the width...


Source Audio's icon

In real world all this whatever named equal power , ambi, bambi work or fail

to what one's ears want to hear depending on speaker placement,

and many other factors.

And how much of the listenning surface can benefit from it at all.

So I'd say make it simple as possible, and fine adjust after

testing in real space.

Hawthorn's icon

OK, what I did was in fact adapt the existing quad panner: I adapted a single dial to sweep from the "Rear L" through "Main L", "Main R" and to the "Rear R", then did some math for "width" to start to pull wherever the pan dial is in towards the middle of the panner, which hits all speakers. It's not a clean patch, but it looks like it works, hopefully it'll sound good too! Thanks, both, for the help.

Max Patch
Copy patch and select New From Clipboard in Max.

Roman Thilenius's icon

that´s the "4 stereo panners" method and will work fine for moving a source in a rectangular shape.

Source Audio's icon

Are you not getting too much attenuation in the middle ?

not that I find it wrong ...

here is most simple panner that sends mono channel to close or wide

pairs of speakers.

Max Patch
Copy patch and select New From Clipboard in Max.

midi 0 - 127 is not really having a middle, but one can solve that if you really need a middle point

Roman Thilenius's icon

a rough approximation of the wideness parameter could also be achieved by simply mixing the audio signals from the outmost movement against a mono (=same amplitude for all channels) signal.

another idea would be to treat the 4 speakers as 2 axis in order to represent any point within the square.

and it is always easier to do all of these things in a range of 0.-1.