macro category · beats-bitwrap-io

The live-performance macro catalog (public/lib/macros/catalog.js) rendered as a free monoidal category via DisCoPy. Each macro is a box; wire types encode the project-state footprint (fx:reverb-wet, tempo, pan, decay, mute, …). Two boxes parallel-compose (@) iff their wire sets are disjoint — which is exactly the runtime's conflict resolution made categorical. Companion to control category and .webm anatomy.

Auto-DJ tick — five compatible macros, parallel-composed

One macro from each of FX / Pitch / Pan / Shape / Feel families that lands on disjoint wires. This is the largest stack the runtime can fire concurrently without a wire collision. Auto-DJ's stack-N parameter is bounded above by this picture.

DisCoPy diagram of a parallel-composed Auto-DJ tick

FX family — 13 disjoint wires

Every fx-sweep / fx-hold macro is typed by the fxKey(s) its ops touch. reverb-wash @ delay-throw typechecks (different wires). Two macros that both touch reverb-wet can't parallel-compose — one wins, the other is sequential. The diagram shows each macro on its own wire(s); the gaps between them are the parallel-composability contract.

DisCoPy diagram of the FX macro group

Feel family — touches lp-freq + tempo

Feel macros write the master LP filter and the BPM, so they conflict with both FX (specifically lp-freq) and Tempo macros. The two-wire dom captures that — try parallel-composing a Feel macro with sweep-lp or half-time and DisCoPy refuses.

DisCoPy diagram of the Feel macro group

Mute family

All mute macros consume the mute wire, so they're sequential with respect to each other. The compound macros (double-drop) live on dedicated wires that name their composing steps.

DisCoPy diagram of the Mute macro group

Tempo · Pan · Shape · Pitch

Each on a single wire — within-family macros conflict, cross-family macros parallel-compose freely. Pitch is interesting: it's implemented through master-pitch's FX wire, so a Pitch macro and an FX macro touching master-pitch conflict — but Pitch + any other FX macro is fine.

DisCoPy diagram of the Tempo macro group DisCoPy diagram of the Pan macro group DisCoPy diagram of the Shape macro group DisCoPy diagram of the Pitch macro group

Hits (one-shot) — 4 independent pad wires

All four Beats-tab Fire pads are mutually parallel-composable: each gets its own oneshot:hitN wire. The runtime confirms — you can mash all four simultaneously and they don't step on each other.

DisCoPy diagram of the Hits one-shot group