-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convincing proximity simulation #1113
Comments
The panning artifacts with NFC is due to the filter parameters changing with distance, which changes the frequency response. This is primarily an issue in higher orders (2+) which have more significant low-frequency alterations. This can be fixed by somehow blending or interpolating between the two states. Ideally changes to the NFC filter could be synced with changes to the panning gains and direct/send filters (that is, the old properties fade out together while the new ones fade in, without any bleedover (the new filter properties subtly fading in at the old position that's fading out, and the old filter properties audibly fading out at the new position that's fading in)). But that would be very difficult to do as things currently are. As for the inconsistent bass response, that's likely due to differences in the HRTF, since the NFC filter is only boosting (or attenuating) the low frequencies that are already there and these are more difficult to hear frequencies. HRTFs that don't keep much of the very low frequencies will likely have a less audible change, while HRTFs that try to give a more rich bass response will have more a audible change. Regarding the 3DTI code, that source file at least doesn't really have much. It's just a couple functions to convert the given distance and azimuth to an index and give back the ILD (Inter-aural Level Difference; basically the frequency FIR filter) for the given ear that was already loaded into the relevant arrays. There's no info there about how the near-field effect is done (oddly, the near-field coefficients are separate from the normal ones, even though both include the distance for the index lookup). Interestingly, it seems all the filters only use a fixed 10-sample length, and it doesn't handle height. |
@kcat There's also: @PyrApple Would you mind explaining the magic behind near field in 3DTI AudioToolkit for context with the code? |
3DTI uses warped 4th order IIR [1] fit to a spherical ILD model [2]. Code isn't mine to share, no trickery involved though, won't be too hard to reproduce from papers. [1] Frequency-warped signal processing for audio applications. Harma, Karjalainen, Savioja, Valimaki, Laine, Huopaniemi. J. Audio Eng. Soc. 2000. |
I'm not sure about 1 but OpenAL Soft's SOFA converter has an option for spherical head delay which might be relevant 🤔 openal-soft/utils/makemhr/makemhr.cpp Lines 1265 to 1266 in 0529836
Also I noticed 3DTI apparently was superseded by BeRTA, which includes SOFAs for discrete NFC distances NFC on noticeably improves distance simulation up close, though even after I turned it off, distance simulation was still somewhat convincing, apparently because of the BRIR which seems to be doing some heavy lifting (at least until positioning starts becoming diffuse) but OpenAL Soft seems to already use reverb differently depending on the sound's distance, right? |
I know there's been multiple discussions on ways to improve proximity using Near-Field Control/multi-field, but the issues have been closed even though distance is still not quite convincing yet, and our options come with compromises:
❌Requires
ambi3
which noticeably degrades HRTF positional accuracy compared tofull
nfc=true
.Recordings
NFC_Default_DFC_on.mp4
NFC_D1_44K_16bit_256tap_FIR_SOFA_DFC_off.mp4
NFC_SADIE.II.H6_DFC_off.mp4
✅Sounds a lot more convincing, especially in the "whisper zone", compared to
nfc
(plus doesn't suffer from panning artifacts heard in the clips above), though not as good as CMSS-3D's MacroFX or 3DTI❌Requires an HRTF that has been specifically recorded in multiple fields.
Recording
NFC_SCUT_KEMAR_radius_all-48000_DFC_on.mp4
I'm not really an expert at any of this and I'm not sure if I'm just missing something and comparing apples to oranges (different reverb/air absorption strength/nfc scale/attenuation linearity/max gain/HRTF density?), but ultimately I just trust my ears and I can't get over how well distance is simulated in 3DTI AudioToolkit. Like I can much more easily tell when the sound is in the "whisper zone", at arm's length or a couple meters away, regardless of volume or bass, compared to the same HRTF in OpenAL Soft in the second clip above.
BinauralTestApp_FrGDGriGdp.mp4
Perhaps there are more technical hints about how they're able to achieve this in their code, which is also written C++ though I'm not sure if licenses are compatible at the moment: https://github.com/3DTune-In/3dti_AudioToolkit/blob/master/3dti_Toolkit/BinauralSpatializer/ILD.cpp
The text was updated successfully, but these errors were encountered: