Recording Impulse Responses for Speaker Virtualization
Nov 20, 2019 at 12:46 PM Post #151 of 1,816
Ah understood about the flat target. I still don't get why it sounds better and more natural to me - I just have to reduce the 4000hz attenuation and it's virtually there for me.

Yep - I'm copying the eq.wav and doing the headphone compensation then. I guess I got it the wrong way round - will try again tomorrow.

Edit: the balancer issue was user error - I compensated the wrong headphones. The center image is slightly tighter with just the stereo recording. Would it be an idea to run the balancer per speaker?

I'm thinking of running balancer per speaker pair, so FL+FR, FC, SL+SR and BL+BR.

How much do you attenuate the 4 kHz and how wide filter? Are you using this on top of Impulcifer's headphone compensation?

Ok, that explains why I don't hear any difference. Actually this sound already very close to the real speakers in the room. But the funny thing is that I did only one test measurement before and that this was the first real measurement with Impulcifer and I had trouble with the microfon (Pui 5024HD capsule with XLR plug working at approx. 4V) placement in my ears. I hope I find time in the weekend to do more measurements. I have also put together a second microfon working at 6V and a microfon with the 3,5mm plug (but this looks a bit noisy). Actually I only measured with my HD 555 and I also want to test my AKG 701.

Very cool. Could you show us your mics? The capsule looks very good specs wise. -24 dB sensitivity and 14 dB noise. This is essentially better than Primo EM172 and more readily available and cheaper. Too bad it's 10 mm capsule although I'm not so sure if that's that bad thing because my current mics are 9 mm with the silicone casings and the cable is going to be the biggest problem anyways when trying to insert the mics exactly at the ear canal opening.

I asked if FEL Communications (micbooster.com) could provide stereo EM 258 modules with matched capsules. They agreed to do it on request and use the thin Mogami microphone cable. So this but stereo: https://micbooster.com/primo-microphone-capsules/97-primo-em258-mono-module-with-35mm-plug-10m.html. They also were kind enough to tell me which adapters I would need to connect such a stereo module to an USB audio interface with two RODE VXLR+ phantom power adaptors: https://www.amazon.co.uk/Plated-Copper-Female-Stereo-Adapter-0-9-Meter/dp/B0785VKZW4/. This is my current best guess for a high performance binaural mics without too much DIYing. Of course one needs to glue these capsules to ear plugs but that can hardly be failed. They also have the molding putty for this specific purpose: https://micbooster.com/microphone-holders/112-lugguards-custom-moulded-earplugs.html
 
Nov 20, 2019 at 1:51 PM Post #152 of 1,816
Very cool. Could you show us your mics? The capsule looks very good specs wise. -24 dB sensitivity and 14 dB noise. This is essentially better than Primo EM172 and more readily available and cheaper. Too bad it's 10 mm capsule although I'm not so sure if that's that bad thing because my current mics are 9 mm with the silicone casings and the cable is going to be the biggest problem anyways when trying to insert the mics exactly at the ear canal opening.

This is one of the mics. For the first measurement i just put a small rubber around the capsule and a cover for ear buds. It is adapted from this Thread (http://www.hifi-forum.de/index.php?action=browseT&forum_id=71&thread=13437&back=&sort=&z=1) on the German hifi forum. There you can find images of the very simple XLR interior.
20191114_175928_DXO_olb.jpg 20191120_192343_DXO_olb.jpg
 
Nov 20, 2019 at 2:50 PM Post #153 of 1,816
I'm thinking of running balancer per speaker pair, so FL+FR, FC, SL+SR and BL+BR.

How much do you attenuate the 4 kHz and how wide filter? Are you using this on top of Impulcifer's headphone compensation?

I only use this for the Airpods/IEMs. I let the AutoEQ's Parametric EQ get imported into Peace - then just push down the attenuation at around 4khz. For the airpods the automatic calc is outputting 2845 hz, -6.6db, Q 0.9. So I'm just reducing that by 3db. That's without any headphone compensation in the HRIR.

I think it was user error - I likely copied the wrong headphone.wav into the directory. The transform works perfectly! Thanks for helping me out so much.

Edit: the other good thing about the transform process is that if you've captured a particularly good recording that you're happy with and get a new set of headphones - you can use transform for the compensation. For example - with a room/speaker combo that no longer exists.
 

Attachments

  • Apple AirPods Pro.png
    Apple AirPods Pro.png
    47.7 KB · Views: 0
Last edited:
Nov 21, 2019 at 6:04 PM Post #154 of 1,816
@jaakkopasanen: Just now I tried to re-install Impulcifer. (Last time I did something with it was 6 september).
I skipped the following, assuming this part doesn't need to be done again (could that have been my mistake?):
  • Download and install Git: https://git-scm.com/downloads. When installing Git on Windows, use Windows SSL verification instead of Open SSL or you might run into problems when installing project dependencies.
  • Download and install 64-bit Python 3. Python 3.8 doesn't work yet. Make sure to check Add Python 3 to PATH.
I followed the rest of your list of actions starting from:
  • Install virtualenv.
pip install virtualenv

I renamed the old Impulcifer folder, because first I got a complaint that the folder already existed.
One little remark: two times you wrote 'cd Implucifer' instead of 'cd Impulcifer'. Not a big deal, only copy-pasting all commands goes wrong here of course.

More serious (unless I made a silly mistake I don't know about):
python impulcifer.py --help
now gives the following output:
Traceback (most recent call last):
File "impulcifer.py", line 9, in <module>
from scipy import signal
File "C:\Users\Laptop\Impulcifer\venv\lib\site-packages\scipy\signal\__init__.py", line 289, in <module>
from . import sigtools, windows
File "C:\Users\Laptop\Impulcifer\venv\lib\site-packages\scipy\signal\windows\__init__.py", line 41, in <module>
from .windows import *
File "C:\Users\Laptop\Impulcifer\venv\lib\site-packages\scipy\signal\windows\windows.py", line 9, in <module>
from scipy import fftpack, linalg, special
File "C:\Users\Laptop\Impulcifer\venv\lib\site-packages\scipy\linalg\__init__.py", line 213, in <module>
from ._sketches import *
File "C:\Users\Laptop\Impulcifer\venv\lib\site-packages\scipy\linalg\_sketches.py", line 11, in <module>
from scipy.sparse import csc_matrix
File "C:\Users\Laptop\Impulcifer\venv\lib\site-packages\scipy\sparse\__init__.py", line 230, in <module>
from .csr import *
File "C:\Users\Laptop\Impulcifer\venv\lib\site-packages\scipy\sparse\csr.py", line 13, in <module>
from ._sparsetools import (csr_tocsc, csr_tobsr, csr_count_blocks,
ImportError: DLL load failed: The specified module could not be found.
 
Nov 23, 2019 at 8:51 AM Post #155 of 1,816
I reworked channel balancing to work in speaker pairs FL+FR, SL+SR, BL,BR and FC. I also figured out the low freq ringing problem I had, it was caused by boost below 20 Hz. Now Sub 20 Hz region is not boosted anymore and the included Harman room target has -60 dB at 10 Hz. Demo recordings included in Impulcifer are measured with my mics without hooks and glued to ear plugs. Life is good!

@jaakkopasanen: Just now I tried to re-install Impulcifer. (Last time I did something with it was 6 september).
I skipped the following, assuming this part doesn't need to be done again (could that have been my mistake?):

I followed the rest of your list of actions starting from:


I renamed the old Impulcifer folder, because first I got a complaint that the folder already existed.
One little remark: two times you wrote 'cd Implucifer' instead of 'cd Impulcifer'. Not a big deal, only copy-pasting all commands goes wrong here of course.

More serious (unless I made a silly mistake I don't know about):
python impulcifer.py --help
now gives the following output:
Sounds a lot like this issue. Maybe take a look and report back if that solves your case. And thanks for pointing out the typos, I fixed them.
 
Nov 23, 2019 at 11:25 AM Post #156 of 1,816
Excited to try out the new channel balance. Can A vs B the old method ones I have. Will report back!

Edit: Re-ran my fav HRIR's with the new balance - definitely has improved the localisation. It's very hard to tell though unless you A vs B - but I'd imagine it'd mean more recordings (even bad ones) result in a good HRIR.

Btw - over on the Realiser thread they're posting about differences in microphone placement having a big impact on the HRIR it creates.
 
Last edited:
Nov 24, 2019 at 10:45 AM Post #157 of 1,816
@johnn29 I started thinking about that 3 or 4 kHz attenuation you apply. The Harman over-ear target has some modifications compared to speaker listening because headphones are somewhat different experience. So I created a new room target which I call virtual room target. This is in essence Harman room target modified with the difference between Harman's flat loudspeaker in room response and Harman over-ear target. The code, results and plots can be found here: https://github.com/jaakkopasanen/Impulcifer/tree/master/research/virtual-room-target

Maybe give it a try a tell me how it sounds. I think I prefer the unmodified Harman target.

EDIT I added a light version of the virtual room target which doesn't include boost below 1 kHz. I think I might prefer this to the others. It doesn't make the whole tonality dark but takes the edge off just a bit to make it more laid back and effortless.
 
Last edited:
Nov 24, 2019 at 3:54 PM Post #158 of 1,816
I've still not managed to do the room correction yet but I'm going you attempt it tomorrow so i hope to try it out. Remember I was only reducing the 4khz band when I didn't use headphone compensation for IEMs. Since you helped me figure out transform I'm using headphone compensation with my airpods and loving it. It sounds more realistic than my flat EQ method.

I've spent a while trying to perfect some HRIRs. Now I feel I have the next logical thing is the room correction so I'll figure out how to nail the mic placement.

Can I just confirm I need to run the following commands. First for left ear, then right.

Code:
python recorder.py --channels=1 --play="data/sweep-seg-FL,FC,FR,SR,BR,BL,SL-7.1-6.15s-48000Hz-32bit-2.93Hz-24000Hz.wav" --record="data/my_hrir/room-FL"
python recorder.py --channels=1 --play="data/sweep-seg-FL,FC,FR,SR,BR,BL,SL-7.1-6.15s-48000Hz-32bit-2.93Hz-24000Hz.wav" --record="data/my_hrir/room-FR"

Edit: got it working. Will post thoughts on the process shorlty
 
Last edited:
Nov 25, 2019 at 2:44 AM Post #159 of 1,816
I added another channel balancing strategy: "trend". This takes the frequency response difference between left and right sides and smooths it heavily. This smoothed curve is then used as the equalization target for right side. Now because the smoothing is so heavy this doesn't create the uncanny feeling that "avg" or "min" can do in some cases while managing to balance bass, mids and treble. I tested it with two measurements, one with quite good natural channel balance and one with poor balance. I prefer trend over all other strategies for both. Here's a graph illustrating the trending.
h7shOMX.png
There should be no uncanny feeling, if you did like I originally proposed and equalized both the left and right channels to the average response, instead of one to the other. I am after all just telling you what already works for me :D
 
Last edited:
HiBy Stay updated on HiBy at their facebook, website or email (icons below). Stay updated on HiBy at their sponsor profile on Head-Fi.
 
https://www.facebook.com/hibycom https://store.hiby.com/ service@hiby.com
Nov 25, 2019 at 3:01 AM Post #160 of 1,816
There should be no uncanny feeling, if you did like I originally proposed and equalized both the left and right channels to the average response, instead of one to the other. I am after all just telling you what already works for me :D
This is what the avg strategy does and I'm experiencing the uncanny feeling on some measurements. I guess it also depends on the individual.
 
Nov 25, 2019 at 5:00 AM Post #161 of 1,816
@johnn29 I started thinking about that 3 or 4 kHz attenuation you apply. The Harman over-ear target has some modifications compared to speaker listening because headphones are somewhat different experience. So I created a new room target which I call virtual room target. This is in essence Harman room target modified with the difference between Harman's flat loudspeaker in room response and Harman over-ear target. The code, results and plots can be found here: https://github.com/jaakkopasanen/Impulcifer/tree/master/research/virtual-room-target

Maybe give it a try a tell me how it sounds. I think I prefer the unmodified Harman target.

EDIT I added a light version of the virtual room target which doesn't include boost below 1 kHz. I think I might prefer this to the others. It doesn't make the whole tonality dark but takes the edge off just a bit to make it more laid back and effortless.

Finally got the placement working for the UMIK - turns out sitting on the floor worked best and I could use the webcam app.

Also got rid of my plot error by installing on my desktop. The laptop is still throwing errors despite re-install.

The 3 folders that plot outputs - can we get more detail on what they mean? is "post" after room correction? Does the room folder contain the frequency response post of the HRIR (post correction)

I tried the standard room correction target, the virtual and virtual light. It's very hard to compare because I get different levels for virtual and virtual light compared to standard. Standard's levels are the same as no room correction. It's very hard to pick a winner on what sounds better for me - they do sound different for sure though. That could be down to me being an uncritical listener. If I had to pick I'd pick either of the virtual room targets. Could be just a level match thing though. But that does sound better than either the uncorrected or regular target.

Edit- after watching a surround TV show I much prefer the room corrected version. I'm using my Airpods Pro via the AutoEQ Transform function and the room correction seems to be much more obvious with these. I can't say which room corrected version I prefer yet though, but they are much superior to the non room corrected one
 
Last edited:
Nov 25, 2019 at 8:18 AM Post #162 of 1,816
After an hour listening to music with the room correction I can safely say I've surpassed my real speakers by a long way. Just wow - cliche audiophile phrase but it's making me listen to all my favorite tracks again. I don't know if it's psychoaccoustics but there's something about IEM's for me in delivering bass. It feels much more real for me. The airpods pro are just giving me bass the Bose 700s couldn't. Weirdly the boss measure better. The airpods with Impulcifer are analogous if your regular glasses were a VR headset. They make it so comfortable that it just immerses you into the reality. The complete silence I get from them means I get a huge dynamic range compared to speakers or regular headphones.

I guess the next step will be when the RT time adjustment feature is live - that's likely going to be great for movies. I always thought head tracking was a big feature but after having it on the Mobius I didn't value it that much.
 
Nov 25, 2019 at 8:32 PM Post #163 of 1,816
This is what the avg strategy does and I'm experiencing the uncanny feeling on some measurements. I guess it also depends on the individual.
What is the smoothing applied to the corrections there?
 
HiBy Stay updated on HiBy at their facebook, website or email (icons below). Stay updated on HiBy at their sponsor profile on Head-Fi.
 
https://www.facebook.com/hibycom https://store.hiby.com/ service@hiby.com
Nov 25, 2019 at 8:52 PM Post #164 of 1,816
Sounds a lot like this issue. Maybe take a look and report back if that solves your case. And thanks for pointing out the typos, I fixed them.
I interpreted this as that I should install the software mentioned here:
i got scipy problem i resolved with https://www.microsoft.com/en-in/download/details.aspx?id=48145 Visual C++ Redistributable for Visual Studio 2015.
This I did and I then removed the Impulcifer folder that was created during my previous try and again started from the step "pip install virtualenv".
And now I got another error with te step "python impulcifer.py --help":
Traceback (most recent call last):
File "C:\Users\Laptop\Impulcifer\venv\lib\site-packages\soundfile.py", line 142, in <module>
raise OSError('sndfile library not found')
OSError: sndfile library not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "impulcifer.py", line 13, in <module>
from autoeq.frequency_response import FrequencyResponse
File "C:\Users\Laptop\Impulcifer\venv\lib\site-packages\autoeq\frequency_response.py", line 13, in <module>
import soundfile as sf
File "C:\Users\Laptop\Impulcifer\venv\lib\site-packages\soundfile.py", line 163, in <module>
_path, '_soundfile_data', _libname))
OSError: cannot load library 'C:\Users\Laptop\Impulcifer\venv\lib\site-packages\_soundfile_data\libsndfile64bit.dll': error 0x7e

I noticed that in the old renamed Impulcifer folder from my last succesfull install in september the folder and file
"C:\Users\Laptop\Impulcifer\venv\lib\site-packages\_soundfile_data\libsndfile64bit.dll" does exist, but not in the new Impulcifer folder.


Instead of trying to fix this could I maybe better try to completely undo everything I did/installed related to Impulcifer, Python and Git and start from scratch? But I am not sure how to do that(?).

Edit: oh, or should I have just used "git pull" instead of what I did... But what does that do exactly? After "git pull" should I repeat some of the other steps like "pip install -r requirements.txt"?
But I assume it has no use to try that now as I somehow made a mess of things.

One thought however: could it be that in your newer versions you forgot something (like that missing _soundfile_data\libsndfile64bit.dll) that doesn't give rise to problems for people who use "git pull" to update because maybe "git pull" only adds things, and for those people the things missing in the new version maybe were simply still there from an older version? And when someone starts from scratch (without the old Impulcifer folder I mean now) it would be missing? This is just a vague hunch I have, hope it helps.

I hope I don't sound like a complete fool, but if I do: apparently the Impulcifer installation process is not "foolproof" yet!:)
 
Last edited:
Nov 26, 2019 at 1:12 PM Post #165 of 1,816
I'm going to investigate these errors soon. There's something going on for sure.
Finally got the placement working for the UMIK - turns out sitting on the floor worked best and I could use the webcam app.

Also got rid of my plot error by installing on my desktop. The laptop is still throwing errors despite re-install.

The 3 folders that plot outputs - can we get more detail on what they mean? is "post" after room correction? Does the room folder contain the frequency response post of the HRIR (post correction)

I tried the standard room correction target, the virtual and virtual light. It's very hard to compare because I get different levels for virtual and virtual light compared to standard. Standard's levels are the same as no room correction. It's very hard to pick a winner on what sounds better for me - they do sound different for sure though. That could be down to me being an uncritical listener. If I had to pick I'd pick either of the virtual room targets. Could be just a level match thing though. But that does sound better than either the uncorrected or regular target.

Edit- after watching a surround TV show I much prefer the room corrected version. I'm using my Airpods Pro via the AutoEQ Transform function and the room correction seems to be much more obvious with these. I can't say which room corrected version I prefer yet though, but they are much superior to the non room corrected one
Pre is the binaural recording without any processing, room is the room recording as is and post is the binaural measurement with all the processing (room correction, channel balancing, headphone compensation,... ). I'll add these to the instructions.

After an hour listening to music with the room correction I can safely say I've surpassed my real speakers by a long way. Just wow - cliche audiophile phrase but it's making me listen to all my favorite tracks again. I don't know if it's psychoaccoustics but there's something about IEM's for me in delivering bass. It feels much more real for me. The airpods pro are just giving me bass the Bose 700s couldn't. Weirdly the boss measure better. The airpods with Impulcifer are analogous if your regular glasses were a VR headset. They make it so comfortable that it just immerses you into the reality. The complete silence I get from them means I get a huge dynamic range compared to speakers or regular headphones.

I guess the next step will be when the RT time adjustment feature is live - that's likely going to be great for movies. I always thought head tracking was a big feature but after having it on the Mobius I didn't value it that much.
I think the biggest value of head tracking would come from added comfort because you can safely mice your head around without the fear of that imaging gets ruined. That being said I have to confess that I've never tried head tracking...

What is the smoothing applied to the corrections there?
Third octave if I remember correctly. Or maybe it was my heuristic algorithm which flies over narrow notches without being too heavy. EQ cannot be applied without smoothing because the responses contain extremely sharp notches and those cannot be raised.

I interpreted this as that I should install the software mentioned here:

This I did and I then removed the Impulcifer folder that was created during my previous try and again started from the step "pip install virtualenv".
And now I got another error with te step "python impulcifer.py --help":


I noticed that in the old renamed Impulcifer folder from my last succesfull install in september the folder and file
"C:\Users\Laptop\Impulcifer\venv\lib\site-packages\_soundfile_data\libsndfile64bit.dll" does exist, but not in the new Impulcifer folder.


Instead of trying to fix this could I maybe better try to completely undo everything I did/installed related to Impulcifer, Python and Git and start from scratch? But I am not sure how to do that(?).

Edit: oh, or should I have just used "git pull" instead of what I did... But what does that do exactly? After "git pull" should I repeat some of the other steps like "pip install -r requirements.txt"?
But I assume it has no use to try that now as I somehow made a mess of things.

One thought however: could it be that in your newer versions you forgot something (like that missing _soundfile_data\libsndfile64bit.dll) that doesn't give rise to problems for people who use "git pull" to update because maybe "git pull" only adds things, and for those people the things missing in the new version maybe were simply still there from an older version? And when someone starts from scratch (without the old Impulcifer folder I mean now) it would be missing? This is just a vague hunch I have, hope it helps.

I hope I don't sound like a complete fool, but if I do: apparently the Impulcifer installation process is not "foolproof" yet!:)
I haven't touched the dependencies in a while but they do contain some leeway in terms of which version gets installed. Git pull updates the files in the folder to the newest version but doesn't install dependencies so if they have changed then that would have to be done. I'll add that to the instructions. This whole thing is quite unintuitive because these are essentially tools for developers. I definitely need to make the whole thing smoother and user friendly. For the time being I'm very grateful for everyone who reports these problems instead of sulking in silence.
 

Users who are viewing this thread

Back
Top