Jump to content


Photo

Improve your TDM experience by playing with OpenAL Soft HRTF (better 3d audio)

hrtf positional audio vr 3d audio

  • Please log in to reply
80 replies to this topic

#26 Hiradur

Hiradur

    Member

  • Member
  • PipPip
  • 68 posts

Posted 22 January 2016 - 07:00 AM

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/k...ftrc.sample#L19


Edited by Hiradur, 22 January 2016 - 07:01 AM.

  • Anderson likes this

#27 Spooks

Spooks

    Advanced Member

  • Member
  • PipPipPip
  • 508 posts

Posted 22 January 2016 - 07:22 AM

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, 22 January 2016 - 07:34 AM.

  • Bikerdude likes this

My FMs: The King of Diamonds (2016)

 

Visit my Mapbook thread sometimes!


#28 lowenz

lowenz

    Advanced Member

  • Member
  • PipPipPip
  • 1922 posts

Posted 26 January 2016 - 09:01 AM

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, 26 January 2016 - 09:06 AM.

  • SiyahParsomen and nbohr1more like this

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.


#29 lowenz

lowenz

    Advanced Member

  • Member
  • PipPipPip
  • 1922 posts

Posted 26 January 2016 - 09:34 AM

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, 26 January 2016 - 09:35 AM.

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.


#30 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37450 posts

Posted 26 January 2016 - 10:07 AM

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


TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#31 lowenz

lowenz

    Advanced Member

  • Member
  • PipPipPip
  • 1922 posts

Posted 26 January 2016 - 02:00 PM

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, 26 January 2016 - 02:02 PM.

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.


#32 Hiradur

Hiradur

    Member

  • Member
  • PipPip
  • 68 posts

Posted 26 January 2016 - 02:01 PM

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: )

 

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.


  • SiyahParsomen likes this

#33 lowenz

lowenz

    Advanced Member

  • Member
  • PipPipPip
  • 1922 posts

Posted 26 January 2016 - 02:05 PM

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, 26 January 2016 - 02:06 PM.

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.


#34 grodenglaive

grodenglaive

    Member

  • Member
  • PipPip
  • 54 posts

Posted 26 January 2016 - 07:31 PM

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, 26 January 2016 - 08:19 PM.


#35 Hiradur

Hiradur

    Member

  • Member
  • PipPip
  • 68 posts

Posted 27 January 2016 - 06:46 AM

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.



#36 lowenz

lowenz

    Advanced Member

  • Member
  • PipPipPip
  • 1922 posts

Posted 27 January 2016 - 07:36 AM

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, 27 January 2016 - 07:37 AM.

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.


#37 Spooks

Spooks

    Advanced Member

  • Member
  • PipPipPip
  • 508 posts

Posted 28 January 2016 - 05:28 PM

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.


  • PsymH likes this

My FMs: The King of Diamonds (2016)

 

Visit my Mapbook thread sometimes!


#38 grodenglaive

grodenglaive

    Member

  • Member
  • PipPip
  • 54 posts

Posted 29 January 2016 - 06:39 AM

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.c...necraft/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



#39 Hiradur

Hiradur

    Member

  • Member
  • PipPip
  • 68 posts

Posted 29 January 2016 - 07:06 AM

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/k.../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, 29 January 2016 - 07:52 AM.


#40 grodenglaive

grodenglaive

    Member

  • Member
  • PipPip
  • 54 posts

Posted 29 January 2016 - 06:11 PM

Excellent, thank you.



#41 SeriousToni

SeriousToni

    Beginner Contest 2012 Winner

  • Member
  • PipPipPipPip
  • 2204 posts

Posted 30 January 2016 - 01:37 PM

 

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, 30 January 2016 - 02:58 PM.

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

#42 SeriousToni

SeriousToni

    Beginner Contest 2012 Winner

  • Member
  • PipPipPipPip
  • 2204 posts

Posted 30 January 2016 - 02:36 PM

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, 30 January 2016 - 02:37 PM.

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

#43 Hiradur

Hiradur

    Member

  • Member
  • PipPip
  • 68 posts

Posted 30 January 2016 - 02:54 PM

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.



#44 rich_is_bored

rich_is_bored

    Advanced Member

  • Member
  • PipPipPip
  • 885 posts

Posted 30 January 2016 - 05:46 PM

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.



#45 lowenz

lowenz

    Advanced Member

  • Member
  • PipPipPip
  • 1922 posts

Posted 30 January 2016 - 07:18 PM

to playing games from the 90s.

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


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.


#46 SeriousToni

SeriousToni

    Beginner Contest 2012 Winner

  • Member
  • PipPipPipPip
  • 2204 posts

Posted 30 January 2016 - 08:30 PM

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

#47 Hiradur

Hiradur

    Member

  • Member
  • PipPip
  • 68 posts

Posted 31 January 2016 - 03:48 AM

I might try this out on single player with NewDark activated. Thanks! :)

 

If you want HRTF in multiplayer you could try it with Thievery instead, it works when you install the OMP patch from Oldunreal.



#48 AluminumHaste

AluminumHaste

    Darkmod Contributor

  • Development Role
  • PipPipPipPipPip
  • 6222 posts

Posted 31 January 2016 - 09:21 AM

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.o...ts/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.

 

#49 SeriousToni

SeriousToni

    Beginner Contest 2012 Winner

  • Member
  • PipPipPipPip
  • 2204 posts

Posted 31 January 2016 - 10:01 AM

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

#50 AluminumHaste

AluminumHaste

    Darkmod Contributor

  • Development Role
  • PipPipPipPipPip
  • 6222 posts

Posted 31 January 2016 - 10:07 AM

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.

 





Also tagged with one or more of these keywords: hrtf, positional audio, vr, 3d audio

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users