Universal Music Theory Library - v0.12.0
    Preparing search index...

    Class FormAnalyzer

    Formal analysis of a chord progression: form type and sections, and reprises.

    Index

    Constructors

    Methods

    • Analyzes harmonic form by segmenting chords into sections of barsPerSection chords (default: auto-detect). Returns form type, labeled sections, and confidence. One chord per bar in choruses of 12 that follow the twelve-bar blues in keySymbol give 'blues-12', one section per chorus.

      Parameters

      • chords: Chord[]
      • keySymbol: string
      • OptionalbarsPerSection: number

      Returns FormAnalysis

    • Finds passages of at least minLength chords that come back later, longest first. Each result is the first occurrence (start, length) of a passage that recurs without overlapping itself; a passage inside a longer reprise already found, or overlapping one, is not reported again.

      Parameters

      • chords: Chord[]
      • minLength: number = 2

      Returns { length: number; start: number }[]

      • length: number

        Number of chords in the passage.

      • start: number

        Index of the first chord of the passage's first occurrence.