Skip to content

Incorrect Bark scale inversion #3

Description

@scottlawsonbc

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions