Recording Impulse Responses for Speaker Virtualization
May 2, 2022 at 2:21 PM Post #1,321 of 1,817
Your frequency response graphs in the POST folder show a pretty big valley between 4kHz and 9kHz which is probably why they sound so muffled. As to what caused that dip, there's no way for us to know for sure. I would assume that it's due to mic placement though and the only way to sort that out is through trial and error, unfortunately.

Are you doing the full 7.1 every time you make a measurement? I'd recommend just doing normal stereo measurements with just the front left and front right speakers while you are experimenting. I can't imagine that doing full surround measurements is a quick process when using one speaker, but if it is then ignore that recommendation. :stuck_out_tongue:

Try out different depths systematically, if you can. One thing that I did after about 60 different measurements, instead of being smart and doing it early on, is to make 3 measurements in a session at different mic depths. Starting with the mics inserted as far as possible without serious discomfort and then pulling the mic out a little bit at a time for the following measurements, so I ended up with a deep measurement, a medium depth one, and then a shallow measurement. I then tried out all three and greatly preferred the deepest one. That might not be the case for everyone though and the only way to find out is to try it. Unfortunately this is the hard part about using Impulcifer due to the fact that everyone's ears are different and the mics aren't purpose-built for this kind of thing and they are very easy to accidentally obstruct due to their size. You might also want to try changing the path of the mic cables, too. The cable is pretty thick on these mics compared to the structure of the ear so if you normally wrap the cable up and over the ear like one typically does with IEMs then maybe try having them hang loose straight towards the ground like one would earbuds instead and see if that makes any difference.



The furthest I've gotten into programming is making Autohotkey scripts to make my life easier, but I'd be willing to try this out if I knew how to use it. Would I just paste all of this into a text file or something?

yea i was doing the whole 7.1 measurements every time, i will try the stereo then... do i have to switch to stereo in the windows audio properties or i can keep 7.1?

It's not easy for me doing what you suggested, the ear plugs pushes back out little by little from themselves, also i noticed that my left canal is more tight so it's everytime a pain

i really don't think that the curve from 4khz to 9khz is the problem here, my old test 11 also have those valleys but doesn't sound this muffled, also i tried multiple positions and i found out that my best clarity/spacial is around 3ft, but now i'm facing this weird problem, i did one more test today that's the last due to the late hour, i think the ear foam wasn't the cause, tomorro i will do again the test following the same route i did for the test 11, i will see
 
Last edited:
May 2, 2022 at 2:34 PM Post #1,322 of 1,817
Here’s the script by @conql

This is the script I use to generate standalone headphone compensation. Modified from impulcifer, so it should sound the same.

https://1drv.ms/u/s!AqwTOUFQXDBFlHNqm_iBjs1V5NJ_?e=H2flUl

Usage:
1. Copy the file to the root directory of impulcifer where impulcifer.py exists.
2. Edit the dir_path to the folder that stores headphones.wav

1649853698883.png

3. Run python hpeq.py

It will generate a Equalizer APO supported config called geq.txt in dir_path which contains equalization for every channel of the recording.

Edit:

Make sure you're in virtual environment beforehand just like running impulcifer.py
# On Windows
venv\Scripts\activate
# On Mac and Linux
. venv/bin/activate

sorry I didn't make it clear. Perhaps you didn't activate the virtual environment.
1649861424166.png


You should activate the virtual environment beforehand, just like running the impulcifer.py. Make sure the dir_path is correct. And it should generate fig.png and geq.txt in that folder.

Then you should have the text file and use that in the virtualisation in hesuvi. The graph shows flat but it increases the positions and clarity by lets say x2 for some reason. Let me know your results please.
 
Last edited:
May 2, 2022 at 2:53 PM Post #1,323 of 1,817
yea i was doing the whole 7.1 measurements every time, i will try the stereo then... do i have to switch to stereo in the windows audio properties or i can keep 7.1?

It's not easy for me doing what you suggested, the ear plugs pushes back out little by little from themselves, also i noticed that my left canal is more tight so it's everytime a pain

i really don't think that the curve from 4khz to 9khz is the problem here, my old test 11 also have those valleys but doesn't sound this muffled, also i tried multiple positions and i found out that my best clarity/spacial is around 3ft, but now i'm facing this weird problem, i did one more test today that's the last due to the late hour, i think the ear foam wasn't the cause, tomorro i will do again the test following the same route i did for the test 11, i will see
You can leave your audio settings at 7.1 if you're listening to stereo sources like Spotify or other music, which is how I do the majority of my testing.

My left ear-opening is also tighter than my right ear. Have you removed the silicone housing around the mic capsule, by the way? I had to do that in order to be able to get reasonable depth without it it being super uncomfortable and without the mics popping back out. I also had to cut the foam tips nearly in half to help with that problem.

If some of your good measurements have that valley around 7kHz then that's likely not the issue, agreed. It's very difficult to look at a graph and tell how good something will sound to you unless you've made a bunch of measurements that are good and know what they should roughly look like.

Here’s the script by @conql





Then you should have the text file and use that in the virtualisation in hesuvi. The graph shows flat but it increases the positions and clarity by day x2 for some reason. Let me know your results please.
Thanks! I'll try to give this a shot today and will let you know if I have any difficulties getting it working, and the results if I DO get it working.
 
Last edited:
May 2, 2022 at 4:49 PM Post #1,324 of 1,817
One thing I found to keep in mind for getting good measurements is to be completely still when measuring your speakers. It is very easy to involuntarily move slightly. For example, if you shift your head or neck position by a couple mm, it'll be equivalent to having a different headshape by that amount and may start to sound like listening to someone else's HRIR.
 
May 2, 2022 at 5:04 PM Post #1,325 of 1,817
One thing I found to keep in mind for getting good measurements is to be completely still when measuring your speakers. It is very easy to involuntarily move slightly. For example, if you shift your head or neck position by a couple mm, it'll be equivalent to having a different headshape by that amount and may start to sound like listening to someone else's HRIR.

I agree my best one was when I was completely still on a swivel chair and just moving my eyes to copy and paste the commands. I was making sure that my head turned exactly central which meant I cannot lean into the back rest. Centering my head on the point where the swivel was the key. Also making sure the mics were fixed in place because something like swallowing spit pushed out the foam slightly.

Would there be a way to have Impulcifer automatically start each sweep for different speaker after a couple of seconds so its just one input and then we can concentrate on just moving the head?
 
May 2, 2022 at 5:57 PM Post #1,326 of 1,817
Would there be a way to have Impulcifer automatically start each sweep for different speaker after a couple of seconds so its just one input and then we can concentrate on just moving the head?
You can use in the command window something like this:
&&= commands that are executed after each other
pause=pause until pressing any key
timeout/T10=pause of 10 seconds

This can look like this.
pause && timeout /T 18 && python recorder.py --play="data/sweep-seg-FR-stereo-6.15s-48000Hz-32bit-2.93Hz-24000Hz.wav" --record="data/my_hrir/FC_1.wav" && timeout /T 3 && python recorder.py --play="data/sweep-seg-FR-stereo-6.15s-48000Hz-32bit-2.93Hz-24000Hz.wav" --record="data/my_hrir/FC_2.wav" && timeout /T 10 && python recorder.py --play="data/sweep-seg-FR-stereo-6.15s-48000Hz-32bit-2.93Hz-24000Hz.wav" --record="data/my_hrir/FC_3.wav" && pause
 
Last edited:
May 2, 2022 at 7:48 PM Post #1,327 of 1,817
You can leave your audio settings at 7.1 if you're listening to stereo sources like Spotify or other music, which is how I do the majority of my testing.

My left ear-opening is also tighter than my right ear. Have you removed the silicone housing around the mic capsule, by the way? I had to do that in order to be able to get reasonable depth without it it being super uncomfortable and without the mics popping back out. I also had to cut the foam tips nearly in half to help with that problem.

If some of your good measurements have that valley around 7kHz then that's likely not the issue, agreed. It's very difficult to look at a graph and tell how good something will sound to you unless you've made a bunch of measurements that are good and know what they should roughly look like.


Thanks! I'll try to give this a shot today and will let you know if I have any difficulties getting it working, and the results if I DO get it working.
yep, i removed the stupid silicone housing the same day i got the mics for its useless, i cut a pair of foam but i can't get them very deep without risking to get them slip away; sadly i formatted my pc some days ago and i forgot that impulcifer saves the hrir in the same drive of windows LOL very sad i can't compare those measurements with the one i got these days, anyway the test 11 measurement is much better than everything i got in the previous measurements (mostly reverb free and very good clarity, a little bit less in spaciality but i'm working on it)

Here’s the script by @conql





Then you should have the text file and use that in the virtualisation in hesuvi. The graph shows flat but it increases the positions and clarity by lets say x2 for some reason. Let me know your results please.
thank you, i was expecting something like atmos in mesh2hrtf so i left it away but if it can actually help to get better measurement with impulcifer i will definitely do that one day

what did you do with the sofa files of mesh2hrtf exactly? you merged somewhere in impulcifer?

You can use in the command window something like this:
&&= commands that are executed after each other
pause=pause until pressing any key
timeout/T10=pause of 10 seconds

This can look like this.
&& pause && timeout /T 18 && python recorder.py --play="data/sweep-seg-FR-stereo-6.15s-48000Hz-32bit-2.93Hz-24000Hz.wav" --record="data/my_hrir/FC_1.wav" && timeout /T 3 && python recorder.py --play="data/sweep-seg-FR-stereo-6.15s-48000Hz-32bit-2.93Hz-24000Hz.wav" --record="data/my_hrir/FC_2.wav" && timeout /T 10 && python recorder.py --play="data/sweep-seg-FR-stereo-6.15s-48000Hz-32bit-2.93Hz-24000Hz.wav" --record="data/my_hrir/FC_3.wav" && ....
great! i will try this command tomorrow, this will make my life so much easier!
 
May 2, 2022 at 8:09 PM Post #1,328 of 1,817
Here’s the script by @conql





Then you should have the text file and use that in the virtualisation in hesuvi. The graph shows flat but it increases the positions and clarity by lets say x2 for some reason. Let me know your results please.

Holy smokes.

I just tried this and my mind is blown. On paper, I'd have expected this to sound super harsh and unnatural but it's like you said, it somehow seems to be improving clarity by at least a factor of two. I've only tried the 7.1 surround test that comes with Hesuvi when it comes to multi-channel audio so far, but localization also seems highly improved. What the heck is going on here! If I hadn't tried it myself I wouldn't believe it.

Before trying it I expected that this might improve localization due to exaggerating the HRTF a bit, but I also expected tonal balance to be way off and for music to sound harsh and weak, but it sounds pretty great. It strongly resembles being in a very strong phantom center of a great pair of speakers, much better speakers than I actually own. Impulcifer sounds great on it's own but it's never felt quite as fully immersive as being in my speakers' sweet spot. But this seems to add another layer of immersion on top of what I was already getting. Very odd, but good.

Oh man, I'm going to be playing with this all week long trying to figure out what's going on great find @morgin! I'm going to spend some time with this and see if I can notice any downsides, but so far I've not noticed any besides some of the high frequencies being a bit brighter than I would like, but since this is all from a parametric EQ I can easily tweak the parts that I find excessive.

@jaakkopasanen: I would be very interested in hearing you thoughts on this. I'm referring to using the the EQ curve generated by @conql's script, which it pulls from headphone.wav files, while using a Impulcifer-generated BRIR as usual. It might be something that you can implement into Impulcifer as a post-processing option to help tweak clarity.
 
Last edited:
May 2, 2022 at 9:41 PM Post #1,329 of 1,817
thank you, i was expecting something like atmos in mesh2hrtf so i left it away but if it can actually help to get better measurement with impulcifer i will definitely do that one day

what did you do with the sofa files of mesh2hrtf exactly? you merged somewhere in impulcifer?

I'm actually not using mesh2hrtf sofa until there's a way to increase the distance of the sound. At the moment it does sound like dolby but a bit better, but still way to close to my head. The EQ I'm using is the baked in from impulcifer in my HRIR and the extracted EQ from the script by @conql.

I just tried this and my mind is blown. On paper, I'd have expected this to sound super harsh and unnatural but it's like you said, it somehow seems to be improving clarity by at least a factor of two. I've only tried the 7.1 surround test that comes with Hesuvi when it comes to multi-channel audio so far, but localization also seems highly improved. What the heck is going on here! If I hadn't tried it myself I wouldn't believe it.

Sweet I'm glad it's working on your end too and not just some fluke on my end. Thankyou for trying coz I know it sounded like a hack and just learning how to use that script was an effort (was for me anyway) but you still gave it a go. I hope the others try it and have good results too. So far I haven't noticed any downsides. Maybe somehow triple'ing the EQ will make it better?
 
Last edited:
May 2, 2022 at 9:46 PM Post #1,330 of 1,817
Holy smokes.

I just tried this and my mind is blown. On paper, I'd have expected this to sound super harsh and unnatural but it's like you said, it somehow seems to be improving clarity by at least a factor of two. I've only tried the 7.1 surround test that comes with Hesuvi when it comes to multi-channel audio so far, but localization also seems highly improved. What the heck is going on here! If I hadn't tried it myself I wouldn't believe it.

Before trying it I expected that this might improve localization due to exaggerating the HRTF a bit, but I also expected tonal balance to be way off and for music to sound harsh and weak, but it sounds pretty great. It strongly resembles being in a very strong phantom center of a great pair of speakers, much better speakers than I actually own. Impulcifer sounds great on it's own but it's never felt quite as fully immersive as being in my speakers' sweet spot. But this seems to add another layer of immersion on top of what I was already getting. Very odd, but good.

Oh man, I'm going to be playing with this all week long trying to figure out what's going on great find @morgin! I'm going to spend some time with this and see if I can notice any downsides, but so far I've not noticed any besides some of the high frequencies being a bit brighter than I would like, but since this is all from a parametric EQ I can easily tweak the parts that I find excessive.

@jaakkopasanen: I would be very interested in hearing you thoughts on this. I'm referring to using the the EQ curve generated by @conql's script, which it pulls from headphone.wav files, while using a Impulcifer-generated BRIR as usual. It might be something that you can implement into Impulcifer as a post-processing option to help tweak clarity.
what about spaciality? does this method actually increase clarity without sacrificing spaciality?
 
May 2, 2022 at 9:52 PM Post #1,331 of 1,817
what about spaciality? does this method actually increase clarity without sacrificing spaciality?
It's a bit tough to explain, I'd say that it makes the illusion of listening to speakers in front me less strong and makes the room reflections in the BRIRs less apparent, so in that way I think I it does reduce the sense of space. However, it also increases the sense of space that I get from the source material itself, and localizing audio in surround is actually a little easier, from the little bit of surround testing I've done.

So it's less like listening to speakers and more like I'm just in the room with the musicians, I'd say. It definitely changes the perception of the space that I'm in more than when not using the EQ, which always sounds like a variation of my own room.
 
Last edited:
May 2, 2022 at 10:10 PM Post #1,332 of 1,817
It's a bit tough to explain, I'd say that it makes the illusion of listening to speakers in front me less strong and makes the room reflections in the BRIRs less apparent, so in that way I think I it does reduce the sense of space. However, it also increases the sense of space that I get from the source material itself, and localizing audio in surround is actually a little easier, from the little bit of surround testing I've done.

So it's less like listening to speakers and more like I'm just in the room with the musicians, I'd say. It definitely changes the perception of the space that I'm in more than when not using the EQ, which always sounds like a variation of my own room.
in that way you're telling me that is awesome :p

if you guys can so multiple tests with multiple different hrir positioning and see what does when you're faaar away or very close to the speakers

so actually to do this we need an iphone X and do a mesh scan of our head, am i right?
 
Last edited:
May 2, 2022 at 10:28 PM Post #1,333 of 1,817
Oh man, I'm going to be playing with this all week long trying to figure out what's going on great find @morgin! I'm going to spend some time with this and see if I can notice any downsides, but so far I've not noticed any besides some of the high frequencies being a bit brighter than I would like, but since this is all from a parametric EQ I can easily tweak the parts that I find excessive.
If I am understanding this right, is this just generating the headphone compensation EQ as a separate parametric EQ in EQ-APO? In that case running this with a measurement using "--no_headphone_compensation" should sound the same as a normal Impulcifer measurement. Running it as you are, it is applying twice as much headphone compensation but it seems the results are speaking for themselves :stuck_out_tongue_winking_eye:
 
May 2, 2022 at 10:33 PM Post #1,334 of 1,817
in that way you're telling me that is awesome :p

if you guys can so multiple tests with multiple different hrir positioning and see what does when you're faaar away or very close to the speakers

so actually to do this we need an iphone X and do a mesh scan of our head, am i right?

No this is just using Impulcifer. Just your generated HRIR from Impulcifer and then use the scrip by @conql to extract your EQ and add that into the Hesuvi virtualization.
 
May 2, 2022 at 10:41 PM Post #1,335 of 1,817
If I am understanding this right, is this just generating the headphone compensation EQ as a separate parametric EQ in EQ-APO? In that case running this with a measurement using "--no_headphone_compensation" should sound the same as a normal Impulcifer measurement. Running it as you are, it is applying twice as much headphone compensation but it seems the results are speaking for themselves :stuck_out_tongue_winking_eye:

Yeah, that's what I thought, though I didn't expect for it to work as well as it is.

I'm seeing it as a clarity enhancer right now, acting as a "sharpener" to improve contrast. It seems to cut mud from what I'm pretty sure is my terrible room. It's not treated in the slightest, though I do do some EQ work on my measurements in order to tame the big room nodes that are pretty obvious and easy to find and fix, but that's only in the sub-200hz frequencies. I think this would be less useful for people with well-treated rooms and great speakers.

It works much better with my BRIR's that have low variance in their headphones.png measurements, which makes sense since throwing compensation on top of already compensated measurements would just make things back to being uncompensated, of course. But I am enjoying it for the measurements that I have which are well-balanced without using headphone compensation. I'm going to have to try processing a some BRIRs with --no_headphone_compensation and then tweak the matching EQ curve generated from this script in order to exaggerate the peaks and valleys by "stretching" the curve vertically, that'd probably be less prone to imbalance issues than double-compensating while still giving it letting me tweak clarity.
 
Last edited:

Users who are viewing this thread

Back
Top