« Return to Thread: new panning algorithm

Re: new panning algorithm

by Christian Borss :: Rate this Message:

Reply to Author | View in Thread

Dear OpenAL hackers,

Am 24. Okt. 2008 um 18:38 Uhr schrieb Chris Robinson:

>> [patch for new panning algorithm]
>
>Thanks for taking the time to work on this code. Unfortunately the patch won't
>apply because of some changes I've done to the mixer since 1.5 was released.
>I don't want to try to push in such changes before OpenAL Soft 1.6 is
>released (which I'd like to do in about a week or so), so I probably won't be
>able to try it out before then.
>
>It does look interesting though, and I'll try to remember to look into it

As a nice task for a rainy sunday I took the time to port my panning
algorithm to OpenAL Soft 1.6. You can find my patch against the current
GIT version of openal-soft on the web server of our institute:

  http://www2.ika.rub.de/borss/openal_panning_borss_git20090118.diff

Maybe I should add some notes about what this patch does and why I
propose to include it in the repository:

My panning algorithm is intended for multi-speaker setups like a 5.1 or
7.1 surround setup. The current implementation uses only 4 of these
speakers, i.e. the front and the rear speakers, for spatial rendering.
The center and the back surround speakers are not used. What the current
implementation does is linear panning between the left and the right
speakers and in addition linear panning between the front and the rear
speakers. This may be a proper panning method for a quadrophony setup
where you have 4 speakers at +/-45° and +/-135° but for a up to date
surround system with 5 and more speakers this is a clear limitation.
Besides the limitation of the reduced number of involved speakers, the
current implementation results in displaced auditory events. A speaker
setup which conforms with the ITU-R BS.775 recommendation, has its front
speakers at +/-30° and its rear speaker at +/-110°. This is the typical
5.1 surround setup. Now, if one uses the currunt panning implementation
in combination with a typical 5.1 speaker setup, the space between the
front speakers is compressed and the space between the rear speakers is
expanded. Why does this matter? Imagine a sound source which circles
around the listener with constant speed. Due to the compression/
expansion, the auditory event (the perceived sound source) moves no
longer with constant velocity - it's slower in the frontal region and
faster in the back region.

My panning algorithm takes the speaker arrangement into account to cope
with this issue. In my implementation, the directional part of panning
values are pre-calculated and stored in a look-up-table (LUT). For
speed optimization, the resolution of this LUT is not constant. Instead
of using atanf() to determine the source direction from which the LUT
index is derived, I derive the index from the ratio |x| / ( |x| + |z| )
which is faster to compute than atanf(). I tested my algorithm with
ioquake3 in combination with the openarena data files and it worked
pretty well. The localization of the sound sources is clearly improved.
As I'm not a gamer I can't provide information about how well it works
with other games. Please give it a try and let me know if it works for
you!


Ciao,
Christian
--
Christian Borß, Dipl.-Ing.          ||   Institut für Kommunikationsakustik
http://www.ika.ruhr-uni-bochum.de   ||   Ruhr-Universität Bochum
Tel.: +49-(0)234-32-22470           ||   Universitätsstr. 150, IC1/33
Fax.: +49-(0)234-32-14165           ||   D-44780 Bochum (Germany)
_______________________________________________
Openal-devel mailing list
Openal-devel@...
http://opensource.creative.com/mailman/listinfo/openal-devel

 « Return to Thread: new panning algorithm