How to use individual HRTF with HeSuVi for system-wide 7.1 sound on a Windows PC.
Tutorial Status | Date Written | Date Last Updated |
---|---|---|
Ready for use. More optimizations likely to come. | 2022-09-20 | 2022-11-13 |
Help - You are welcome to contact author about any extra information, corrections or other input. New tools and approaches appear literally every month, so this page can be updated as needed.
HeSuVi with Equalizer APO enables use of SOFA files for Fixed 2.0 or 7.1-channel virtual surround.
This method creates HeSuVi (or even matrix-convolver) compatible Impulse Responses by applying SOFA HRTF as an effect inside audio editor (Reaper DAW). Key advantage of this method is the ability to bake-in additional audio effects like reverb or headphone equalization into a single file with 14 impulse responses (including extremely resource-intensive algorithms). By borrowing Impulcifer scripts, the whole operation requires very few manual steps.
The following is a step-by-step guide.
Impulcifer needs to be installed using 1 out of 2 methods depending if Impulcifer still requires Python 3.8!!! (as it did in 2022-09).
In case Impulcifer is compatible with your current system-wide installed version of Python (not very likely scenario) then you can follow the official Impulcifer installation tutorial. As of 2022-09, Impulcifer requires precisely Python 3.8 (not newer).
git clone
command, instead it is sufficient to just download Impulcifer code from GitHub by clicking on Code ==> Download ZIP
on the website and unpacking the zip file (similar to Mesh2HRTF installation).In case you have incompatible Python 3 version installed, then it is necessary to install Python 3.8 for Impulcifer in parallel to existing Python installation. To do that, a practical approach is to use "Conda", as described in Mesh2HRTF tutorial. If you choose the Conda installation, then follow these steps:
Code ==> Download ZIP
. (alternatively you can clone the repository with git).cd c:\your\path\to\Impulcifer
pip install -U -r requirements.txt
(assuming you are in the correct Terminal/Command-line where Impulcifer environment is activated)python impulcifer.py --help
(there should be no errors)Finish Impulcifer installation
The final step to configure Impulcifer is to generate the 7.1 source sweep audio file. It is done similarly as all other Impulcifer operations:
cd c:\your\path\to\Impulcifer
python impulse_response_estimator.py --dir_path=data --fs=48000 --speakers=FL,FC,FR,SR,BR,BL,SL --tracks=7.1 --duration=5
(it is based on this example)Alternative to Impulcifer
NOTE: in case there is a need to avoid using Impulcifer for some reason, it is possible to get the same results as described in this tutorial by replacing Impulcifer-specific steps by steps from official HeSuVi - How-To Record Impulse Responses tutorial. That tutorial has a bit different purpose; requires more manual steps and would need to be executed in Reaper to get more reliable VST plugin support, but it should still work.
Install Reaper DAW - this DAW is widely used, suppoted by most effect plugins, quite affordable and has a reasonable never-expiring-trial period.
Download and install SPARTA plugins - all open-source, cross-platform SPARTA VST plugins come as one package with an installer.
No prior Reaper knowledge needed:
File ==> Project settings ...
and set the projct to 48000 Hz. ...\Impulcifer\data
into the Reaper to create a new track.Add VST plugin that can apply SOFA HRTF on the sweep as an effect (SPARTA Binauraliser):
FX
Configure SPARTA Binauraliser following this tutorial.
Optional: "SPARTA Binauraliser" is not the only VST plugin that can apply SOFA binauralization. You are encouraged to experiment with other binauralizers (one at a time! And repeat the following Rendering step for each binauralizer). For example:.
SPARTA Spreader "uses an optimised framework for rendering spread sound sources over an arbitrary playback system (..) such that the output signals create a diffuse, or rather: “incoherently spead” sound source." It could produce another effect compared to SPARTA Binauraliser's ideal HRTF point sources.
Other VST plugins? Note that most binauraliser plugins will do the same thing as SPARTA Binauraliser, so check which plugin features you are interested to test.
Note: use the same process to add any additional VST plugins, for example headphone EQ or some reverb plugins of your choice (add reverb to taste - usually not needed).
Render the SOFA HRTF effect on the Impulcifer sweep file:
File ==> Render...
FL,FC,FR,SR,BR,BL,SL
and specify a name of the NEW folder, for example ...\Impulcifer\data\mySOFA_forHeSuVi
(Reaper will create the new "mySOFA_forHeSuVi" folder automatically).Check and fix any clipping issues:
Generate the HeSuVi file by running Impulcifer command: python impulcifer.py --test_signal="data/sweep-6.15s-48000Hz-32bit-2.93Hz-24000Hz.wav" --dir_path="data/mySOFA_forHeSuVi" --plot --no_headphone_compensation --no_room_correction
python impulcifer.py --help
Move and test the HeSuVi results: To test the processed SOFA HRTF in HeSuVi copy hesuvi.wav
into C:\Program Files\Equalizer APO\config\Hesuvi\hrir\
, (re)start HeSuVi and select hesuvi.wav
from the Common HRIRs list on Virtualization tab to use it.
hesuvi.wav
to anything you want.Note, Impulcifer produces hrir.wav
and hesuvi.wav
which can be used not only with HeSuVi on Windows, but also with other matrix convolvers. For example SPARTA MatrixConv could work also on Apple MacOS and Linux. Only make sure the channel order is correct, see "Confusion of 7.1 and 5.1 channel order". From MatrixConv tooltips:
Do not forget to preserve the resulting files hrir.wav
and hesuvi.wav
next to your source SOFA HRTF files together with description of the processing parameters applied in Reaper and Impulcifer.
Optional - edit away silence at the end of hesuvi.wav
file. Trimming silence can further reduce resource usage, but otherwise makes no difference.
Done!
ToDo - list of additional VST plugins and tricks to customize the HRTF sound
Also see additional tools and options in Everyday use of SOFA HRTF wiki article.
If you do not yet have HeSuVi installed, there are Tips to configure HeSuVi in this Wiki or you are welcome to use HeSuVi tutorials and YouTube videos.
Using this method:
You can use individual SOFA HRTF for all content on Windows computers with minimal resource usage and low latency. (Gaming, movies, music in up to 7.1 channel surround using SOFA files created by Mesh2HRTF or any other method).
You can bake-in very complex effects into your individual SOFA HRTF. For example render in non-realtime very computationally heavy "room simulation" that applies complex reverb effects based on virtual placement of sound sources in a room of a specific size, etc.
You can directly compare any SOFA HRTF against most commercial virtual-surround technologies with the help of HeSuVi. Same comparison works against individual BRIRs generated by Impulcifer method.
Easy approach to try Mesh2HRTF for existing HeSuVi users - If you previously used HeSuVi, this method makes trying out Mesh2HRTF individual HRTFs painless - just load another Impulse Response and you are done.
You can save stereo files with your individual HRTF baked-in for playback on any device by converting any 2.0/5.1/7.1 audio file following this tutorial: "Apply HeSuVi to Any Audio File for Mobile Usage".
With some additional work this method should also work cross-platform on Apple MacOS and Linux with the help of SPARTA MatrixConv (More testing and fixes are needed).
Note, If you try this method, consider providing your feedback on Binaural Audio Discord by 3DJ, https://www.reddit.com/r/HRTF or other forums!
Wiki: Confusion_of_7-1 and 5-1_channel_order_in_Windows
Wiki: Earful_tutorial
Wiki: Everyday_use_of_SOFA_HRTF
Wiki: Home
Wiki: virtual_surround_with_headtracking_tutorial