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

Loudness is computed in a wrong way #31

Open
nielsrolf opened this issue Nov 26, 2021 · 2 comments
Open

Loudness is computed in a wrong way #31

nielsrolf opened this issue Nov 26, 2021 · 2 comments

Comments

@nielsrolf
Copy link

nielsrolf commented Nov 26, 2021

Hello,
Some time ago, I noticed a bug in compute_loudness in magenta/ddsp, and I think this repo has a similar issue. Below is the loudness curve extracted for a sine wave with pitch interpolating linearly between 100Hz to 4000Hz
image
Here is a notebook that compared the magenta/ddsp loudness, the proposed fix and the loudness as computed by this repo. I would be happy to create a pull request if you agree that this should be fixed.
Here is a colab notebook that generated the graph above

@caillonantoine
Copy link
Collaborator

Hi! Thanks for the issue ! About the PR, sure! Most of the preprocessing stuff is heavily inspired from the original repo so I guess it could use a fix !

@nielsrolf
Copy link
Author

Do you prefer to keep the loudness computation in librosa/numpy over doing it in torch as well? I imagine there could be cases where you'd like to backpropagate through this, for example when you do self-supervised training like in the inv-DDSP paper (although that particular model does not use compute_loudness at all).

nielsrolf added a commit to nielsrolf/ddsp_pytorch that referenced this issue Nov 26, 2021
…ting and make the function differentiable
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