Introduction to MStruct

What is MStruct?

MStruct is a text-based system for describing and presenting musical structure, inspired by Notations of simai and LaTeX, and developed by Polymath9.

The MStruct system has three components:

  1. MStruct files and the editor

    • An MStruct file, also called a music-structure analysis file or simply an analysis, is a text file that follows a defined syntax. You can edit it with the MStruct editor or any other text editor.

    • An MStruct file records chord symbols, Roman-numeral analyses, tonal references, formal structure and other analytical tags at measure and beat positions, describing the structure and progression of the music rather than its individual notes.

    • An MStruct file may be linked to MStructTime timeline files, allowing its preview to follow a particular recording.

    • Here is an example of the text in the analysis section (MAIN):

      Source

      Rendered result

      {BN:1}{BPM:1/4=120}{TS:4/4}{TC:C}
      {1/4}C|I,F|IV,G7|V7,;
      {1}C|I</PAC>;
  2. The MStruct renderer

    • The MStruct renderer turns a file into a readable analytical score; the right-hand side of the example above shows the rendered result.

    • The renderer also provides chord details and synchronized playback. You can try these features on song pages or in the offline MStruct editor.

  3. The MStruct search system

    • The MStruct search system uses a query syntax to find events, tags, chords and chord progressions that meet specified conditions in one or more analysis files.

    • Example:(0)*!(*/*||*on*)|*,(2)*!(*/*||*on*)|*,(4)m*!(*/*||*on*)|*

      • This finds IV-V-vi progressions, or bVI-bVII-i under a relative-minor reference, regardless of the Roman labels used in the analysis. Slash chords and polychords are excluded.

The scope of MStruct

MStruct was designed primarily to record chords and harmonic or Roman-numeral analyses, using harmonic events as the temporal framework for tonal, scale, modal and formal annotations.

Consequently, it is better suited to some musical styles than others, and some styles fall largely outside its analytical scope.


The amount of useful information MStruct can record varies with the style. The following categories are ordered by design priority, from highest to lowest:


    • Music based on common-practice harmony, including:

      • Most classical music of the Common Practice Period;

      • Most harmony-driven modern popular music, jazz and electronic music based on related harmonic structures.

    • This is the highest design priority of MStruct. It can usually record substantial useful information about this music and include it in the archive's search index.


    • Music that mainly uses traditional tertian or quartal chords but has weak harmonic functions or ambiguous tonal centres, including:

      • Late-Romantic and Impressionist classical music;

      • Modal jazz;

      • Other music using these harmonic structures.

    • Chord symbols, formal structure and comments can usually preserve useful information about this music. Roman-numeral analysis plays a smaller role and may be inapplicable in some passages.



      • Popular and electronic music driven primarily by rhythmic and timbral change rather than chord progressions;

      • This music often remains within a tonal harmonic framework, using simple progressions while placing much of its musical information in changes of rhythm and timbre.

    • MStruct can record its overall harmonic structure as a searchable harmonic index and a source of simple examples. It offers limited quantitative information about the non-harmonic features that drive the music.


      • Tonal polyphony with elaborate counterpoint, including some works by Bach and Beethoven;

    • MStruct can record the harmonic changes, but its harmonic reduction does not encode the individual melodic lines, so information needed for traditional contrapuntal analysis is lost.


    • Music organised primarily through melodic lines, with vertical structures largely outside traditional tertian or quartal harmony, including:

      • Gregorian chant;

      • Some modern polyphony;

      • Serial music.

        • Serialism is singled out here because the ordering and horizontal development of a series are often central to its organisation.

        • Atonality alone does not rule out useful analysis: some freely atonal music still uses triadic sonorities while seeking an approximately equal weighting of the twelve pitches. These harmonic aspects may permit limited quantitative analysis.

    • Music organised primarily through timbral change, such as spectral music;

    • Music outside twelve-tone equal temperament (xenharmonic music), including some works by Jacob Collier;

    • For these categories, MStruct can generally offer little quantitative analysis. Its role may be limited to organising some song metadata and, where applicable, identifying modes or scales in particular passages.