Discussion:
2D regular/irregular grid VBAP UGen
Hanns Holger Rutz
2014-09-08 15:56:59 UTC
Permalink
hey there,

a quick question: if I have a speakers on a 2D grid, roughly in
'triangular' decomposition; is there a VBAP plugin or something similar
that gives me relative gain factors for example of the nearest three or
four speakers wrt a given 2D "source" coordinate, using some standard
panning/weighting function.

i know i can of course calculate the euclidean distance of the source
towards all channels (that would be 48 in this case), but in terms of
CPU usage, i'd prefer to work lets say with three Select.ar UGens and
three `*` BinaryOpUGens...

thanks, .h.h.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Scott Wilson
2014-09-08 16:16:22 UTC
Permalink
Ugly:

Fake it onto a portion of a VBAP sphere. If you assume a very large radius your gains won’t be far wrong.

Prettier:

Use KDTree to get nearest 3 speakers and weight for distance using your preferred method.

N.B. Be clear what you’re trying to do. If your speakers are not equidistant from the listening point (i.e. if it’s a flat plane rather than an arc around the listener) equal power panning will cease to work properly as you move away from the centre and towards the edges (at the point where the ATDs exceed the threshold past which precedence effect kicks in.) If your speakers are fairly close this may not be a big deal, but worth bearing in mind.

S.
Post by Hanns Holger Rutz
hey there,
a quick question: if I have a speakers on a 2D grid, roughly in
'triangular' decomposition; is there a VBAP plugin or something similar
that gives me relative gain factors for example of the nearest three or
four speakers wrt a given 2D "source" coordinate, using some standard
panning/weighting function.
i know i can of course calculate the euclidean distance of the source
towards all channels (that would be 48 in this case), but in terms of
CPU usage, i'd prefer to work lets say with three Select.ar UGens and
three `*` BinaryOpUGens...
thanks, .h.h.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Hanns Holger Rutz
2014-09-08 17:08:42 UTC
Permalink
thanks scott,

my layout looks roughly like the diagram attached. so my idea is to
use the solid triangles to determine the three channels used for any
point contained within that triangle.

since this a regular structure using a spatial index like KD-tree
seems a bit of an overkill. probably there is some easy math to
determine the
indices, just using functions like floor, modulus, div. I have a vague
memory that the original VBAP formulas are defined for such a triangle
decomposition...

best, .h.h.
Post by Scott Wilson
Fake it onto a portion of a VBAP sphere. If you assume a very large
radius your gains won’t be far wrong.
Use KDTree to get nearest 3 speakers and weight for distance using your preferred method.
N.B. Be clear what you’re trying to do. If your speakers are not
equidistant from the listening point (i.e. if it’s a flat plane
rather than an arc around the listener) equal power panning will
cease to work properly as you move away from the centre and towards
the edges (at the point where the ATDs exceed the threshold past
which precedence effect kicks in.) If your speakers are fairly
close this may not be a big deal, but worth bearing in mind.
S.
Post by Hanns Holger Rutz
hey there,
a quick question: if I have a speakers on a 2D grid, roughly in
'triangular' decomposition; is there a VBAP plugin or something
similar that gives me relative gain factors for example of the
nearest three or four speakers wrt a given 2D "source"
coordinate, using some standard panning/weighting function.
i know i can of course calculate the euclidean distance of the
source towards all channels (that would be 48 in this case), but
in terms of CPU usage, i'd prefer to work lets say with three
Select.ar UGens and three `*` BinaryOpUGens...
thanks, .h.h.
_______________________________________________ sc-users mailing
list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
_______________________________________________ sc-users mailing
list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
http://www.listarc.bham.ac.uk/lists/sc-users/search/
Scott Wilson
2014-09-08 17:28:56 UTC
Permalink
Yes, probably faster, especially with a small number of speakers.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
thanks scott,
my layout looks roughly like the diagram attached. so my idea is to
use the solid triangles to determine the three channels used for any
point contained within that triangle.
since this a regular structure using a spatial index like KD-tree
seems a bit of an overkill. probably there is some easy math to
determine the
indices, just using functions like floor, modulus, div. I have a vague
memory that the original VBAP formulas are defined for such a triangle
decomposition...
best, .h.h.
Post by Scott Wilson
Fake it onto a portion of a VBAP sphere. If you assume a very large
radius your gains won’t be far wrong.
Use KDTree to get nearest 3 speakers and weight for distance using your preferred method.
N.B. Be clear what you’re trying to do. If your speakers are not
equidistant from the listening point (i.e. if it’s a flat plane
rather than an arc around the listener) equal power panning will
cease to work properly as you move away from the centre and towards
the edges (at the point where the ATDs exceed the threshold past
which precedence effect kicks in.) If your speakers are fairly
close this may not be a big deal, but worth bearing in mind.
S.
Post by Hanns Holger Rutz
hey there,
a quick question: if I have a speakers on a 2D grid, roughly in
'triangular' decomposition; is there a VBAP plugin or something
similar that gives me relative gain factors for example of the
nearest three or four speakers wrt a given 2D "source"
coordinate, using some standard panning/weighting function.
i know i can of course calculate the euclidean distance of the
source towards all channels (that would be 48 in this case), but
in terms of CPU usage, i'd prefer to work lets say with three
Select.ar UGens and three `*` BinaryOpUGens...
thanks, .h.h.
_______________________________________________ sc-users mailing
list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
_______________________________________________ sc-users mailing
list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
http://www.listarc.bham.ac.uk/lists/sc-users/search/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJUDeKaAAoJEKZFmaPaYk6Qi84P/28hf3YrrqrCi+DyCVNrxFr/
33SNFcrWZXxfQoTzK4MBVvnBhoc8Aeh1tsAMpsraVuW80fKp4ZHL/9bhR63O9j18
QHEoEWflN5pIOpAnF+d1rEMf3lGpdOTyH8ZPywVM19YOdzHEe5Qq1/lzjqRMWj7X
eY8n0VRd1HZB7Am/LRcIWbqMPw8Pxl5WwoAy9WDTdnQynxF9SHz5IznFCGoy12Qa
RlBc1xbXcTbZWPrS4xs01k1pda6DWite4QysT42/8Vwh8IZ0/NamhuHREk2Ggfxq
mKIXeCgSDqipYOPtebR8u1sD9FX91KO21D1drRXt1IST+bTW4kes2Z/NVI8rsukT
bl1P3/jponKn5yNC/f/mCjfDzoZAaavGVt+ryefjQlb2T5/Y3O84VXkUQWhlwIF8
iMES9j4MM7nbu3onCsEC0NocfiOMnR5JaJ7STWRpSuNQ6ymcxAdFRKLsN3X666MJ
06rm9DmdOj8D6P7DEWt9Ol/azy1WRRQNTKMkqLvnQH7+cpnanxu/pE+wFGOQL98g
sUT2NRQjAGIPUTiXXL6Hdh+nJnB7tFpv6uj6GSylZazpICOI4mUqikv0e0GQOIor
MhzAtV327YYBGKk4hTqzF4ZkPY1KufWfzgMITYNidRu31r1ncjMbsAN73ePaV1la
f1j3Q5sAz6xdo+n5kZQu
=NrV7
-----END PGP SIGNATURE-----
<path4804.png>
<path4804.png.sig>
_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Hanns Holger Rutz
2014-09-08 17:51:38 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think this is the Q&A:
https://stackoverflow.com/questions/8043947/indexing-in-equilateral-triangle-grid-given-simple-2d-cartesian-coordinates

(going to verify this now)
Post by Hanns Holger Rutz
thanks scott,
my layout looks roughly like the diagram attached. so my idea is
to use the solid triangles to determine the three channels used for
any point contained within that triangle.
since this a regular structure using a spatial index like KD-tree
seems a bit of an overkill. probably there is some easy math to
determine the indices, just using functions like floor, modulus,
div. I have a vague memory that the original VBAP formulas are
defined for such a triangle decomposition...
best, .h.h.
Post by Scott Wilson
Fake it onto a portion of a VBAP sphere. If you assume a very
large radius your gains won’t be far wrong.
Use KDTree to get nearest 3 speakers and weight for distance
using your preferred method.
N.B. Be clear what you’re trying to do. If your speakers are not
equidistant from the listening point (i.e. if it’s a flat plane
rather than an arc around the listener) equal power panning will
cease to work properly as you move away from the centre and
towards the edges (at the point where the ATDs exceed the
threshold past which precedence effect kicks in.) If your
speakers are fairly close this may not be a big deal, but worth
bearing in mind.
S.
Post by Hanns Holger Rutz
hey there,
a quick question: if I have a speakers on a 2D grid, roughly in
'triangular' decomposition; is there a VBAP plugin or
something similar that gives me relative gain factors for
example of the nearest three or four speakers wrt a given 2D
"source" coordinate, using some standard panning/weighting
function.
i know i can of course calculate the euclidean distance of the
source towards all channels (that would be 48 in this case),
but in terms of CPU usage, i'd prefer to work lets say with
three Select.ar UGens and three `*` BinaryOpUGens...
thanks, .h.h.
_______________________________________________ sc-users
mailing list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
_______________________________________________ sc-users mailing
list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJUDeyqAAoJEKZFmaPaYk6QnccP/3WSSH0Exz0HsN3iG6aN/SxB
nu/jDnp4TgS2PE7BMRcl5aSB250AVP8RrtXfXSaLKdIY6fnUG2ZwbKlvgtuqyWWV
NmNjuSbDfCLg+SV2YzeED6CYondGMnA2gPz1lGQCOph3mKkPmBB9Gyafo5V+sXlU
cx7s9Q/9sy9UsWdARMbdJ78/pRmeK+ZwhLcoEDVnBxytVQ5peH9kDkbE56ppHDsu
5oiVODyenDXoxdESIksm5dicb+QL4dj30e+3aH8833Tc1FifdNn9kJNHPx/bp6Ha
fvDKr5sWwnjGEMIF5e+c++S3yXpwPbd/q/VUa1lS74R4QkFClClRbcCocNpIwhQF
A6LvHcjRxiTCqpUe2upqSE07l8gZJKd9RUu7u99lmKRqNNTwZNBG5eLdh7OhdjeF
IHclZS4MmcRaxTym5B30K7eHkRI/k1zj5TksRS+VE6PpoAZin12aqJ0i0JYF8KCS
gkWCvGom44N2V/4rPj+NESWWsZBc4+wAbmVw9ttHbrxZA9HSCLWRjU/aU4tShSwA
DmCQshrBR4r5qnH4sbe+Voma1/RiRZE9lVZtrmWWFL2e/qtQcjAa4rIyVtX8Tokg
OAweKzD7vQlWUAIS+oG1ZJUn23nWSvMucRuqyCMzghRVgLMvVkZVm8/bjqFCEFxv
deoMx82eRIv+TvOgdw/O
=iBsa
-----END PGP SIGNATURE-----

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/

Loading...