Jump to content
The Dark Mod Forums

[Obsolete as of TDM 2.07] Improve your TDM experience by playing with OpenAL Soft HRTF (better 3d audio)


Hiradur

Recommended Posts

Only one note :D

 

If I use the config tool included in the package it creates the alsoft.ini in appdata\roaming folder.

 

So I assume that is the correct dir, not appdata root.

 

 

Interesting, but %appdata%\alsoft.ini definitely works (I can tell from the log file).

alsoftrc.sample also says to put it there:

https://github.com/kcat/openal-soft/blob/455d5f48c0e99f6e3d7c237ee5f1570c37ec49be/alsoftrc.sample#L19

Edited by Hiradur
  • Like 1
Link to comment
Share on other sites

Yeah, Alchemy Universal is a muddy mess, if only for being proprietary bs. The modifications that make it work on all soundcards are either obsolete or trojan horses. We just have to wait until the EFX solution gets implemented in TDM for real reverb action.

 

On the 5.1 thing, this video by the Verge is all about binaural audio (which HRTF is all about) and even mentions what's the difference between 5.1 and binaural at the 4:20 mark.

 

 

I think I already had OpenAL enabled for TDM just because, but hadn't heard of these HRTF datasets. Will definitely get around to trying this.

 

edit: %appdata% IS appdata/roaming in Windows 7.

Edited by Spooks

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

Testing OpenAL Soft + HRTF in UT2004 and UT2004 64 bit.

 

It seems working with 5.1 setup too, but I left only the R and L speakers in the 5.1 speakers Windows config tool.

It is important to use such setup in so many games, it's counterintuitive - 5.1 with R&L only is NOT equivalent to stereo - but necessary (try Skyrim and let the awe conquer you :D ).

 

image.jpg

Edited by lowenz
  • Like 2

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

P.S. I used alsoft-config (it's in the OpenAL soft package), it's perfect and you don't need to move or edit files around :D

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

I don't get it...do you still get surround sound if you turn off the other speakers?

Link to comment
Share on other sites

I don't get it...do you still get surround sound if you turn off the other speakers?

I get the correct volume level in the games with that setup, it's the only way. Skyrim, DXHR and many others have a really low volume with the stereo setup and the counterintuitive solution is to set 5.1 in Windows leaving only the L and R as active channels (if you have 2 speakers/classic headphones).

 

I made the clarification about my setup because maybe it's the reason why HRTF is working in UT2004 leaving the 5.1 surround setup in Windows (in the OpenAL Soft documentation HRTF requires stereo setup)

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

Testing OpenAL Soft + HRTF in UT2004 and UT2004 64 bit.

 

It seems working with 5.1 setup too, but I left only the R and L speakers in the 5.1 speakers Windows config tool.

It is important to use such setup in so many games, it's counterintuitive - 5.1 with R&L only is NOT equivalent to stereo - but necessary (try Skyrim and let the awe conquer you :D ).

 

image.jpg

 

I don't really understand what you are saying but I got no 5.1 system so I'm probably lacking the background here.

Please note that HRTF over speakers will not sound right because HRTF datasets have to be individually recorded for a specific setup. This is why there are many datasets for headphones. With headphones the setup is basically the same for everyone: Speakers aim at the listener from -90° and +90° relative to front and are very close to your ears.

For speaker setups however neither the distance nor the angles at which they aim at the listener are standardized which is probably why nobody bothered to record HRTF for speakers (with the exception of Aureal, I got a HRTF over speakers demo here: https://www.youtube.com/watch?v=cevtidU3Ko4 )

 

Off topic: Skyrim doesn't support OpenAL Soft. However, there exists a hook which brings HRTF to some games using x3daudio such as Skyrim. It's called X3dAudio-HRTF.

  • Like 1
Link to comment
Share on other sites

Off topic: Skyrim doesn't support OpenAL Soft. However, there exists a hook which brings HRTF to some games using x3daudio such as Skyrim. It's called X3dAudio-HRTF.

I know, I simply clarified WHY I have that "strange" setup and maybe it's why HRTF is working without forcing the stereo mode (in the documentation it's stated that HRTF only works with a stereo setup)

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

Hi, thanks for the detailed instructions.

just one snag I hit, for this instruction:

change "#hrtf = false" to "hrtf=true" (remove "#"!)

There is no line "#hrtf = false" in the ini file, but there is "#hrtf = auto". I assume that is what I change instead, or should I add a new line?

[EDIT] I changed auto to true and that did the trick.

 

This works very well! :D

Edited by grodenglaive
Link to comment
Share on other sites

Hi, thanks for the detailed instructions.

just one snag I hit, for this instruction:

change "#hrtf = false" to "hrtf=true" (remove "#"!)

There is no line "#hrtf = false" in the ini file, but there is "#hrtf = auto". I assume that is what I change instead, or should I add a new line?

[EDIT] I changed auto to true and that did the trick.

 

This works very well! :D

 

Thanks for noting, I corrected it in the first post.

Your change is indeed correct.

Link to comment
Share on other sites

It's called X3dAudio-HRTF.

LOL! There is what I'm saying :D

 

Works well now. Has simple but strange graph. Source voices has two outputs: one goes directly to the Mastering voice, and another to a Submix, which, in turn, sends to the Mastering one. The one that is sent to Submix, does not pass NaN. So we have nothing to do but not to send any sound there at all by setting output matrix to zero. However that works well.

Skyrim always creates Mastering voice as six-channel. We override it to two.

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

Tried it tonight and it's pretty interesting to hear the difference. The default audio's so-so but I noticed where it really dropped the ball was representing sounds that are above or below you. OAL definitely made a difference there, I now agree it'd be a nifty addition to have in the core mod.

  • Like 1

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

Advanced users:

There is a way to improve the positioning even more: Because the default HRTF datasets are made for an "average" head they may not be optimal for you. You can create your own by following this guide:

https://www.reddit.com/r/oculus/comments/1fzonq/psa_for_games_using_openal_including_minecraft/cagd3lb

 

 

I listened to the sound samples for the advanced method and was surprised by the large difference between them. It seems the default is IRC_1005 and it is not nearly the best match for me (thought it already works quite well).

 

The instructions only mention 44100 tables in the advanced method, does that mean it won't work with 48k?

 

Thanks

Link to comment
Share on other sites

I listened to the sound samples for the advanced method and was surprised by the large difference between them. It seems the default is IRC_1005 and it is not nearly the best match for me (thought it already works quite well).

 

The instructions only mention 44100 tables in the advanced method, does that mean it won't work with 48k?

 

Don't be misguided: The default HRTF set is the MIT KEMAR set (as stated here: https://github.com/kcat/openal-soft/blob/master/hrtf.txt#L15).The MIT KEMAR set is not in the IRCAM offering at all. Only the config file for the processing of IRCAM datasets defaults to IRC_1005.

 

About frequency: The IRCAM HRTF datasets were recorded at 44.1kHz but they can be resampled to any other frequency for processing if you desire. makehrtf offers an option for that, I believe it's makehrtf.exe -r=48000 for 48kHz. You should see all options when running makehrtf.exe -h.

Edited by Hiradur
Link to comment
Share on other sites

 

I think this video demonstrates what EAX and its successor EFX do quite well:

 

It's adding reverb to his voice depending on the environment he is in. You can clearly tell it has nothing to do with surround sound.

 

But this would only work with an Creative Audio EAX compatible sound card, wouldn't it?

Did anyone manage to get this to work with the Asus Xonar sound card which has "VoiceEX" and should do the same thing. For me the game just crashes after a few seconds when I select EAX or hardware audio :(

 

EDIT: Also there is no EAX like echoes or something applied to the room size, like it was for original OpenAL

 

EDIT2: HM I just installed the normal OpenAL and still I can only select software and hardware audio in Thief 2... But I recall that years ago I was playing Thief 2 with OpenAL and I had to select it in the audio settings...

Edited by SeriousToni

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

Hm... So I followed the tutorial, placed the files, changed the line in the config file and made the test ingame for Thief 2. When I play on software sound it seems just like stereo and when I play on hardware sound it is all mono. Also when I'm trying to do the batch file test, it will start the game but it won't create a log file in the same folder. Does this only work for Thief 2 with New Dark? Because I wanted to play Thief 2 Multiplayer which doesn't work on New Dark. So should I just use OpenAL instead?

Edited by SeriousToni

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

Hm... So I followed the tutorial, placed the files, changed the line in the config file and made the test ingame for Thief 2. When I play on software sound it seems just like stereo and when I play on hardware sound it is all mono. Also when I'm trying to do the batch file test, it will start the game but it won't create a log file in the same folder. Does this only work for Thief 2 with New Dark? Because I wanted to play Thief 2 Multiplayer which doesn't work on New Dark. So should I just use OpenAL instead?

 

If no openallog.txt is created then OpenAL Soft isn't being used.

You need New Dark for OpenAL Soft because the original Thief engine doesn't use OpenAL at all. With OpenAL Soft EAX should be available on all sound cards for the Thief games.

Link to comment
Share on other sites

I used to own an Asus Xonar. You have to manually enable/disable "GX" mode in the Xonar applet to make use of it's "emulated" EAX. It doesn't work if the game requires EAX 3.0 or greater which renders it's virtually useless unless you stick to playing games from the 90s.

If I switch off the GX mode the game stops to crash when I activate hardware mode but also then I can not activate EAX (its greyed out). Hm strange, I might try this out on single player with NewDark activated. Thanks! :)

 

Isn't the 1998 ever and ever again? :D

Yes, it is :D

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

Got this working with TDM, left to right sounds great, but I still have a hard time telling up from down.

Maybe it's just my brain has trouble with it, don't know.

 

Using a pair of high end DUNU DN-1000 IEMs (http://www.head-fi.org/products/dunu-dn-1000) running out of a Fiio X3 192/24 DAC. I've set Windows and openAL to 44.1 Khz.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

I've set Windows and openAL to 44.1 Khz.

How does the KHz setting affect the success of this system? I've read that I should set it manually in the config file to 44.1 at least for Thief 2. Normally my sound card is set to 96.000 btw. So do I need to change both the config file and the sound card settings to 44.1000 to make it work properly?

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

Oh just that the openal hrtf is limited to 44.1 and 44.8 so if your system sound is set to anything other than that it won't work. I just wanted to mention that I had done that. Normally when I plug my Fiio into my computer, Windows is set to 192 Khz 24 bit.

I always assumed I'd taste like boot leather.

 

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

      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.
      · 1 reply
    • 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
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...