home/ modules/ glicol-debugging-and-performance-craft

Glicol: diagnosing errors and keeping audio alive under pressure

  • learner can predict and avoid the five most common Glicol parse errors — unbalanced chevrons, undefined bus references, missing out: line, multiple chains per line, and unknown node names — before they occur
  • learner can interpret every Glicol TUI error message and restore the last-known-good graph to audio within 30 seconds
  • learner can route audio chains and reference buses correctly, including the tilde-bus silent-until-referenced rule and the all-non-tilde-lines-go-to-DAC summing model
  • learner can identify Glicol's limits (no embedded samples, no mini-notation, no music-theory primitives, BPM locked at launch) and work around each without leaving the tool
  • learner can write and deploy a panic patch that survives offline, gang clipping, and sample-folder absence

Build a three-voice Glicol session from a cold start at a chosen BPM (set with the launch flag, since it cannot change in-file): a percussive hit that fires from an `imp`/`seq` trigger, a pitched melodic line, and a slow pad driven by a `~lfo` bus. Because Glicol has no note names, scales, or chord primitives, hand-code the melodic pitches — either as `seq` integers routed through a `mul` so the pitch ratio becomes real frequency (not the ~1 Hz rumble a raw `seq → sin` produces), or as bare frequencies with explicit decimal points — and lay out the `seq` so top-level spaces divide the bar while adjacent digits subdivide a step. Load one drum sample, demonstrating that it must live in a local `samples/` folder separate from Strudel's dirt-samples, and keep summed gains attenuated so nothing clips (Glicol has no limiter). Confirm every non-`~` line reaches the DAC while the `~lfo` bus stays silent until referenced. Then deliberately introduce each of the five most common parse errors one at a time — unbalanced chevrons, undefined bus reference, missing `out:`/`out` line, two chains on one line, and an unknown node name (including one node that glicol.org documents but the 0.13.5 CLI cannot parse) — observing that the last good graph keeps playing, reading what the TUI reports, and fixing each within 30 seconds. Finish by corrupting the session to silence via an unresolved bus reference, swapping in your panic patch, and narrating what each line does and why it survives sample-folder absence, feedback/gain runaway, and every known parse trap. In a short write-up, name three things Glicol deliberately cannot do (mini-notation/Euclid, music-theory vocabulary, in-file BPM change) and the workaround you used for each.

Glicol’s text-to-graph model is lean and fast to type, but its parser is unforgiving: a single misplaced >>, a missing out: line, or a bus referenced before it is defined will silence the session or leave the old graph frozen. This module teaches you to fail safely — to read what the TUI is telling you, recover in under 30 seconds, and avoid the traps entirely once you know them.

The arc has three phases. Phase one is structural fluency: you learn the five most common parse errors (unbalanced chevrons, undefined bus references, missing out:, multiple chains per line, unknown node names) by introducing them deliberately in a safe scratch file and reading each error report. Phase two is signal-routing: the tilde-bus silent-until-referenced rule and the all-non-tilde-lines-go-to-DAC summing model are not errors but surprises — a ~bus you forget to reference simply does nothing, and two named out: lines sum to double gain. You practice spotting both in code review before running. Phase three is limit navigation: Glicol’s intentional constraints (no embedded sample bank, no mini-notation, no MIDI note names, BPM fixed at launch) are not bugs; knowing them lets you design around them rather than fighting a wall you cannot move.

The seq pitch-ratio misconception is the single most expensive beginner error: seq 60 _ outputs 1.0, not 60 Hz, so connecting it to sin produces an inaudible ~1 Hz rumble. The fix is a mul 261.63 stage or a synth node (sawsynth, bd) that expects a ratio. glicol-seq-spacing-defines-subdivision pairs with this: top-level spaces divide the bar, adjacent digits subdivide a step — misunderstanding the space rule produces the wrong rhythm before any pitch mistake matters.

The capstone requires a panic patch — glicol-panic-patch earns its place as a part-task drill because writing it once is not enough; it needs to be muscle memory. The canonical panic patch is one ~lfo bus and one out: oscillator chain using lpf, no sp nodes, gain kept gentle. It survives sample-folder absence (G1), satisfies the one-out:-per-file rule (G4), uses balanced >> (G2), and defines the bus before referencing it (G3). The simplest possible single-liner is out: sin 110 >> mul 0.2.

The supporting atoms enrich rather than gate: glicol-graph-oriented-paradigm gives the mental model of why these rules exist (named nodes in a directed graph), glicol-lcs-whole-graph-update explains why a valid edit lands smoothly rather than causing a glitch, and glicol-sequencer-pattern-syntax provides the broader pattern vocabulary that seq-pitch-ratio and seq-spacing-defines-subdivision refine.

Atoms in this module

Required — these gate the capstone

Every >> in Glicol must sit between two nodes; a trailing or orphaned >> is a syntax error
Fact L5 Voice F
Referencing a Glicol bus before it is defined on its own line causes an unresolved-reference error
Fact L5 Voice F
A Glicol file with no out: line produces silence with no error message
Misconception L5 Voice F
Glicol requires exactly one named chain per line; multiple chains on one line cause a parse error
Fact L5 Voice F
A Glicol node name not in the reference is a parse error that leaves the graph unswapped
Fact L5 Voice F
Glicol CLI keeps the previous graph running on a parse error, reporting it in the TUI console
Fact L1 Foundations F
Glicol keeps the last valid graph playing when a save introduces a parse error
Concept L5 Voice F
In Glicol a `~name` bus is silent until another chain references it
Fact L1 Foundations F
In Glicol, every line whose name lacks `~` is sent to the speakers and summed
Misconception L1 Foundations F
Glicol CLI has no embedded sample bank; samples must be placed in the `samples/` folder
Fact L1 Foundations FN
Glicol's sp sample set is separate from Strudel's dirt-samples and requires its own samples folder
Fact L5 Voice F
Glicol has no built-in limiter, so summed lines and high gains clip hard
Principle L1 Foundations FD
A large mul or an unattenuated feedback bus in Glicol clips loudly with no error
Principle L5 Voice F
A Glicol feedback bus with gain ≥ 1 explodes — keep loop gain below 1
Principle L1 Foundations F
Glicol BPM is set at launch with `-b` and cannot be changed in-file during a session
Fact L1 Foundations F
Glicol has no mini-notation, Euclidean syntax, or per-step probability operators
Fact L1 Foundations F
Glicol has no note names, scales, or chord primitives — pitches are hand-coded as MIDI integers
Fact L1 Foundations F
Glicol has no native scale or chord primitive; pitches must be hand-listed as frequencies or seq integers
Fact L5 Voice F
Glicol.org documents nodes that the CLI version 0.13.5 cannot parse
Misconception L1 Foundations F
Glicol parameters are safest written with a decimal point, as the grammar's float rule wants a `.`
Fact L1 Foundations F
Glicol's `seq` outputs a pitch ratio, not a frequency — feeding it straight to `sin` gives ~1 Hz
Misconception L1 Foundations F
In Glicol `seq`, top-level spaces divide the bar while adjacent digits subdivide a step
Fact L1 Foundations F
Glicol synth and drum nodes are silent without an upstream trigger (`imp`, `seq`, or `speed`)
Misconception L1 Foundations F
The Glicol panic patch is a single out: line with an oscillator, LPF, and no sample references
Procedure L5 Voice F

Supporting — enrichment, not gating

Glicol builds sound by chaining named audio nodes in a directed graph
Concept L2 First instrument FB
Glicol uses the LCS algorithm to update only changed nodes when code is re-evaluated
Concept L3 Craft F
Glicol's seq node divides a bar by spaces and sub-divides each beat with concatenated MIDI numbers
Procedure L2 First instrument F