Jump to content
The Dark Mod Forums

surround sound with standard headphones


rich_is_bored

Recommended Posts

I bought a program called Rapture3D on impulse as it was relatively cheap and figured I would chime in here since it works in Doom 3 and by extension TDM. If you have a pair of headphones on, here's a demonstration via UT3.

 

 

This isn't a silly DSP effect you'd find in a sound card control panel. This is different in that intercepts and handles OpenAL calls and that means it's privy to 3D location data and processes each sound separately. In other words, it's done proper and isn't a marketing gimmick.

 

It only works for games that make use of OpenAL and it requires a bit of setup on a per game basis but in Doom 3's case it's pretty simple as all you have to do is change a CVar. It works in TDM as well so I'll try to put a video together later.

Link to comment
Share on other sites

Fascinating. The difference in the video is significant.

 

This instantly provokes the following question:

If such a 3d immersion can be achieved with only software, why isn't it employed as a standard in gaming? Why isn't headphone 3d provided automatically by the sound systems the games use?

 

I've a decent 5.1 sound system but must use headphones nowadays to maintain family peace. I never noticed the lack of 3d, gotta investigate this..

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Fascinating. The difference in the video is significant.

 

This instantly provokes the following question:

If such a 3d immersion can be achieved with only software, why isn't it employed as a standard in gaming? Why isn't headphone 3d provided automatically by the sound systems the games use?

 

I've a decent 5.1 sound system but must use headphones nowadays to maintain family peace. I never noticed the lack of 3d, gotta investigate this..

 

My father developed the means for convincing 3D surround through software alone and headphones / stereo speakers during the late 90s. Whilst the technology did get licensed by a couple of big players in the game market - as far as I'm aware the motion of the market was towards selling big chunks of hardware and multiple speaker set ups. The desire to make use of stereo headphones for positional 3D audio was surprisingly low.

 

PM me if you want to know more. x-D

"No proposition Euclid wrote,

No formulae the text-books know,

Will turn the bullet from your coat,

Or ward the tulwar's downward blow

Strike hard who cares—shoot straight who can—

The odds are on the cheaper man."

 

From 'Arithmetic on the Frontier' by Rudyard Kipling

Link to comment
Share on other sites

Wow, that's pretty interesting. Apparently those blueripple sound guys don't give away a lot of information about the technical backgrounds of that technique. All technical background they give is that it's "math magic". I wanna know that magic, damn it!! :D Any more detailed literature about the topic would be appreciated.

 

I was guessing they'd use angle-of-arrival dependent filtering, but on their page I read that they create some sort of soundfield, which to me sounds a lot similar to the wavefronts used in holography, only that these waves are not of the optic kind.

 

Edit: Found some interesting information about it on wikipedia. Here is the basic article and here is an article discussing the physical background. It's actually not that hard to understand...

Link to comment
Share on other sites

Something similar I've done while mixing rock band recordings is "psycho-panning". Normal panning (Left and Right placement of a sound) is all about fading volume in the left ear and volume in the right ear. It works, but doesn't sound completely "normal".

 

If I want something panned to the left...

 

  • I'll pan one copy all the way to the left. (The left ear hears the regular sound)
  • Then I'll have a second copy in the right ear with a short delay. (The right ear hears the sound a little later than the left)
  • "muffle" the right ear's equalization, and lower the volume. (The human head is a baffle that muffles high frequencies).

The end result sounds very natural and almost sounds like it's panned even further left than it was before.

 

Cool thing is that this could all be done in a video game's audio code pipeline. Very simple effects: short delay, EQ, low pass filter, volume; all accomplishable in real-time with a little algebra.

yay seuss crease touss dome in ouss nose tair

Link to comment
Share on other sites

They use HRTF in this program and the data sets used are freely available online. There's no reason it couldn't be implemented into an audio API. Technically that's actually what this program does. One question I do have however is if they've written their own propriatary version of OpenAL from scratch. That's a lot of work when they could have just downloaded the source and made some modifications. Of course, it's also illegal to sell it had they done so.

Link to comment
Share on other sites

I've thought about this idea before and to see it in action now I'm also shocked that it hasn't become standard issue. After all we only have two ears, two auditory inputs, all 5.1 does is put speakers all around the place to simulate immersion, subject to the quirks of placement (only 5.1 system I ever set up definitely didn't match up to this diagram due to spacing issues: http://en.wikipedia.org/wiki/File:5_1_channels_%28surround_sound%29_label.svg ). With headphones that are always going to be placed on the same two ears and this "math magic", you've got a superior system (high quality headphones are always going to better than speakers) that will work with existing hardware with no modification. What's the hold up? Is the math really so difficult or proprietary that all sound cards won't have this by default for headphones? Patent issues? Marketing?

Link to comment
Share on other sites

Or maybe there is simply more profit in selling a bunch of medium quality speakers than a single good quality headphones and the companies want to lean into that direction?

 

After I got my good quality sennheiser circumaurals, I've not missed using my med quality 5.1 speakers. I tested the earphones and the 3d illusion was only slightly lower than in 5.1.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

They use HRTF in this program and the data sets used are freely available online. There's no reason it couldn't be implemented into an audio API. Technically that's actually what this program does. One question I do have however is if they've written their own propriatary version of OpenAL from scratch. That's a lot of work when they could have just downloaded the source and made some modifications. Of course, it's also illegal to sell it had they done so.

Haha, so my initial guess was actually pretty precisely what they are doing. ^_^ My train of thought was, that the ear cup sort of serves as an angle-of-arrival dependent aperture, forming the spectrum of the arriving signal. But I still missed the time-difference-of-arrival (induced by the finite propagation speed of sound), and the attentuation of soundwaves with distance. However, in the technical notes on their homepage, it sounded completely different to this. With HRTF, they don't really create a soundfield at all. There aren't even any interferences between the soundwaves of the speakers, when using headphones. So maybe they still use another technique...

 

It's a real shame they didn't offer any audioprocessing lectures at my university. I've always been interested in this topic, but at my university, it's more about image processing.

 

Hmn, I wonder whether you can get your hands on some ear cup filter functions. I'd like to try and implement this myself, just for the thrill of it. :) It shouldn't be hard at all, once you have proper data.

Link to comment
Share on other sites

They use HRTF in this program and the data sets used are freely available online. There's no reason it couldn't be implemented into an audio API. Technically that's actually what this program does. One question I do have however is if they've written their own propriatary version of OpenAL from scratch. That's a lot of work when they could have just downloaded the source and made some modifications. Of course, it's also illegal to sell it had they done so.

 

I guess they could have used version before v1.1?

 

https://secure.wikimedia.org/wikipedia/en/wiki/OpenAL

 

Why oh why had they had to make OpenAL propriatary? *sigh*

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

A simple test but here it is in TDM...

 

 

And how does something open source go proprietary? If nobody really owns it who do you pay to buy up the rights?

 

If you use version before v1.1, then you can use it freely. If you want v1.1 or later, Creative seems to hold the rights to that, so you have to pay them.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

And how does something open source go proprietary? If nobody really owns it who do you pay to buy up the rights?

 

It depends who owns the copyright. If you run an open-source project but insist that all contributions have their copyright assigned to you, then you are free to re-license future versions as you wish (although you can't stop people from using older versions under the terms of the licence used to release them). This is why some people are reluctant to contribute to projects which require copyright assignment, such as most GNU projects and (I think) OpenOffice under Sun.

Link to comment
Share on other sites

  • 1 year later...

Getting back to this, now that we have the full source, would it be possible to implement something like this directly into TDM?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

As far as I know, the merge hasn't happened yet. It is one of these "Serpentine acomplishes 90%, but doesn't check it in until it reaches 99%" cases (the other one is the normal compression). Both of these things will not be done before 1.09, if ever.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I wouldn't be too down-spirited about this Tels. To my knowledge, this was something that Serpentine was pushing to have in 1.08

as it would compliment all of the new sounds added to the mod. At worst, since the work is mostly done, you could may have 1.09

be a quick bugfix release with that work included if it doesn't make it into 1.08?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

At the moment I am not even sure when v1.08 will come out - v1.09 is so far off we might not have anybody left working on it or even releasing it.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...