Game Development Community

Stereo sound panning

by Vern Jensen · in Torque Game Builder · 06/20/2006 (2:14 pm) · 2 replies

I just looked through the TGB Reference at the Audio section (which BTW is buried under the "Console Funtions" section, making it hard to find without a search), and I'm disappointed to see there seems to be no support for stereo positioning of a sound. (That is, playing the sound at say 70% volume in the left speakers, but 30% in the right, or whatnot.) Is this true?

If so, I certainly hope this feature can be added to future versions. It's a very nice effect to have objects on the left side of the screen "sound" like they're on the left side... and hear that panning change as the creatures moves across the screen.

Please note: I'm not asking for the ability to play sound effects that have stereo information built into them. I'm sure this is already possible. I'm asking for the ability to change, at run-time, the stereo "location" of the sound in terms of speaker left vs. right volume.)

-Vern

#1
06/20/2006 (2:25 pm)
Taking a mono sound and panning it all over the place is fairly easy.
It is part of the basic OpenAl functionality, all you need to do is create a script function to place the sounds properly, and add the panning value to the object's movement functions.

If you are a registered TGB or TGE owner, just do a quick search for OPENAL on the Garagegames private forums. You should find all you need right there, which includes panning AND real-time pitch shifting.
#2
06/20/2006 (5:39 pm)
I tried doing a search, but came up with simply lost of requests to do the exact same thing, from users in 2005. Has there been progress since then? I see OpenAL documentation in the Reference.pdf, but I'm not sure how to use it to do panning. Could you point me to a specific thread URL where they explain this?

-Vern