@libraz/libcantus - v1.1.0
    Preparing search index...

    Function namedScaleMask

    • The mask of a named scale, or undefined when the name is not one.

      Names of NAMED_SCALES, of WORLD_SCALES and of SCALE_ALIASES all answer here, so a caller never has to know which register a scale is kept in.

      Looking the name up through this helper is what keeps 'constructor' or 'toString' from resolving to something inherited from Object.prototype and producing a scale whose mask is a function.

      Parameters

      Returns number | undefined

      The 12-bit mask, or undefined for an unknown name.