[PD] Help with panning and spatialization objects, VBAP and stuff.

Alexandre Torres Porres porres at gmail.com
Mon Dec 18 21:27:05 CET 2023


Ok folks, this is a long email of me trying to figure out different options
for panning and spatialization, and with some questions. I'm planning to
offer some spatialization objects for ELSE. With the new cool features of
MultiChannel Connections in Pd, I wanna offer objects that can spatiaze
with an arbitrary number of channel outputs in a single connection.

I see I'll have to get into "ambisonics", but first I am checking "VBAP",
and some options we already have out there in the world. About VBAP by V.
Pulkki see: http://legacy.spa.aalto.fi/research/cat/vbap/

So, there's a "vbap" library that used to come with the late Pd-extended.
This is a control object, for 2D and 3D configurations that you set with
messages. It outputs lists with speaker number and gain, so you can use
[route] to send gain values for each output. It has the parameters of:
"azimuth" (which is for both 2D and 3D and represents the angular
distribution around the listener); "elevation" (only for 3D and represents
speakers above or below); and "spread", which spreads the sound to adjacent
speakers. Now, the disposition of speakers in this way should be equidistant
around the listener, for a ring or semi ring distribution in 2D, and a dome
or semi dome in 3D!

There's an external for SC which seems to work the same way, with the same
parameters, but it already takes the input and it spits the spatialized
channel outputs.

There's also a couple of externals by Pierre Gullot at
https://github.com/pierreguillot/vbap - The vbap.coeff object is very
similar to extended's [vbap], but it has no spread value (unfortunately)
and [vbap~] is a nice and much more convenient solution that takes the
audio input and already pans it, like in SC, but it also misses the
"spread" parameter. I don't know why it misses this, seems like a cool
feature...

There's also the CICM tools library, that I uploaded to deken a few years
ago, it has an external that is also named [vbap~], but it's different from
Pierre's. First, it is only 2D! But then, in the 2D world, it is more
versatile and has more features! You don't need to set the speakers in a
circular ring or partial ring that are equidistant to the center point! So
yeah, you can configure a speaker disposition in a rectangular room and do
other crazy stuff. It does not have a 'spread' parameter per se, but you
can move the sound in the 2D space with cartesian coordinates (or polar)
and you can also set a central disk radius. I have to study better how
these different parameters actually work, but  it kinda 'spreads' the sound
over different speakers. Nonetheless it doesn't really seem like an actual
"spread" parameter and I wonder if such a parameter could also be included
here. Anyway, As you can see, this is the "odd one out", and I wonder
why... I kinda like its versatility better. As for a 3D version, I haven't
seen one that would work like this object where you could have a 3D point
in the 3D space...

By the way, CICM tools has 2 other objects, but for ambisonics: [ambipan~]
and [ambicube~]. The [ambipan~] object is much much like [vbpan~], so it
spatializes in the 2D plane and you can set a specific point, not just an
angle. It seems just to change the algorithm/calculation. The [ambicube~]
object is highly related to [ambipan~], but 3D and you can set a point in
the 3D space. The caveat is that it is fixed to a specific 8 speaker
configuration, unfortunately. All the other objects can have arbitrary
number of speakers and configuration.

The AudioLab library has a [pp.spat8~] object as a vanilla abstraction.
It's fixed  to 8 speakers, not surprisingly, but you can set speaker
position arbitrarily with a GUI. You can set a cartesian point and it has a
spread parameter. So it relates to things from above, but I bet it has
nothing to do with "VBAP". It's just a panner with a spread parameter,
right?

So, I really know nothing about VBAP or Ambisonics, but I'm starting to
offer some spatialization objects for ELSE. I had so far only some very
modest routing options, like [xgate2~], which you can use to route to
different speakers with crossfading. I also added now a spread parameter
and a MultiChannel connection aware version.

I already have a new object that is like SuperCollider's PanAZ. It's
similar to [xgate2~] but it's circular, and you can only set the angle and
a spread parameter. That is, you cannot set a cartesian coordinate. The
speakers are equidistant and equally spaced in terms of angles. This is
actually highly related in terms of parameters to extended's [vbap] in the
2D version, the only restriction is that you cannot arbitrarily set the
disposition of speakers, but it's also a start. I believe it can't compare
to an actual "VBAP" though.

I have [pan4~] which is not really good as I see it. It's like
SuperCollider's Pan4 object and you can set a cartesian coordinate. There's
also [pan8~] in ELSE, which expands from [pan4~] and has a spread parameter
and it is also a simplified version of [pp.spat8~]. I could make it with an
arbitrary number of speakers and MultiChannel aware, but it would restrict
to a circular distribution, with equidistant speakers and also equally
divided in angle disposition. It would, nonetheless, expand from the [pan~]
object, and offer another dimension besides only angle/azimuth (like PanAZ
from SC). I should offer just this more versatile object than. First
question is, should this be called a "spatializer" and not a "panner"? It's
a bit like 2D VBAP but it doesn't really compare, right?

Next step would be to offer a real VBAP external. Final step would be
getting involved with "ambisonics". I could start with a 2D VBAP, based on
options we have, but I would like to be able to gather the best of all
worlds I found.
- Different room shapes with speaker position, not only angles for a ring
or semi ring setup
- Being able to set a point in the plane and not only an 'azymuth' panner.
- Being able to use an 'actual' spread parameter.

What I don't understand is why only CICM tools' [vbapan~] object has the
option to set a cartesian point. And also why it can set an
arbitrary disposition of speakers that is not just a single ring. Does
anybody know why? Is the spread parameter in here somehow in a different or
can I also include it?

Does anybody have other external options of similar objects that I
mentioned here for me to look at? It can be a MAX object or whatever.

Also, good reference for spatialization tutorials and stuff is highly
welcome.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20231218/5b4c3bc8/attachment.htm>


More information about the Pd-list mailing list