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

Incorrect Bark scale inversion #3

Open
scottlawsonbc opened this issue Jan 7, 2017 · 0 comments
Open

Incorrect Bark scale inversion #3

scottlawsonbc opened this issue Jan 7, 2017 · 0 comments

Comments

@scottlawsonbc
Copy link

scottlawsonbc commented Jan 7, 2017

In Bark.py there are two functions for converting between Hz and Bark units:

    def hz2bark(self, f):
        #       HZ2BARK         Converts frequencies Hertz (Hz) to Bark
        #
        z = 6 * np.arcsinh(f/600)
        return z
    
    
    def bark2hz(self, z):
        #       BARK2HZ         Converts frequencies Bark to Hertz (HZ)
        #
        f = 650*np.sinh(z/7)
        return f

These functions are not inverses of each other.

If we assume that hz2bark(f) is correct, then the correct inverse is f = 600*np.sinh(z/6), not f = 650*np.sinh(z/7).

The difference between the correct and incorrect version is shown below

image

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

1 participant