@libraz/libcantus - v0.9.3
    Preparing search index...

    Function scaleByName

    • Build a KeyScale from a named scale (see NAMED_SCALES).

      Parameters

      • name: string

        The scale name, e.g. 'dorian' or 'harmonicMinor'.

      • rootPc: number

        The root pitch class.

      Returns KeyScale

      The key/scale.

      If the name is not a known scale.

      import { scaleByName } from '@libraz/libcantus';
      const dDorian = scaleByName('dorian', 2); // D Dorian, rootPc 2