@onjmin/chord-parser
    Preparing search index...

    Function detectKey

    • 曲全体のノートから、最も確からしいキー(調)を推定する。 転調は考慮せず、曲全体を 1 つのキーとして要約する。

      Parameters

      Returns KeyCandidate[]

      相関スコア順に並んだ KeyCandidate の配列(24 通り)

      detectKey([0, 2, 4, 5, 7, 9, 11])[0].name        // => "C major"
      detectKey([{ pitch: 0, duration: 4 }, { pitch: 7, duration: 2 }])