Skip to content
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

Low-cost approximation using a hybrid linear-logarithmic sampling scale in frequency #113

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

mauriciovmc
Copy link

This version implements a low-cost approximation using a hybrid linear-logarithmic sampling scale in frequency. For details, see the following publication: da Costa, M. V. M., Biscainho, L. W. P., & Oehler, M. (2023). Low-cost Numerical Approximation of HRTFs: a Non-Linear Frequency Sampling Approach. Proceedings of the 26th International Conference on Digital Audio Effects (DAFx23), Copenhagen, Denmark, 327-334.

@mauriciovmc mauriciovmc changed the title Develop Low-cost approximation using a hybrid linear-logarithmic sampling scale in frequency Oct 12, 2023
@SDX-LV
Copy link
Contributor

SDX-LV commented Oct 15, 2023

Very impressive and useful work - Thank you for sharing the results!

I mostly read through https://www.dafx.de/paper-archive/2023/DAFx23_paper_13.pdf
Could you clarify the intention with this added functionality? As far as I understand:
1 - you are adding 2 new project export parameters:

 bins_per_oct_decim: IntProperty(
        name="Bins/octave",
        description=("Value for distributing the frequencies in log scale," 
                     "in bins/octave."),
        default=18,
        min=0,
        max=36,
        )
    num_octaves_decim: IntProperty(
        name="Num. of octaves",
        description=("Number of higher octaves in which the frequencies will" 
                     "be distributed in log scale."),
        default=2,
        min=0,
        max=6,
        )

2 - The default values will give about 3x performance gain in simulations up to 22.05kHz at the cost of <1 dB (or just 0,3 dB?) precision loss. More aggressive settings can give over 6x performance gain with still acceptable quality loss.
3 - The included post processing will automatically interpolate the log samplings into usual linear, so most of the code (HRIR) is not affected?
4 - to Bypass this new optimization and use normal, full quality Mesh2HRTF simulation user has to select num_octaves_decim = 0 ?
5 - This optimization reduces computation time, but does not alter the RAM memory requirements.

We would need agreement from the team on the new export options and their defaults. Then the tests likely need to be updated. And I could try to update the tutorials to include new options when we have the code ready for testing.

Note, in the conclusions of the paper there is: "Besides, it will be explored the use of upsampling procedures that could correct or restore spectral detail lost when simulating HRTFs using low spectral resolution." I wonder if the focus should be more on smoothing/filtering high frequencies of the HRTF instead of restoring detail, because at high frequencies headphone re-seating, 3D simulation validity and sample-to-sample variances are likely causing more robustness problems than any extra high-frequency HRTF details can add. See some thoughts about post-processing in https://sourceforge.net/p/mesh2hrtf-tools/wiki/Mesh2HRTF%20options/

@mauriciovmc
Copy link
Author

mauriciovmc commented Oct 16, 2023 via email

@SDX-LV
Copy link
Contributor

SDX-LV commented Oct 17, 2023

Thanks for clarifications! let's wait for the feedback from the core team.

I find it very useful what you mentioned "I implemented other functionalities to the code I have here, e.g. smoothing and correction for frequency ranges in which the simulations did not converge."
Hopefully this can be added in a separate pull request or if t really is "smoothing" it could be included as a separate function, a bit like these (which also use mesh2hrtf Python module): https://sourceforge.net/p/mesh2hrtf-tools/wiki/Common_HRTF_conversion_and_analysis/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants