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

Adaptive Correction factor #3

Open
tarlanahad opened this issue Sep 28, 2024 · 2 comments
Open

Adaptive Correction factor #3

tarlanahad opened this issue Sep 28, 2024 · 2 comments

Comments

@tarlanahad
Copy link

You have provided a way to supress high range frequencies in FDN.

def get_center_freq(self):
        # TODO compute them for a given min ad max frequency
        if self.octave == 1:
            self.f_bands = [63, 125, 250, 500, 1000, 2000, 4000, 8000]   
            self.correction = np.array([5, 0, 0, 0, 0, 0, 0, 0, 5, 30]) 
        elif self.octave == 3:
            self.f_bands = [63, 80, 100, 125, 160, 200, 250, 315, 400, 500, 630, 800, 1000, 1250, 1600, 2000, 2500, 3150, 4000, 5000, 6300, 8000]
            self.correction = np.array([5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 30])
        else:
            ValueError('Resolutions different form one or one-third octave bands are not supported at the moment')

Would you recommend any adaptive method to change values in the variables correction for maximum similarity between FDN IR and reference IR?

Upon recommendation, I can do it and request you to contribute as well.

Thanks!

@gdalsanto
Copy link
Owner

Hi @tarlanahad! That’s a great question. Adjusting the frequency response of the attenuation filters to improve the match between the target and synthesized RIR is a task that deserves careful study. However, since you have the reference T60 curve, you could iteratively adjust the command gains of the GEQ after analyzing the T60 curve of the synthesized RIR until you achieve a perfect match.

Personally, I’m exploring "lazier" methods for this adjustment. As a proof of concept (though not a perfectly working approach yet), we tried optimizing the command gains of a differentiable graphic equalizer using gradient descent and a cost function based on the STFTs of the target and reference RIRs. You can check it out in my other repository, which is dedicated to a PyTorch library that @GianMarcoDeBortoli and I have been working on recently.

Let me know if it helps!

@tarlanahad
Copy link
Author

I did the iterative FDN, however, although the match between target T60 and L values are perfect (virtually the same) it brings the metallic colour of the FDN back, unfortunately. It probably happens because adjustment changes the modal excitation distribution of FDN back to the unoptimized version.

I will analyze the STFT based method mentioned. Thanks so much for the response!

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

No branches or pull requests

2 participants