Index
Grammars, Music, and Formal Languages
This series of articles explores an unusual territory: where formal language theory meets algorithmic music. The common thread is BP2SC, a transpiler that converts musical grammars from the 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 depending 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 : Discover the duality of formal grammars: why generating and analyzing are not symmetrical. A key challenge at the intersection of computer science, AI, and music.
- L14) The Direction of Parsing : Generation is always top-down. Parsing (LL, LR) has a unique directional freedom. Discover this fundamental asymmetry, essential for compilers.
- L15) The Formulas of Asymmetry : Why is generating simpler than analyzing? Discover the formulas of generation-parsing asymmetry: complexity, Catalan numbers, and surprisal.
- L16) The Paradox of Bidirectionality : Despite 50 years, bidirectionality in reversible grammars remains rare. Discover why asymmetry is structural and requires a declarative approach in NLP.
- L17) The Complexity Matrix : The complexity matrix dissects generation-recognition asymmetry. Explore 6 sub-problems, differential coupling, and sign reversal. Essential reading!
- L18) Le renversement de signe : Le slogan « générer est facile, analyser est difficile » est faux. La génération sous contrainte sémantique peut être exponentielle, voire NP-complète, dépassant le parsing.
- L19) Le P-chain : Le P-chain révolutionne la psycholinguistique : votre cerveau prédit en produisant pour comprendre. L’erreur de prédiction est le moteur de l’apprentissage. Découvrez ce modèle unifié !
- L20) L’inférence : L’inférence grammaticale : le défi ultime. Impossible (Gold), dure comme casser RSA, elle est le cas extrême de la reconnaissance. Apprendre, c’est compresser.
- L21) The Economy of Laziness and the Ecological Oracle : Explore a groundbreaking thesis on grammar learning. The economy of laziness and the ecological oracle, driving prediction error, reveal a unique process. Click now!
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 : Master PCFG probabilistic grammars for controlled musical generation. Explore how BP3 leverages weights to craft intricate tabla rhythms.
- B2) Alphabets, Terminals, and Non-Terminals in Formal Grammars : Learn to distinguish terminals and non-terminals in BP3. Discover how musical alphabets structure your grammars for algorithmic music composition and theory.
- B3) Derivation Rules: Essential Strategies for Musical Grammars : Master the 7 BP3 derivation modes, from sequential to random, to generate unique musical works. Learn how each strategy shapes your algorithmic creations.
- 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: Exploring Musical Grammars : BP3 polymetry: temporal compression, parallel voices, and Indian additive signatures. Discover how a musical grammar encodes cyclical time in composition.
- B6) Homomorphisms, Variables, and Context in Formal Grammars : Explore homomorphisms, variables, and context in BP3. Discover how these mechanisms go beyond context-free grammars for music. Read more to learn more now!
- B7) From BP3 to SuperCollider: Converting Grammars into Patterns : How does the BP3 SuperCollider transpiler work? Discover the 5 phases of the bp2sc pipeline, from AST to Pdef patterns, to generate algorithmic music.
- 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.
- B11) The AST of BP3: Structure, Invariants, and Music Mapping : Discover BP3’s AST: 29 node types to structure music. Learn how this intermediate code transforms grammar into sound. Click here to read the full article!
- B12) The Three Concepts of Time in BP3: From Boulez to Algorithms : Master BP3 smooth time! From Boulez’s smooth time to the _tempo() operator, discover how to structure musical time within algorithmic composition workflows.
- B13) PolyMake: How to Solve Complex Polymetric Formulas in BP3 : Discover the BP3 PolyMake algorithm: learn how this Polymetric.c function resolves complex polymetry and orchestrates intricate temporal constraints.
Series S — BPscript
- S1) BPscript : BPscript modernizes Bol Processor (BP3). It makes 40 years of powerful formal grammars accessible: simple, typed, browser-executable.
- S2) Three words and twenty-four symbols : Discover BPscript syntax: 3 reserved words, 24 structural symbols. A full overview of the language’s building blocks, by type. Master its richness.
- S3) Types, actors, and bindings : Learn how BPscript symbols use temporal types (gate, trigger, CV) and associate with an actor. Orchestrate multiple instruments with varied tunings.
- S4) The Backticks : Master BPscript backticks to integrate native code (JS, Python…) directly into your compositions. Explore their 3 types and uses for enhanced power!
- S5) Structuring Time : Discover how BPscript allows structuring musical time with polymetry, silences, speed, and Boulez’s concepts. Optimize your compositions!
- S6) Composing with Conditions : Master BPscript flags for dynamic musical composition. Learn guards, mutations, and
on_failto create evolving, reactive paths. Click here! - S10) Under the Hood: The Complete BPscript Technical Pipeline : Discover BPscript’s architecture: from .bps file to sound. Compiler, WASM engine, dispatcher… Dive into the complete anatomy of this technical pipeline.
- S7) The Shared Moment : Manage event simultaneity between runtimes and external synchronization with BPscript’s ! and
- S8) Patterns, captures and templates : Explore advanced BPscript pattern matching: wildcards, variables, homomorphisms, and contexts. Unlock the full potential of your complex musical compositions.
- S9) The Five-Layer Pitch System : Discover BPscript’s 5-layer pitch system. From actor to Hz, resolve pitches for all musical traditions: equal temperament, micro-intervals. Flexibility guaranteed!
- S12) BPscript EBNF: Formal Structure and Syntax Specification : Explore the BPscript EBNF: an analysis of formal grammar, from the @actor directive to engine qualifiers []. A technical guide to mastering the syntax.
- S13) The BPscript AST: Understanding Nodes and BP3 Translation : Discover the BPscript AST anatomy: from ActorDirective to CV instances. Learn how this intermediate tree structures code before the final BP3 compilation.
- S14) Sounds, Specs, and Effects: Mastering Sound Parameters : Discover how BPscript manages sound and effects using three distinct time scales and a CSS cascade. Control all your parameters without any complex patching!
- S15) Transposition Beyond Equal Temperament: Moving Past 12-TET : Why does classical transposition fail outside of 12-TET? Discover how BPscript transposition handles universal tonic shifting for any microtonal scale.
Reading Paths
“I want to understand the project” — Start with the Introduction series (I1 → I5), then explore freely.
“I’m interested in language theory” — L0 (overview), then the fundamentals (L1 → L4), then semantics (L5 → L8, L11).
“I’m interested in languages beyond Chomsky” — L9 (TAG, CCG, MCFG), L10 (Knuth’s attributes), L12 (concurrency and processes).
“The generation/analysis asymmetry intrigues me” — The quadrilogy: L13 (duality) → L14 (LL vs LR) → L15 (formulas) → L16 (paradox). Prerequisites: L1, L2.
“I want to understand BP3” — Read L1 and L2 first, then the BP3 series in order (B1 → B8, B12). For an overview of PROD/ANAL/TEMP modes, go directly to B8.
“Music and formal languages” — M1 and M2 (formats under the microscope), M3 (the 6 paradigms), M4 (grammars and music), M6 (GTTM), M12 (from structure to sound).
Additional Resources
Glossary — All technical terms explained.
60 articles published — Last update: 2026-05-21