Skip to content
roomi fields

Music and formalisms · M4 · Course

Generative Grammars and Music

What if music, like language, obeyed hidden rules that our brain unconsciously applies, revolutionizing linguistics and then musicology?

Published 10 February 2026 · updated 15 February 2026 · Lire en français

From Chomsky to GTTM

What if music, like language, obeyed hidden rules that our brain unconsciously applies? This idea revolutionized linguistics in 1957, then musicology in 1983.

Where does this article fit in?

This is where the two major series meet: the theory of formal languages (L1, L series) and musical representation (M3, M series). This article shows how Chomsky’s grammars were adapted to music, paving the way for I2 (Bol Processor) and GTTM (A Generative Theory of Tonal Music, Lerdahl and Jackendoff’s generative theory of tonal music, 1983).


Why is this important?

When you listen to a melody, your brain does remarkable work: it groups notes into phrases, identifies tensions and resolutions, and anticipates what comes next. You do all of this without thinking, even without musical training. How is this possible?

The generative grammars hypothesis offers a fascinating answer: our brain would possess innate “rules” for structuring sounds, whether speech or music. This idea, born in linguistics with Noam Chomsky (American linguist, born in 1928), has profoundly influenced how we understand, analyze, and even generate music.

For anyone interested in formal musical notation (like BP3, the Bol Processor — see I2) or automatic analysis, understanding this intellectual lineage is essential. It explains why some formalisms work and others fail.

Quick Timeline

  • 1957: Chomsky publishes Syntactic Structures, birth of generative grammars
  • 1983: Lerdahl and Jackendoff publish GTTM (A Generative Theory of Tonal Music)
  • 1990s: Bernard Bel develops BP3, applying these ideas to musical generation

The Idea in One Sentence

A generative grammar is a finite set of rules capable of producing an infinite set of valid structures, whether sentences or musical sequences.


Let’s Explain Step by Step

Example 1: French Sentences

Let’s start with language. In French, you can create an infinite number of correct sentences that you’ve never heard:

“Le chat violet de ma voisine mange des spaghettis sur le toit.”

This sentence is probably new to you, but you immediately know it’s grammatically correct. How? Because your brain applies implicit rules:

Sentence → Subject + Verb + Complement
Subject → Article + Noun + (Noun Complement)
Noun Complement → "de" + Subject

With these few rules, an infinite number of sentences can be generated. This is Chomsky’s fundamental intuition: a finite number of rules can generate infinite creativity.

Example 2: A Melody that “Works”

Now, mentally listen to these two sequences:

Sequence A: C - D - E - F - G - C (ascending, resolved) Sequence B: C - F# - Bb - E - Db - A (random intervals)

Even without musical training, sequence A seems “logical” to you, while B seems chaotic. Why? Because A respects implicit rules of Western tonality:

  • Stepwise motion (neighboring notes)
  • Beginning and ending on the tonic (C)
  • Coherent direction (ascent then resolution)

These rules are exactly what a musical grammar attempts to formalize.


The Chomsky Revolution (1957)

The Context

Before Chomsky, linguistics was dominated by behaviorism: it was thought that language was learned solely through imitation and reinforcement. A child hears sentences, repeats them, and their errors are corrected.

The Poverty of the Stimulus Problem

Chomsky demonstrated that this explanation was insufficient. Consider:

  1. Children produce sentences they have never heard
  2. They make systematic errors (“I goed” instead of “I went”) that reveal the application of rules
  3. The amount of language heard is insufficient to explain the acquired mastery

His conclusion: the human brain possesses an innate “universal grammar”, a set of principles that constrain possible languages.

Rewrite Rules

Chomsky formalized grammars with production rules:

S  → NP VP          (a sentence = noun phrase + verb phrase)
NP → Det N          (noun phrase = determiner + noun)
VP → V NP           (verb phrase = verb + noun phrase)
Det → "le" | "un"
N  → "chat" | "chien"
V  → "mange" | "voit"

These rules generate sentences like “le chat mange un chien” or “un chien voit le chat”. Simple, yet powerful.


The Transfer to Music: What Works

Hierarchical Structure

The major discovery that transfers from linguistics to music is hierarchy. Just as a sentence breaks down into clauses, then phrases, then words, a musical piece breaks down into:

  • Movements
  • Sections
  • Phrases
  • Motifs
  • Notes

This tree-like structure allows us to understand how music is perceived at multiple scales simultaneously.

Why a tree and not a simple list?

Imagine “Frère Jacques” as a flat list: C, D, E, C, C, D, E, C… We lose the crucial information that “C D E C” forms a group (the “Frère Jacques” motif).

With a tree:

SongPhrase1MotifCDECMotifCDECPhrase2MotifEFGMotifEFG

Figure 1 — Hierarchical structure tree of “Frere Jacques”. The levels (root, phrases, motifs, notes) illustrate the inclusion relationships that our brain unconsciously constructs.

The tree captures inclusion relationships: a motif belongs to a phrase, which belongs to the song. This is the structure that our brain unconsciously constructs.

Recursion

Recursion — the ability of a rule to apply to its own result — also exists in music:

In linguistics:

“The cat [that the dog [that Pierre saw] bit] is black.”

In music:

  • A theme contains a motif
  • A variation develops the theme (which contains the motif)
  • A sonata develops the variation (which develops the theme, which contains the motif)

Production Rules

BP3 (Bol Processor 3), developed by Bernard Bel in the 1990s, explicitly uses production rules to generate music:

S → _tempo(80) A B A
A → C D C
C → do re mi | mi re do
D → fa sol la sol fa
B → D C D

How to read this grammar?

  • S → _tempo(80) A B A: the starting symbol S rewrites with a tempo of 80 BPM (beats per minute), followed by three sections A, B, A
  • C → do re mi | mi re do: the | symbol indicates a choice (random or weighted) between two alternatives
  • Uppercase letters (S, A, B, C, D) are non-terminals (intermediate symbols), lowercase letters (do, re, mi…) are terminals (the notes played)

This grammar can generate several different melodies depending on the choices made at each | (or). This is exactly Chomsky’s principle applied to music.


The Transfer to Music: What Needs to Be Adapted

The differences between language and music are often presented as incompatibilities that would invalidate the grammatical approach in music. In reality, they are differences of degree — and recognizing them only helps to better calibrate the necessary formal tools.

Compositionality: Propositional vs. Perceptual

In linguistics, meaning composes: “big black cat” = meaning(big) + meaning(cat) + meaning(black). This is the principle of semantic compositionality (attributed to Frege, German logician, 1848-1925).

In music, composition also exists, but it operates on a different level:

  • A cadence V→IV \to I (dominant → tonic) composes tension + resolution = rest
  • A crescendo on a dissonance composes intensity + instability = anticipation
  • A transposed motif composes the original motif + a shift = development

The difference: linguistic compositionality is propositional (it constructs statements about the world, which can be true or false). Musical compositionality is perceptual and affective (it constructs experiences of tension, movement, resolution, surprise). It’s a shift in register, not an absence.

Functional Categories: Fixed vs. Contextual

In linguistics, words are classified into functional categories at the same level of abstraction: noun, verb, adjective, adverb, preposition… In music, comparable functional categories exist at the same level (that of the note):

Linguistic Categories (word level)Musical Categories (note level)
Noun → can be subjectTonic note → point of rest
Verb → carries the actionPassing note → movement between two poles
Adjective → qualifiesAppoggiatura (ornamental note that creates tension before resolving) → expressive ornament
Adverb → modifiesNeighbor tone (decorative neighboring note) → neighboring note

The main difference: in linguistics, “cat” is a noun in (almost) all contexts. In music, a D is “tonic” in D major but a “passing note” in C major. Musical categories are more contextual.

But even in linguistics, context plays a role: “marche” is a noun (“la marche” - the walk) or a verb (“il marche” - he walks) depending on the sentence. “Run” in English is a noun or a verb. So categories are not absolutely fixed either — the difference is, again, one of degree.

Beware of the trap: one must not confuse functional categories (all at the same level) with hierarchical levels (note → motif → phrase → section). This confusion would be equivalent, in linguistics, to comparing “noun, verb, adjective” with “word, phrase, clause, sentence” — these are two distinct axes of analysis.

And the Question of Musical Meaning?

The signifier-signified relationship in music — the connection between the musical sign and what it “designates” — is a vast subject that goes beyond the scope of this article. Let us simply note that the musical sign IS arbitrary in the sense of Saussure (Swiss linguist, 1857-1913): the same pitch is called “do” in solfège, “C” in Anglo-Saxon notation, and “sa” in Indian music — just as “arbre”, “tree”, and “Baum” designate the same concept. The parallel with linguistics here is stronger than often believed, and an in-depth study of the informational content of musical structures would probably reveal more similarities than differences with language.

What These Differences Imply for Musical Grammars

These two shifts — perceptual compositionality and contextual categories — do not invalidate the grammatical approach. They explain why musical grammars need adaptations compared to linguistic grammars:

ShiftNecessary AdaptationExamples
Perceptual compositionalitySemantics of tension/resolution rather than truthGTTM: prolongational reduction; BP3: weighted PCFG (B1)
Contextual categoriesPreference rules rather than rigid categoriesGTTM: GPR, MPR; BP3: contextual flags (B4)

This is exactly what GTTM (1983) and BP3 did — and that’s why they work.


The Pioneers: From 1957 to 1983

Early Attempts (1960s-70s)

Before GTTM, several researchers attempted to apply Chomsky’s ideas to music. These attempts met with mixed success but paved the way.

Leonard Meyer (American musicologist, 1918-2007), in Emotion and Meaning in Music (1956, even before Chomsky!), had already proposed that our musical perception relies on expectations and their resolution. When a melody creates tension on the dominant (the 5th degree of the scale, for example G in C major), we “expect” a resolution on the tonic (the 1st degree, C). This intuition would be formalized later.

Sundberg and Lindblom (1976) created one of the first formal musical grammars to generate Swedish children’s songs. Their grammar looked like this:

Song → Verse Verse
Verse → Line Line
Line → Motif Motif | Motif Variation
Motif → Note Note Note Note

The result was functional but rigid: the generated melodies were grammatically correct but lacked “life”.

Heinrich Schenker, long before the computer era (1920s-30s), had developed a theory of musical reduction. For Schenker, any tonal piece could be reduced to a fundamental structure (Ursatz, literally “original structure” in German — the underlying harmonic and melodic skeleton). This idea of analysis by hierarchical levels would directly influence GTTM.

Why These Early Efforts Failed

Purely Chomskyan grammars applied to music had a problem: they did not capture gradation. In linguistics, a sentence is either grammatical or not — “The cat sleeps” is correct, “Cat the sleeps” is not.

In music, things are more nuanced. A melodic sequence can be:

  • Perfectly idiomatic (very “musical”)
  • Acceptable but unusual
  • Technically possible but strange
  • Impossible to play

This gradation required a new type of rules: preference rules, a major innovation of GTTM.


GTTM: The 1983 Synthesis

Lerdahl and Jackendoff

In 1983, Fred Lerdahl (American composer and theorist, born in 1943) and Ray Jackendoff (American linguist, born in 1945, former student of Chomsky) published A Generative Theory of Tonal Music, abbreviated GTTM. Their objective: to formalize the musical intuition of a competent listener of Western tonal music.

GTTM in one sentence

GTTM is a theory that describes how our brain automatically structures tonal music into groups, metrical levels, and tension/resolution relationships.

The Four Components

GTTM proposes that our musical perception constructs four parallel structures:

  1. Grouping structure: How notes group into motifs, phrases, sections
  2. Metrical structure: The alternation of strong and weak beats
  3. Time-span reduction: Which notes are more important than others
  4. Prolongational reduction: The relationships of tension and relaxation

Preference Rules

GTTM’s major innovation is the concept of preference rules. Unlike Chomsky’s strict rules (a sentence is either grammatical or not), GTTM’s rules indicate tendencies:

  • GPR 2a: A group tends to end when there is a silence
  • GPR 3a: A group tends to end when there is a large interval

What do these acronyms mean?

  • GPR = Grouping Preference Rule (preference rule for grouping)
  • MPR = Metrical Preference Rule (preference rule for meter)
  • TSRPR = Time-Span Reduction Preference Rule (rule for time-span reduction)
  • PRPR = Prolongational Reduction Preference Rule (rule for prolongational reduction)

Each rule is numbered: GPR 2a is sub-rule “a” of the 2nd grouping rule.

These rules can conflict. The final interpretation results from their weighting, which explains why different listeners can perceive the same piece differently.

A Concrete Example: “Frère Jacques”

Let’s apply GTTM to a melody everyone knows. Sing it mentally:

Bro - ther  John,   Bro - ther  John,
C     D    E     C     C     D    E     C

Are - you   slee - ping? Are - you   slee - ping?
E     F    G     E     F    G

Grouping structure: Our perception naturally segments into 4 groups of 2 measures. Why?

  • GPR 2a: implicit silences between phrases (we catch our breath after “John”)
  • GPR 3 (similarity): the repetition of the “Brother John” motif creates a group

Metrical structure: Strong beats on “Bro”, “John”, “Are”, “ping”. The melody coincides with the strong beats (MPR 5: important notes fall on strong beats).

Time-span reduction: The notes C-E-G form the harmonic framework (the C major chord). The other notes (D, F) are ornamental “passing notes” — if only C-E-G were kept, the melody would remain recognizable.

This formal analysis corresponds to our listener’s intuition — that is exactly GTTM’s objective.

Another example: “Au clair de la lune”

By   the    moon - light, my   friend   Pier - rot
C    C      C    D    E    D    C     E   D    D     C

Grouping: two groups (pause after “lune” = GPR 2a) Reduction: C-E-C = framework (broken C major chord)


BP3: Heir to This Tradition

Bernard Bel developed BP3 (Bol Processor 3) to represent Indian musical structures, particularly tabla compositions. His contribution was to create a formalism that:

  1. Uses generative grammars to describe rhythmic patterns
  2. Manages polymetry (superposition of multiple simultaneous meters, see M5 (upcoming))
  3. Allows contextual rules (similar to Chomsky’s context-sensitive grammars — see L1)

Example of a BP3 grammar for a tabla pattern:

S → Theka Theka Tihai
Theka → dha dhin dhin dha | dha dhin dhin dha dha tin tin ta
Tihai → X X X
X → dha ti dha ge na dha ti dha ge na dha

This grammar captures the recursive structure of the repertoire: a tihai (final cadence) repeats a motif three times, which itself can contain sub-patterns.

Why BP3 Goes Further Than GTTM

AspectGTTMBP3
DirectionAnalysis (understanding a piece)Generation (creating a piece)
TraditionWestern tonal musicAny music (Indian, African…)
RulesPreference (tendencies)Production + weighting
TimeSingle tempoNative polymetry (see M5)
OutputStructural treesPlayable music (MIDI — Musical Instrument Digital Interface, see M1 — sound)

BP3 does not seek to model human perception (like GTTM), but to provide a flexible composition tool. This difference in objective explains different design choices.


Summary Timeline

To place the ideas in time:

YearEventContribution
1920-30Schenker, Der freie Satz (published posthumously)Analysis by hierarchical reduction
1956Meyer, Emotion and Meaning in MusicExpectation and resolution
1957Chomsky, Syntactic StructuresGenerative grammars
1976Sundberg & LindblomFirst formal musical grammar
1983Lerdahl & Jackendoff, GTTMPreference rules
1990sBel, Bol Processor 3Grammars for generation
2000sComputational implementationsAutomated GTTM

This intellectual lineage shows how an idea born in linguistics was progressively adapted, criticized, and enriched to apply to music.


Key Takeaways

  • Chomsky (1957) showed that language obeys finite generative rules producing infinite creativity.
  • What transfers to music: hierarchy (notes → motifs → phrases → sections), recursion, production rules.
  • What needs to be adapted: compositionality is perceptual (tension/resolution) rather than propositional (true/false), functional categories are contextual rather than fixed. These differences are of degree, not nature — and the signifier-signified parallel between language and music is stronger than often believed.
  • GTTM (1983) adapts the generative approach to music with “preference rules” that model our listener intuitions.
  • BP3 applies these principles to concrete musical generation, particularly for Indian music.

Further Reading

  • Chomsky, N. (1957). Syntactic Structures. Mouton. — The foundational work.
  • Lerdahl, F. & Jackendoff, R. (1983). A Generative Theory of Tonal Music. MIT Press. — The reference in musical grammar.
  • Bel, B. (1998). “Migrating Musical Concepts: An Overview of the Bol Processor”. Computer Music Journal, 22(2). — On BP3.
  • Patel, A. D. (2008). Music, Language, and the Brain. Oxford University Press. — The neuroscience of the music/language parallel.

Glossary

  • Behaviorism: A school of psychology (early 20th century) that explains learning solely through stimulus-response, without reference to innate mental structures.
  • BP3 (Bol Processor 3): Musical grammar software developed by Bernard Bel (1990s), designed for Indian and African music.
  • Chomsky, Noam: American linguist (born 1928), founder of the theory of generative grammars.
  • Neighbor tone: An ornamental note adjacent to a main note, which moves away by one step and then returns to it (e.g., C-D-C).
  • Cadence: A chord progression that punctuates the end of a musical phrase (e.g., V→IV \to I = dominant → tonic).
  • Semantic compositionality: Principle (attributed to Frege) according to which the meaning of an expression is constructed from the meaning of its parts (“big cat” = meaning(big) + meaning(cat)).
  • Dominant: The 5th degree of the scale (e.g., G in C major), which creates tension calling for resolution to the tonic.
  • Frege, Gottlob: German logician (1848-1925), founder of modern logic, to whom the principle of compositionality is attributed.
  • GPR (Grouping Preference Rule): In GTTM, a preference rule for grouping notes into phrases.
  • Generative grammar: A set of formal rules capable of producing all valid structures of a language.
  • Universal grammar: Chomsky’s hypothesis that all humans are born with innate linguistic principles.
  • GTTM (A Generative Theory of Tonal Music): Lerdahl and Jackendoff’s theory (1983) formalizing the perception of tonal music.
  • Hierarchy: Organization in nested levels (tree), where each element belongs to a higher-level element.
  • MPR (Metrical Preference Rule): In GTTM, a preference rule for metrical structure (strong/weak beats).
  • Passing note: A note that connects two structural notes by stepwise motion (e.g., D between C and E).
  • Recursion: Property of a rule that can apply to its own result, allowing for nested structures.
  • Production rule: A rule of the form A→BA \to B indicating how to rewrite a symbol.
  • Preference rule: In GTTM, a rule that indicates a tendency rather than a strict obligation.
  • Saussure, Ferdinand de: Swiss linguist (1857-1913), founder of structural linguistics, known for the notion of the arbitrariness of the sign.
  • Referential semantics: The ability of language to talk about things in the world (the word “cat” refers to an animal).
  • Grouping structure: Hierarchical organization of musical events into units (motifs, phrases, sections).
  • Tihai: In Indian music, a final cadence where a motif is repeated three times, leading to the sam (the first beat of the rhythmic cycle, a point of convergence).
  • Tonic: The resting note or chord of a tonality (e.g., C in C major), the point of tension resolution.
  • Ursatz: Schenker’s term (German, “original structure”) referring to the fundamental harmonic and melodic skeleton of a tonal piece.

  • L1 — Chomsky Hierarchy — the formal framework of grammars
  • M3 — The three paradigms of musical representation
  • M5 — Polymetry — superposition of meters
  • M6 — Hierarchical Structure in Music: GTTM in depth
  • I2 — Bol Processor — introduction to BP3
  • M1 — MIDI under the formal microscope
  • B1 — BP3 Probabilistic Grammars — first entry in the B series

Prerequisites: L1 — The Chomsky Hierarchy, M3 — The three paradigms Reading time: 12 min Tags: #chomsky #gttm #grammars #linguistics #musicology #bp3


Next article: M5 — Polymetry


← Back to index