Writing · Architecture

Domain-driven design for creative computing

Jan 2023 · 2 min read

When I was sketching a DSL for a creative domain (in this case, a computational-composition project), I kept running into the same design decision. Where in the language should the domain's cultural conventions live?

The answer I settled on became a rule I now use across every creative-computing project: put the abstraction at the transformation point, and keep cultural references out of the base language.

In the specific case, the transformation was from sound to composition. The base language handles that transformation. Cultural conventions (traditions, genres, structures, established forms) are defined using the base language, not built into it.

Why this matters:

The base language stays universal. Anyone from any tradition can build on it. If I baked one tradition's conventions into the base, users from another tradition would either fight the language or leave.

Culture becomes composable. Someone from one tradition can extend the language for their needs without breaking someone else's. Two contradictory traditions can coexist as separate extensions.

The language doesn't age. Cultural fashion changes. Domains evolve. If your base language is neutral to those changes, you can extend it. If your base language encodes 2024's conventions, you're locked into 2024.

This generalises well beyond music. Image DSL: put the abstraction at pixel-to-form. Animation DSL: at time-to-motion. Text-generation DSL: at token-to-meaning. Cultural or stylistic references (styles, genres, conventions, brand voices) sit on top, defined in terms of the base primitives.

The design question to ask, before writing a single grammar rule:

What is the invariant transformation this domain performs? Put your language there.

Everything above that line is opinion. Everything below it is implementation. The language itself should sit exactly at the transformation, and nowhere else.

This is a version of domain-driven design, adapted for tools where the domain is creative. Which means the domain has strong opinions of its own, and your language's job is to respect them without adopting them.

Drafted in January 2023
Updated for site in 2026