Index

Grammars, Music and Formal Languages

This article series explores unusual territory: where formal language theory meets algorithmic music. The common thread is BP2SC, a transpiler that converts musical grammars from Bol Processor into SuperCollider patterns.

Each article is designed to be accessible without academic prerequisites, yet rigorous enough to serve as a reference. The series can be read in order or independently based on your interests.


Series I — Introduction

Before diving into theory, let’s set the scene. Why this project exists, what tools it uses, and what problem it aims to solve.

  • I1) Why I created a bridge between two worlds : Discover why I created BP2SC, the bridge between Bol Processor 3 and SuperCollider. Connects formal musical grammars and real-time synthesis for limitless creativity.
  • I2) Bol Processor : Discover the Bol Processor, Bernard Bel’s musical grammar system. Explore its impact on polymetry, Indian music, and algorithmic composition.
  • I3) SuperCollider : Introduction to SuperCollider, the programming language dedicated to sound. Patterns, live coding, real-time synthesis: discover why we chose it for BP2SC.
  • I4) Introduction to MIDI : Explore the MIDI protocol: grasp its principles, strengths, and limitations. Uncover why this 40-year-old standard remains the cornerstone of digital music.
  • I5) MusicXML : Discover MusicXML, the standard format for exchanging digital scores. Learn how it encodes notes, measures, and key signatures for software interoperability.

Series L — Formal Languages

The theoretical foundation of the project. From the Chomsky hierarchy to formal semantics, these articles build step by step the foundations needed to understand how a language works.

  • L0) The Map of Formalisms : Explore the map of formal language formalisms. Understand how syntax, semantics, and concurrency apply to BP3. Essential guide for the L series.
  • L1) Chomsky Hierarchy Explained Simply : Dive into Chomsky’s hierarchy! Discover the 4 types of languages, from regular to recursively enumerable. Essential for understanding language and tool design.
  • L2) Context-Free Grammars : Dive into Context-Free Grammars (CFG) and understand how compilers and parsers interpret the syntax of programming languages. Essential for every developer!
  • L3) EBNF : What is EBNF? Discover this standard meta-language for describing language syntax (Python, JSON…). Learn its operators and key role. Master EBNF!
  • L4) What is an AST? : Explore compilers! Learn what an AST (Abstract Syntax Tree) is, how it simplifies your code, and its key role in compilation. Essential for any developer.
  • L5) The Three Semantics : Discover the 3 formal semantics: operational, denotational, axiomatic. Learn how they define program meaning and select the best approach for your projects.
  • L6) SOS for Dummies : Structural Operational Semantics (SOS) is crucial for understanding language execution. This detailed guide reveals its principles and practical applications.
  • L7) Denotational Semantics : Denotational semantics interprets programs as mathematical functions. Discover this powerful approach to analyze, prove, and optimize the behavior of your code.
  • L8) Axiomatic Semantics : Axiomatic semantics uses pre/postconditions to prove program correctness. Discover Hoare triples, loop invariants, and practical applications.
  • L9) Beyond Chomsky : Beyond Chomsky, explore mildly context-sensitive languages. Discover TAG, CCG, and their crucial importance for natural language and music. An essential article!
  • L10) Attribute Grammars : Knuth’s attribute grammars enrich syntax trees with computable properties. Explore synthesized and inherited attributes, and their link to BP3 flags.
  • L11) Beyond the Three Semantics : Classical semantics have limits. Discover advanced semantics: translational, process, and algebraic. Give meaning to compilers, concurrent systems, and data types.
  • L12) Petri Nets and Process Algebras : Discover how Petri nets and process algebras (CCS, CSP) model concurrency and musical polymetry. An essential guide for formalizing music.
  • L13) Generate or Recognize : Explore the duality of grammars: generation vs. recognition. Why is producing easier than analyzing? Discover this key asymmetry in linguistics and music.
  • L14) The Direction of Parsing : Generation is always top-down. But parsing (LL, LR) has unique directional freedom. Discover this fundamental asymmetry, essential for compilers.
  • L15) The Formulas of Asymmetry : Generation-parsing asymmetry is mathematical. Discover key formulas: O(n) complexity, Catalan numbers, surprisal. Understand its 6 fundamental dimensions.
  • L16) The Paradox of Bidirectionality : Reversible grammars are 50 years old. Why isn’t bidirectionality adopted? This article explores the structural reasons for this persistent asymmetry.
  • L17) The Complexity Matrix : Discover the complexity matrix, revealing the differential coupling between generation and parsing. Understand why their asymmetry isn’t just O(n) vs O(n³).

Series M — Music

The bridge between language theory and music. Formats, paradigms, hierarchical structures: how formal concepts apply to sound.

  • M1) MIDI under the Formal Microscope : MIDI, a formal language? Explore its place in Chomsky’s hierarchy, the lack of full specification, and its implications for musical representation. A must-read!
  • M2) MusicXML Under the Formal Microscope : Discover why MusicXML, despite its formal XSD grammar and its Chomsky Type 2 position, has no musical generative power. A paradox to explore!
  • M3) The Paradigms of Musical Representation : Explore the six musical representation paradigms, from wave to meaning. Discover how these abstraction levels stack and why some tools are more powerful.
  • M4) Generative Grammars and Music : Discover how generative grammars, from Chomsky to GTTM and BP3, have revealed the hidden rules of music. Understand how our brain structures sounds.
  • M5) Polymetry : Polymetry: multiple metrics superimposed. Discover why MIDI and MusicXML struggle to represent it, with roots in African, Indian, and Western music.
  • M6) Hierarchical structure in music : GTTM demystified: explore the hierarchical structure in music according to Lerdahl and Jackendoff. Understand the 4 pillars of our musical perception.
  • M7) The Landscape of Formal Music Languages : Discover 20+ formal music languages, from Csound to TidalCycles. Genealogy, comparative table, and BP3’s unique position. An essential guide!
  • M12) From structure to sound : Discover how BP3, a unique generative language, manages musical abstraction layers, from structure to sound. A practical example with flamenco rumba.

Series B — BP3

A deep dive into BP3 language mechanics: probabilities, alphabets, derivation rules.

  • B1) PCFG : Discover Probabilistic Context-Free Grammars (PCFG): assign probabilities to rules to generate varied, controlled music or text. Essential for BP3!
  • B2) Alphabets, terminals, and non-terminals : Master the key concepts of formal grammars with BP3: alphabets, terminals, and non-terminals. Essential for creating your algorithmic music!
  • B3) Derivation Rules : Discover the 7 BP3 derivation modes and how these strategies transform a grammar into a dynamic and expressive musical generator. Master musical generation.
  • B4) Flags and Decremental Weights : Discover how BP3’s flags and decremental weights model the progressive exhaustion of a musical pattern and conditional execution. Essential dynamic control!
  • B5) Polymetry and Temporal Structures : BP3’s polymetry: temporal compression, parallel voices, and Indian additive signatures. Discover how a musical grammar encodes cyclic time.
  • B6) Homomorphisms, variables and context : Explore BP3’s context-sensitive mechanisms: variables, homomorphisms, wildcards, and context markers, illustrated with concrete musical examples.
  • B7) From BP3 to SuperCollider : Dive into the anatomy of the BP3 SuperCollider transpiler! Discover how bp2sc transforms your musical grammar into playable code, phase by phase.
  • B8) Two Directions, Three Modes : Explore BP3 modes (PROD, ANAL, TEMP): generate, analyze, and explore music with a single grammar. Master this unique bidirectionality.
  • B9) Time-objects : BP3 time-objects go beyond music! Discover how this temporal grammar organizes sounds, videos, robotics, and granular synthesis. A universal multimedia composition tool.
  • B12) The Three Times of BP3 : Explore BP3’s three time levels: Boulez’s smooth time and the _tempo() operator. Understand these musical time concepts in algorithmic composition and their significance.

Reading Paths

“I want to understand the project” — Start with the Introduction series.

“I’m interested in language theory” — Dive into the Formal Languages series, from L1 to L6.

“I want to understand BP3” — Read the basics first (L1, L2) then the BP3 series.


Additional Resources

Glossary — All technical terms explained.


41 articles published — Last updated: 2026-03-24