OOLOI.ORG
Menu

OOLOI

OVERVIEW

FAQ

DOCUMENTATION

NEWSLETTER

Cutting Corners Is Not Enough

30/10/2026

1 Comment

 
Picture
For almost two weeks now, the number of blog posts has reached an all-time high. The discussions here have all been about music. The turn came almost the moment horizontal spacing and casting off were settled, which is roughly what I predicted in The Machinery of Taste: once the work reached the page, the conversation would follow it into a musician's habitat.
​
My mind has followed it there too – hence all the posts – even though I really should be finishing the file picker's last bells and whistles. It keeps returning to a single ledger line, running between the crossbars of a sharp.

Between the Crossbars

In Dials, stave 4 keeps every sharp tight to its notehead and shortens the ledger lines around it. Under that post, Magnus Johansson asked whether stave 1 could have stave 4's accidental position without shortening C♯6's ledger lines. I said yes: the accidental would then stand on top of the line.

But would it? A sharp's bounding box, the rectangle around its ink, is mostly white space, so a ledger line that reaches into the box isn't necessarily under anything. The upper of C6's two ledger lines is the sharpest case. It runs between the sharp's crossbars, where the only ink is the two stems. Whether a full-length line there lies under the sharp, or merely passes through its white space, depends on exactly where the ink is. The ledger line is in the accidentals territory, but there's no actual overlap of ink.

The animation in Dials couldn't say. It worked from Bravura's bounding box for the sharp, refined by SMuFL's cut-outs: rectangles in a font's metadata that mark a corner of the box as empty. The panel beside stave 4 shows the lower ledger line reaching into one of them. But the space between the crossbars isn't a corner. No corner cut-out describes it, and no corner cut-out could, so the question behind Magnus's request can't be answered from the metadata at all. For engraving at this level, corner cut-outs are far too coarse.

​Cutting corners, in other words, isn't enough.

What the Font Knows

A font can describe a glyph's shape three ways. The bounding box is the coarsest. The cut-outs refine it, where the designer has supplied them. The outline is the ink itself, and every font has one for every glyph.

From the outline, Ooloi keeps each glyph's profiles: how far the ink reaches sideways at every height, and up and down along its width.
​
It isn't only the sharp. Rectangles fare worst against curves, and a flat's bowl is nothing but curve.
Picture
Text fonts, for lyrics and expressions, have no SMuFL metadata at all, but they do have outlines. So when Ooloi reaches the lyric hyphens Malte asked about on NOTATIO, the syllables will be spaced by their real shapes.

Read, Never Rendered

The obvious way to find the ink would be to draw the glyph and look. I considered it and rejected it: a bitmap depends on the software that draws it, so upgrading a graphics library could move a note. A page has to depend on the piece, not on the machine.

Outlines need no drawing. They're already exact numbers, and Ooloi reads them as the font stores them.
​
For the curious: each curve is halved until the polygon around every piece hugs it closely, and the profile is taken from the polygons, which always lie outside the curve. So a profile never cuts into the ink.
Picture
This happens once, when a font is registered. The profiles are stored with it, and layout only ever reads them.
​
(None of the pictures here was drawn by hand, by the way. They were computed from Bravura's actual outlines.)

Down the Mountain

This matters more than any single sharp. In High Hrothgar I described two kinds of notation program: on the mountain, the ones handed a whole piece, which take their time and produce the best pages; in the valley, the ones that answer as you work. Hegazy and Gourlay's casting off was the first piece of the mountain's knowledge to come down. This is the second.

Spacing against the ink has been the mountain's way. LilyPond, which shares Ooloi's lineage from Hegazy and Gourlay, builds the same kind of profiles from glyph outlines (the usual word is skylines), which a program that compiles the whole piece at once can afford. A year ago, in The Lineage: When Ledger Lines Shorten, I wrote that a ledger line shortened beside an accidental, in LilyPond's essay on engraving, sent a tingle down my spine. Fitting, then, that a ledger line beside an accidental should lead back into the same family.
​
What Ooloi adds is the way down. Read once and kept as data, the profiles give a program that answers as you work the mountain's geometry at no cost per keystroke. The springs, the ink itself and an answer while you type: as far as I know, no interactive program has had all three. That's why a ledger line between a sharp's crossbars is worth a post.

Tucking

Engravers have always let accidentals slip under things. When a note is followed by a lower one, its accidental can slide in under the first notehead; in a chord, stacked accidentals interlock. That's tucking (though not in the RuPaul sense), and profiles do it without being told: glyphs come as close as their ink allows, and no rule has to mention a flat or a sharp.
​
Here is F5 followed by C♯5, three ways. With the outlines, the sharp's whole upper half slips in beneath the F.
Picture
​(A caveat about these pictures: they show how close the shapes can come with nothing added for clearance, so with outlines the sharp actually touches the F. Real spacing keeps a gap. What matters is the order: boxes allow the least, cut-outs a little more, outlines the most.)

Some engravers call all of this kerning, whatever slides into whatever. It's a good analogy: in metal type, a kern was the part of a letter that hung over onto the next. But letters share a baseline and notes don't, so it isn't quite accurate.
​
Which brings me back to the line between the crossbars. Here is C6 followed by C♯6's sharp, as close as the outlines allow; the dashed sharp is where the boxes would put it.
Picture
In this gap the cut-outs don't help at all; only the outline lets the two come closer. And it answers the question behind Magnus's request: up to the sharp's left stem, the line runs through white space. Only beyond it is it under the ink.

Too Much of a Good Thing

​Look how far those ledger lines go, though: right up to the stem, further than an engraver would let them.

Going back to boxes would be the wrong cure: they'd hold the lines back for the wrong reasons, and in the wrong places too. ADR-0055 has a dial instead, the opening width. Openings narrower than it are filled in before spacing, and only the wider ones are left for tucking.
​
Here is that gap again, with the opening open, partly filled and filled. Because a sharp's crossbars slope, the dial works gradually rather than like a switch.
Picture

The Other Direction

​So far, everything has been horizontal. Read from above, the same profiles tell a slur how close it may come, and two staves how close they may stand. Measured from the outlines, the slur (solid) sits noticeably lower than when measured from boxes (dashed).
Picture
Good engravers overlap things on purpose, and to do that you need to know exactly where the ink is. The same knowledge decides other things too: in this bar, whether the accent might go outside the slur instead, house style permitting.
​
So, back to where this started. A sharp can stand over a full-length ledger line, and Ooloi knows whether that line is under its ink or only in its white space.

The mechanism is in ADR-0056, Glyph Geometry from Outlines. Seven other ADRs have been brought into line with it, ADR-0055 and its dials among them.
​
And now, back to finally getting that file picker out of the way, even though this is so much more interesting. After all, it's the very thing I've been building the architecture for.

It's a lovely feeling.
1 Comment

Dials

29/10/2026

10 Comments

 
In the comments to Ut Tensio, Sic Vis I told Magnus Johansson that Hegazy and Gourlay provide the physics, I provide the dials, and the user provides the artistic judgement. I meant it as a summary, but it also is a work plan. 

The physics has had several posts of its own. This one is about a few of the dials: what they are, what each is called, what kind of control it is, and what it does to the page. Two animations show them at work. The first is about what takes the room when a system is looser than its notes need. The second answers the question Magnus asked in those comments, which NOTATIO took up almost at once: who gives way when an accidental meets a ledger line?

Who Takes the Room

​When a system has more room than its notes need, something has to take it. Which notes take it is decided by a single setting, the stretch dial: a slider from 0 to 100%, shown in the animation at three positions, labelled λ = 0, 0.5 and 1.
Picture
At 0, the whole distance from one note to the next stretches. Every gap grows in proportion to its ideal width, so a loose system is simply the ideal one, scaled. At 100%, only the air stretches: the white space left over once the noteheads have taken theirs. The half note then takes most of the room, and the sixteenths stay together. That end of the slider is LilyPond’s behaviour. At 50% the two share it, and the slider can stop anywhere along the way. Where its default belongs is for the plates to say, not me.

Watch three moments. While the bar is compressed, all three rows are identical, because the dial only acts when there’s room to spare. At r = 0, the ideal spacing, they’re still identical, with the gaps before the sharps held open at exactly the width the sharps need. Then the barline moves out, and the rows go their separate ways.
​
The gauges show the adjustment ratio, r, the number the line breaker judges each system by. At −1 the music is as tight as it can go; at 0 it's ideal; the green band is the looseness the breaker accepts. All three gauges agree at every width, and that's deliberate: the breaker judges a system by how much room it has to spare, not by which notes take it. So the dial never changes its verdict. It decides where the room goes and nothing else, which means it can't move a line break, and turning it never obliges you to adjust anything else to keep the casting off sound.

Note that in practice, r is as close to 0.0 as possible: that's the entire purpose of casting off. Values for r near -1 are very extreme and rarely or never appear, unless you force it explicitly. So keep in mind that an r of -1 results in the music having lost all rhythmic proportionality. But – with Hegazy-Gourlay's algorithm, you still get no horizontal collisions.

Who Gives Way

Magnus asked whether the C♯4 and A♯5 in the ‘Ut Tensio’ examples could keep ledger lines of normal length when there’s room to the left of the accidental. They can. Three settings decide who gives way, the ledger line or the accidental:
​
  1. Minimum protrusion is a measurement in stave spaces: how far a ledger line must still protrude from its notehead on the accidental’s side. It runs from 0 up to the full extension. At the top it becomes ‘full extension’ and stays there, so the line never shortens, however the full extension is set later.

  2. Accidental position is a switch with two positions. Either the accidental moves out past full-length ledger lines when there’s room, or it stays tight to its notehead and the lines are cut around it.

  3. Stays nearer its own note is an on/off switch with a ratio behind it. When it’s on, an accidental may never end up nearer the previous notehead than its own, at a ratio of 1. Its own ledger lines give way instead, as far as setting 1 allows.

One difference between them matters more than any other. The minimum protrusion decides how much room the notes reserve, so it’s the only one of the three that moves notes. The other two only spend room the spacing has already given. They never move a note, and they never move a line break.

(The image below is very large and is reduced in size to fit. Click on it to open it in a new window where it can be zoomed.)
Picture
​Each stave changes one setting from the stave above, and the changed value is highlighted.

Stave 1 never shortens its ledger lines. Magnus, you once said that shortened ledger lines weren’t always necessary as far as you were concerned. This is that setting, and it has a price. At the tight end the bar doesn’t fit, and the sharps end up nearer the previous note than their own. They turn rust when that happens.

Stave 2 lets the lines shorten to 0.16 stave spaces, so the bar fits. But as room appears, the sharps move out past the lengthening lines and drift towards the previous note.

Stave 3 switches on setting 3. The lines give way instead, and the sharps stay where they belong. They turn blue while the setting holds them.

Stave 4 keeps every sharp tight to its notehead and cuts the ledger lines around it.

Given room to spare, the first three staves agree. The fourth keeps its own look.

Beside each stave, a panel magnifies one gap, C6 to C♯6. The note’s own notehead stays put, so you can watch the sharp travel, and the distances to both noteheads change as it does. In stave 4 the panel shows something else as well. Bravura’s sharp has open corners, and the lower ledger line reaches into one of them, further under the sharp than the line beside the notehead. Nobody had to write a rule for that: the sharp’s outline, band by band, is all the springs need.

The ledger lines don’t only give way to accidentals. Look at C6 in the panels when the bar is at its tightest: its lower ledger line is shorter on the left than the one above it. B5 has a ledger line at the same height, and the two share the space between them, keeping a sliver of air in the middle; the line above has no neighbour at its height and only has to clear B5’s notehead. There’s no special rule here. The lines reserve only their shortest acceptable form, so they never push the notes apart, and the notes stay where their durations put them. If you’d rather the lines kept their full length and the notes moved apart instead, that’s the minimum protrusion on the other side, set to the full extension.

So these three aren’t the whole story. Whether a note’s ledger lines should be evened out, so that the lower one is never shorter than the one above, is a matter of taste, and so is shortening both ends of a line symmetrically, which someone on NOTATIO suggested. Both are candidates for dials of their own, and both will get their turn.

Division of Labour

​A word on what you’re looking at. Both animations are conceptual. Positions are computed from the published specifications and drawn from a real music font, but nothing in either was rendered by Ooloi. Bravura’s metrics are real; every other value is a placeholder until the plates have spoken.

What they do show is the division of labour. The springs guarantee that notes stay where their durations put them and that nothing collides. Within that guarantee, the dials decide how the page looks, each doing a single job, none needing to know about the others. Which positions are right is the engraver’s call, as it always was.

Both animations are free to use. Download them, put them in a lecture, a forum post, a book or a presentation, cut them up or build on them; no permission is needed. Formally, they’re released under CC0.
10 Comments

Ut Tensio, Sic Vis

19/10/2026

19 Comments

 
“As the extension, so the force”
Hooke’s law, first published in 1676 as the anagram
ceiiinosssttuv
(Gourlay’s springs are Hooke’s law with a stop)
​The last few posts described Hegazy and Gourlay’s springs in prose and formulae. That’s the right way to specify something, and a poor way to feel it. The engraver in me wanted to see the music move, so I had the mathematics turned into animation, one computed frame at a time. What came back stopped me. I’ve lived with music notation for most of my life, as a musician and as the author of Igor Engraver, and I’d never seen spacing behave like this: calm, legible at every width, and never once wrong.

Below is a bar of chromatic sixteenths, C4 to D♯5, with its end barline dragged from as tight as it will go to loose, and back. Nothing in it is drawn by hand. For every frame the program finds one number, the force that makes the bar fit where the barline is, and every note then goes where the model sends it. The formula is the one ADR-0037 specifies, and the shrinkability is ADR-0037’s baseline. Until now the spacing could only be described. Now it can be run.

Watch the gaps before the sharps. In a tight bar they’re wider than the others, because a sharp needs room. As the bar opens they stay where they are while the rest catch up. Once they’ve been caught, every sixteenth sits the same distance from the next, and stays there however far the barline goes.
Picture

Notehead to Notehead

​Here is the idea on four notes. The springs join notehead to notehead and run straight through the accidentals, because what the eye measures is the distance from one note to the next. The shapes themselves are solid and can’t pass through each other. When they touch, the spring between them can shrink no further, and that point is its blocking width.

The short note is followed by one with a double flat, and the gap between them needs about twice the room its duration would give it. Under compression the long notes give way while that gap holds. When the bar opens it waits until the force has caught up with it, and only then stretches with the others. By the end it’s longer than its blocking width, which is exactly what a prestretched spring should do.
Picture
(Rhythm: dotted 8th, sixteenth, dotted 8th, sixteenth)

The Springs Made Visible

​This is the same scale as the first animation, with the springs drawn in. A rust-coloured spring is held at its blocking width, where the shapes touch; a grey one is free.

On the way out the springs before the sharps turn grey one after another. The one into the low C♯ goes last, because the C’s ledger line has to clear that sharp as well. On the way back every free spring turns rust at the same instant. That’s deliberate: each gap’s shrinkability is its own room above collision, so they all run out of room together, and the tightest legible setting means the same thing across the whole system.
Picture

Three Ways to Fit a Bar​

​This is why the simpler options lost. All three rows are given the same width, and each finds its own fit.
​
Row A raises a gap’s ideal width to its minimum and scales everything by one factor. Accidentals then add space, and the bar can’t compress below its natural width, so its barline overruns the margin. Row B lets each gap shrink only by its own spare room. Compression comes out right, but the inflated gaps keep stretching in proportion as the bar opens, and B ends up indistinguishable from A. Row C is the springs: under pressure the gaps differ, and as the bar loosens the grid evens out and stays even.

To a trained musician there’s no contest. Row A is impossible when the bar is tight and lopsided when it’s loose. Row B is right only while the bar is tight, and as soon as it opens, the notes with accidentals drift apart from the rest. Only C, Hegazy and Gourlay’s springs, cuts the mustard at every width.
Picture

​Ledger Lines

​The last animation is about craft. Chromatic sixteenths run from A5 to C7, with one to five ledger lines each, six of them sharped.

Blocking widths are computed from ledger lines in their shortest acceptable form, so a ledger line never pushes notes apart. It only takes the room the springs have already given. In a tight bar the lines are short; as the bar opens they lengthen, side by side and height by height, up to Bravura’s full extension. The side facing a note’s own sharp stays short. A line facing the next note’s sharp stops clear of it. Two lines at the same height share the gap between them and keep a sliver of air in the middle. Engravers have always shortened ledger lines when room ran out. Here they do it because the space tells them to.

This is the one I keep coming back to.
Picture

Nothing Collides

Look again at any of the five animations, at any width you like: nothing ever collides horizontally. Nothing checks for it either. A single maximum guarantees it. A gap’s width is the larger of its blocking width and its spring’s length, so it can never become narrower than the point where the shapes touch. Once everything that can give has given, the bar simply won’t get narrower, and the line breaker never asks it to.

For me as a programmer, this is the best part. There’s no special case for a sharp drifting into the previous note, none for a ledger line touching its neighbour, and none for an accidental meeting a dot. No clean-up pass looks for collisions afterwards, because there’s nothing for it to find. In previous blog posts I've written about how correction passes are where layout code grows old. Each is written for a case someone noticed, each can disturb what the others arranged, and none is ever safe to remove. Ooloi won’t have a single one for horizontal collisions. Not fewer: none. ADR-0055 states this as an invariant, tested over random music: no collision at any feasible width.

Don’t read too much into the exact amounts. The notehead and sharp widths, the line thicknesses and the full ledger extension are Bravura’s, but everything else is a placeholder I picked, and the glyphs are plain geometric shapes. How far a ledger line may shorten, how close a sharp may come to the note before it, and where the full form begins are house-style matters, and in Ooloi they’ll be the user’s. The motion is the model’s. The measurements aren’t Ooloi’s yet.

Warmth

That brings me to Roland Gurt’s point about warmth. To me it’s essential, and it’s one of the things Ooloi is designed for. But the springs don’t supply it. What they supply is a guarantee: notes stay where their durations put them, and nothing collides. Warmth is in the tuning. That’s how much more room a quarter gets than an eighth, how far a short note gives way to a long one under pressure, and how much air an accidental keeps from its note. A tracker action doesn’t make an organ beautiful. It makes it obedient, and the beauty is the voicer’s work, pipe by pipe. The numbers that make a page warm will come from engraved plates, and the user will be able to change them.

Under the Pointer

What you’ve been watching is also how it’s meant to feel in Ooloi. ADR-0055 specifies the barline drag as live: each movement of the pointer refits the system being dragged, and the music follows the barline as you move it. Nothing reflows anywhere else while you drag, because the dragged system is held where it is and no line break moves. However long you drag, the whole gesture is a single undo. As far as I know, no other program spaces music live under the pointer like this.

Until now I’ve had to imagine how this would move. Now I’ve seen it, and as a musician I was simply wowed. The notes keep their rhythm under any pressure, the accidentals hold their ground and then let go, and the ledger lines know exactly how much room they have. I hope you’ll feel the same. And now I’m raring to build the machinery that will let me drag that barline myself.

The five animations are free to use. Download them, put them in a lecture, a forum post, a book or a presentation, cut them up or build on them; no permission is needed. ​
​Formally, they’re released under CC0.
19 Comments

The First Bar of the System

18/10/2026

2 Comments

 
An accidental, a grace note, a clef change and a repeat barline walk into a bar. It’s the first bar of a system, so it’s already crowded.

The clef change says, ‘Don’t worry, I sent word ahead’, and points to the courtesy clef waiting at the end of the previous system.

The repeat barline says, ‘I’ve been here before’.

The grace note says, ‘I can’t stay long’.

The accidental just nods at the notehead and says, ‘I’m with him’.

Most bartenders sigh and reach for the special-case drawer. Ooloi’s hands each of them a spring (‘boinggg’) and goes back to polishing glasses.
Picture
​A postscript, since the joke is less of one than it looks.

I’ve dreaded this part for two years. Casting off and spacing are where the Minotaur lives: the centre of the labyrinth, where the model finally has to become a page. I assumed I’d have to go in and wrestle it, and I spent the pipeline years arming myself.

I knew what the fight would look like. In a conventional architecture, each kind of object that needs room at a system start has a formatter of its own: one for accidentals, one for grace notes, one for clefs, one for barlines. Each is reasonable in isolation. The trouble is that they’re independent, so they needs must negotiate. The accidental takes its room, the grace note needs some of it back, the courtesy clef changes what’s left over, and every pair that meets needs an agreement. Too many of those agreements end up as correction passes, and correction passes are the bane of notation programs, and their elephant graveyard: it’s where Finale finally went, after more than three decades. The agreements grow with the combinations, not with the objects. It isn’t one hard problem; it’s herding cats, each one patched where it was caught, until adding one more kind of object costs more than the program can bear.

Instead the Minotaur stretched out a hand: ‘Pleased to meet you, Peter. Let’s get to work, shall we?’

There were no cats to herd. There was only one Master Ring, if I may mix my metaphors further. Information in Ooloi’s pipeline flows one way, and every horizontal rule has to take one of four forms before breaking begins. By the time the accidental, the grace note, the clef and the barline reach the breaker, they’re all springs, combined the same way every time. The problem I met wasn’t the one I’d prepared for. I’d expected a fight with chaos. What I got was a choice between two pieces of mathematics, and the only question was which one was right. The chaos had been dealt with upstream, years earlier, without my quite realising that this was what I was doing.

I’m increasingly convinced this is also why Hegazy and Gourlay’s method hasn't been used in interactive programs. The usual explanation is that optimal breaking is too slow to recompute after every edit. It isn’t. It hasn’t been for decades. What it needs is width data that’s settled before breaking begins and stays put while the breaker works. An army of negotiating formatters can’t supply that, because in such an architecture widths are what layout produces, not what it starts from. Speed was never the obstacle; the cats were.
​
​The single model also makes the rest of the formatting much, much more straightforward to implement. Every rule that remains has one thing to become and one place to go, and none of them has to know about the others. Foundation work succeeds by disappearing, and this is what it looks like when it does: you walk into the room where the monster is supposed to be, and find a bartender polishing glasses.
2 Comments

Purity

17/10/2026

2 Comments

 
Picture
Oh, and by the way: the stability term is gone.

In 'The Seven Thousand Steps' I described Clear Skies, a cost charged for every system that differs from the layout the user has just been looking at, and concluded that it belonged on by default. I've changed my mind. The reasons say something about why Ooloi adopted Hegazy and Gourlay in the first place, so they're worth a few paragraphs.

The term worked. In the model it cut the share of rhythm edits that moved breaks from 33 in 60 to 8, for under one per cent of the total cost. Cost was never the problem. The problem is what it does to the meaning of a page. With the term in place, the layout of a piece is no longer a function of the piece. It depends on the layout before it, which depended on the one before that, all the way back through every edit since the file was created. Two routes to the same music arrive at different pages. The piece carries, invisibly, a memory of how it was edited, and the part a player eventually reads can be worse than it should be because of the order in which its engraver happened to work.

The springs were adopted to abolish exactly that kind of thing.

LilyPond makes a useful contrast. It is deterministic, as a compiler that starts from scratch every time must be: there is only one route to any page, because there is no history. What LilyPond gave up, in October 1999, was exactness. It added a term comparing each system with its predecessor, judged against a single stored predecessor, so its breaker finds an approximation of its own cost rather than the minimum. Ooloi has neither that term nor any substitute for it. The cost of a system depends on that system alone, as it does in the 1987 paper, and the optimum is exact.

Ooloi doesn't start from scratch, though. It re-optimises after every edit from two stored tables, and that is precisely where history could creep in. So the rule is this: after any edit, Ooloi must arrive at the page a full casting off from scratch would produce. Any route gives the same page, whether after undo, after a reload, on another machine, or with edits made in a different order. That is now an invariant to be tested, not a hope.

Breaks will therefore move, sometimes before the bar you edited. That is the optimum doing its job, and I want it to. Keeping you oriented is a matter of presentation, not of layout: the bar you're working on stays where your eye was, and whatever moves around it moves legibly. Where you want breaks to stay put, you say so, by freezing systems or forcing breaks, and that decision is stored in the piece like any other, where it can be seen, changed and undone. A layout decision you made is part of the music. One the program made for you because of the order you worked in is not.

The anchoring duration won't get the hysteresis I floated either, for the same reason: it gets a value you can pin, and nothing else. ADR-0037 and ADR-0055 have been revised accordingly.
2 Comments

Hammock Time

16/10/2026

0 Comments

 
Picture
On 12/9, at the end of 'The Machinery of Taste', I wrote that things would be slower here for a month or so. A new client placement was taking a great deal of attention, one of my AWS Professional certifications was due for renewal, and Ooloi would have to wait its turn.

It was, for about a fortnight. Then came the heaviest run of posts this blog has had: three long ones in less than a week. So much for the quiet month.

What was left to do on the engine was mechanical: refining the file chooser, and building the permission and invitation machinery for collaboration. Neither needs much thought once it's specified, and both were specified. That left the part of my mind that doesn't type with nothing to do, and it went where it always goes, to the next hard problem. Given the six-stage pipeline, how should a score be cast off, and how should the notes in each system share out its width? I read and mulled, argued with myself and with language models, left it alone and came back to it.

I didn't recognise what I was doing until it was over. Rich Hickey gave a talk in 2010, 'Hammock Driven Development', about exactly this. You load a problem into your waking mind as thoroughly as you can, then step away and let the background get on with it. That background is where most real design happens, he argues, and it only works on what you've given it. Mine had been given two years of pipeline and had nothing urgent to do with its hands.

Then the paper arrived, and the timing is what I keep turning over. Hegazy and Gourlay's 'Optimal Line Breaking in Music' reached me after I'd converted completely to Knuth–Plass. ADR-0037 had been aligned with the original down to TeX's constants, and 'Boxes & Glue' had ended on an unfinished thought about notes that want to stretch and give by different amounts. A month earlier it would have been an interesting old paper. When it came, I already had the question it answered.

It's the second time this has happened. In April I wrote that I needed Ross's The Art of Music Engraving and Processing and couldn't buy it. Kim Bastin in Melbourne read it and put his own copy in the post. In September I asked in a comment whether anyone had the Hegazy and Gourlay report, and within a week Ulrik Bodén had found one. I hadn't asked either of them personally.

The paper changed the project's direction, which is a different thing from being grateful, though I'm that too. Until Ulrik's copy arrived, Ooloi's design used one scale factor per system, both to choose the breaks and to place the notes. It was one model, but a crude one. It had no way of letting an accidental hold a gap open while its neighbours carried on, so every way of fitting chromatic music into it was wrong somewhere. Letting an accidental hold its gap while the others carry on is exactly what Gourlay's springs were made for. The force that decides where a system ends now decides, gap by gap, where each note in it sits, and it treats an accidental the way an engraver would. 'Vestigia' has the details.

​The short version is that casting off and note positioning are now governed by one single piece of mathematics that's right where it matters. That's huge, actually.

Huge because of what it protects. Information in Ooloi's pipeline flows one way: no stage asks an earlier one to think again. A model that's wrong in some cases will sooner or later tempt somebody to fix those cases afterwards, just this once, and that's the frost troll from yesterday's post. A model that's right about the hard cases gives the troll nothing to work with. Every rule about horizontal space reaches the springs as data, and once it does, it combines with all the others without anybody writing special cases. Engraving becomes far easier to reason about, for me and for the AI, which is at its best with mathematics somebody has written down.

It's encouraging, too, how little resistance the change met. The dynamic program didn't move at all. Stages 1 and 2 were already producing the widths the springs need, and each bar now keeps a couple of extra sums and a short list of the gaps its accidentals hold open. ADR-0037 was revised and ADR-0055 written within days of the paper arriving, and nothing around them had to change. None of it is built yet, so what passed the test was the specification, not the code. But building something that a better idea could walk into without a fight was the point of the last two years, and this was a big idea.

In 'High Hrothgar' I wrote that 'Nun denn, allein!' could have been carved over the monastery door. That was the honest picture of the first two years, and I won't revise it now. In April, when Kim offered me his copy of Ross, I wrote that something like an informal fellowship seemed to be forming around the work. That was a feeling. This is a fact about the engine: the model at the centre of its layout came from a paper I couldn't find and Ulrik could. 'Alone' describes how Ooloi was started. It no longer describes how it's being built. That changes how the work feels.
​
The conversation here will change too. When the permission and invitation machinery is finished, I'll show it in a video, and that will be the last of the plumbing. In August I raked the ring and left it empty. What comes next is what it was raked for: spacing, beams, slurs, page turns, the page itself. Those are questions musicians can argue about without reading a line of Clojure, and the people already gathered in the comments are the ones who'll know when I've got an answer wrong.
​
I should take more quiet months.
0 Comments

The Seven Thousand Steps

15/10/2026

12 Comments

 
Picture
'High Hrothgar' was about where the deepest knowledge of engraving lives, and my decision to take the mountain's method and try to carry it down into the valley. This post is about the climb itself: whether that can really be done in a program that answers as you work, what it costs in time and in code, and what turns up on the way.

In the game, the Seven Thousand Steps begin at a bridge in Ivarstead, and along the path stand stone tablets, each engraved with a fragment of the mountain's story. You read them as you climb, one at a time, out of breath. Ooloi's path has its tablets too, the ADRs, each recording a decision taken on the way up, and this post reads two of them again.
​
Last time I said two things: that everything I could see suggested the architecture would allow it, and that none of it was built yet. Both remain true. What has changed is that some of the claims can now be checked, and some of them have been.

Counting the Steps

In 'Vestigia Nulla Retrorsum' I wrote that the real cost of the springs would be known only when there was a benchmark, and that until then I was offering reasoning rather than measurement. There is now a first measurement, of a modest kind.

Since then I've had Claude Opus 5.5, at its extra-high reasoning level, write an independent model of Stage 3 in Python from the published ADRs: a language model with no history of this project, no special knowledge of Ooloi and no access to its code. It implements the baseline as specified (springs, calibration, demerits and tie-break), and it runs the slow way, in pure Python with exact fractions: about the least flattering setting the algorithm could be given. Clojure is much, much faster.

On a synthetic single-stave part of 800 bars, with accidentals scattered through it, a complete casting off into 143 systems took about 0.3 seconds. A part of 150 bars took 30 milliseconds. The exact re-optimisation after an edit, using the two stored tables of best layouts before and after the edited bar, gave the same answer as a full pass in every trial, down to the tie-break. Two different routes to the same answer, agreeing exactly in rational arithmetic, are a strong sign that the specification is consistent. The worked numbers in the ADRs held up too, from the point at which a thirty-second's spring starts to stretch before an accidental to the error of interpolating the duration table.

Nor does anyone have to take my word for it. The mathematics can be checked, and a similar model built, by anyone who cares to: give ADR-0037 and ADR-0055 to a language model set to a high level of reasoning, add the last few posts here for context, and go. That is exactly how the model above came about. The specifications were written to be precise enough to execute, and anyone can run that test.

Real scores are also kinder than that 800 suggests. A long work isn't one paragraph: movements, scenes and sections end at hard breaks, and each stretch between them is a problem of its own. The total work still grows only with the number of bars, so partitioning saves less time than you might think. What it buys is better: a fence around how far an edit can reach.

The JVM should do considerably better than Python; the real benchmark will say by how much. But the order of magnitude is settled. Speed was never the obstacle, I wrote. Now there's a number to go with it.

​The Wind Above the Monastery

Picture"Clear Skies"
​Above High Hrothgar the path to the summit is closed by a wind that no traveller survives. The Greybeards teach a shout, Clear Skies, that parts it long enough to pass. The breaker has a wind of its own, and it's movement, not speed: breaks that shift in places the user never touched.

A global optimum is not local. The ADR says so plainly: an edit to one bar can move breaks anywhere between the hard breaks around it, before the edit as well as after it. The model makes that concrete. On a synthetic part of 150 bars and about 28 systems, toggling a single accidental moved breaks in 2 edits out of 40. Replacing the rhythm of a whole bar, a large edit such as turning quarters into sixteenths, moved them in 33 out of 60, and in 21 of those 60 a system before the edited one changed. When such an edit moved anything, a median of 7 systems were rearranged.

That is the wind, and I suspect it's part of what Dorico's stated principle guards against: doing only the minimal recalculation an edit requires, as Daniel Spreadbury put it in 2015. That spares the user's sense of where things are as well as the processor.

The ADR's Clear Skies is a stability term: a cost for every system that differs from the layout the user has just been looking at. Set equal to the charge each system already carries, it brought the rhythm edits down to 8 moved out of 60, and an earlier system changed in only 3. The price, in the breaker's own currency, was under one per cent of the total cost in the median case. Ten times stronger, and only 1 edit in 60 moved anything at all.
​
The music in the model is random, so these numbers are indicative, not final. But they say something clear about defaults. The stability term is what makes an exact optimum liveable in a program that answers as you work, so it belongs on by default, switched off only when the user asks for a fresh casting off.

The Hourglass

Picture
​The model of Stage 3 contains no knowledge of engraving at all, and that says more about the architecture than about the model. Look at where the musical knowledge sits in the six stages and the pipeline takes the shape of an hourglass.

At the top, before rendering begins, sits the semantic model: which accidentals a note needs, how beams are grouped. Stages 1 and 2 hold the horizontal knowledge of engraving: how a chord with seconds is assembled, the outlines of glyphs, clearances, the table that turns durations into space, what changes at a break. Stages 5 and 6 hold the vertical and the page-level knowledge: slurs, ties, beams, articulations, ledger lines lengthened into the room they've been given, and eventually page turns. In the waist, Stages 3 and 4 hold none at all. They are mathematics over springs.

Compilers are built the same way, with the knowledge of the language in the front end, the knowledge of the machine in the back end, and a clean intermediate form between them. In Ooloi that form is the stack summary: a handful of numbers per bar that never change underneath the breaker. Taste reaches the waist only as numbers, and musical structure only as cost, never as procedure.

What the waist forbids matters most: there are no correction passes. Every horizontal rule reaches the breaker in one of four forms (an ideal width, a blocking width, a constraint spanning several gaps or a difference at a break), and the springs combine them the same way every time. Nobody has to write the formatter for an accidental, a grace note, a clef change and a repeat barline that happen to meet at a system start.

A greedy breaker commits to each system before it has seen the rest of the piece, so whatever depends on the whole, such as a full last system, can only be put right afterwards, by a correction step or by hand. Spacing has its own version: a system that comes out too wide, or with a collision, has to be re-spaced and tried again. Dorico distributes a remainder at the end of each flow; MuseScore re-spaces an overfull system with its paddings reduced in steps. Each is a sensible answer to the problem greedy filling poses. In Ooloi both kinds of correction disappear, for two reasons. The exact breaker sees the whole piece before it decides anything, so nothing is left over to redistribute. The springs carry every collision inside the model, so no system ever needs re-spacing.

Much follows from that one prohibition. The same music always gives the same page, on every machine and after any history of edits. A dragged note is stored as a change to its springs, not as an offset, so it survives every recomputation. 'No collision at any feasible ratio' becomes an invariant that can be tested. Settings stop being choices between rival heuristics; they become parameters of one model, and compose instead of colliding. And every task that remains, from tuning a value to supporting a new kind of notation, comes down to giving the one model better input, never to teaching one more formatter about all the others.

Correction passes are where layout code grows old. Each is written for a case someone noticed, each can disturb what earlier ones arranged, and none can safely be removed, so they accumulate for as long as a program lives. Not needing them at all is the quiet difference underneath everything else in this post.

The knowledge of engraving has moved upstream and turned into data: tables and outlines rather than procedures. That's what makes it inspectable, and what lets a stranger rebuild the waist in another language in an afternoon.

​The Tablets Along the Path

Picture

​ADR-0055 lists twenty-two open questions about horizontal spacing, and none of them is a research problem. Each has a known shape, and the architecture already says where its answer goes: a value in a table, a cost in a dynamic program, or a parameter of the springs. Most are values to be measured from printed plates; some are matters of taste that should simply become settings. A few questions, some from that list and some beyond it, deserve a tablet of their own.

Page turns. This is the delightful one. Once page breaking is written down it's almost a pleasure: hard breaks partition the work, repeats and rests become costs at the boundaries, odd and even pages join the state, and the program over a part is tiny. The catch is architectural. Stage 6 can only choose among the system breaks Stage 3 has already made, and a turn in a rest needs a system break at that rest. The two are kept apart because heights aren't known until Stage 5, a reason that is strong in a full score and weak in a single-stave part, whose heights are nearly predictable. Parts are exactly where page turns matter, so for parts I'm inclined to let systems and pages meet, using conservative heights derived from Stage 1's outlines, which keeps the result exact for those heights and never overflows a page. Full scores can keep the separation.

Lyrics. A long syllable over a melisma spans several gaps, and the baseline turns it into minimums on the individual gaps before breaking. Under compression that can hold back up to a quarter of their spare room beyond what the syllable needs, which in a choral score could cost a system now and then. The exact form of the reduction uses machinery the springs already have, and for vocal music I lean towards making it the default.

Drags. Dragging a note in a tightly compressed system moves it very little on screen while storing a large change to its springs, because there's so little room left to give. If the music later reflows into a loose system, a nudge of a fifth of a stave space can turn into three stave spaces. The stored change is right in principle, but the amplification near the collision limit needs a rule of its own.

The anchoring duration. ADR-0055 starts from LilyPond's way of choosing the value around which spacing is built: the most common shortest note per bar across the piece. That statistic can flip when a single bar changes, and then a whole section is re-spaced. It's a second source of wind, upstream of the breaker, and it wants hysteresis or a value the user can pin.

Open metre. Systems currently break only at barlines, and music without them needs breaks inside long bars. The mathematics extends without strain, but it isn't specified yet.
​
None of these is a cliff. Straightforward isn't the same as small, though. Measuring the plates is slow, careful work, and it's where the quality will actually be seen. The breaker decides where lines end; the tables decide whether the page is beautiful.

​The Frost Troll

Picture
Somewhere on the upper slopes a frost troll waits for anyone who has underestimated the climb. I've found that simply running past it avoids the entire fight.

That is the deepest habit of this architecture. Immutable data and a one-way flow don't win the battles other programs fight every day, with state that changes underneath them, caches that must be invalidated in the right order, and layouts that negotiate with themselves until they settle. It runs past them. Those fights never start.

The troll will still try to make me stop. One day a page of Ligeti's Requiem will come out wrong, and the quickest fix will be a small nudge after the springs have done their work, just this once. That is exactly the moment to keep running: back upstream, to better input for the one solver. ADR-0037 already says so: a rule that fits none of the four forms is a design problem to be solved, not a pass to be added. Keep to that, and the engine stays as clean in its fiftieth year as in its first.
​
The steps have been counted now. The results are encouraging. But that isn't the same as climbing them.

12 Comments

High Hrothgar

12/10/2026

8 Comments

 
Picture
In Skyrim, there's a monastery just below the summit of the Throat of the World, the tallest mountain in the land, and the only way there is on foot. The path is called the Seven Thousand Steps. It starts in a small village called Ivarstead and climbs through pine forest into snow, past stone tablets that tell the story of the place, into a wind that gets worse the higher you go. Somewhere on the upper slopes a frost troll waits for anyone who's underestimated the climb. The name of the monastery is High Hrothgar.

At the top live the Greybeards. They are masters of the Voice, the Thu'um, the ancient art of speaking words so charged with power that they move the world. The Voice is spoken in the tongue of dragons, a language almost no one outside the monastery understands. Their own voices are so strong that they almost never use them: one of them, Arngeir, speaks to visitors on behalf of the rest, and the others keep silent. They take no part in the affairs of the land below. Wars come and go, dragons return to the skies, and the Greybeards go on meditating, keeping what they know for the few who make the climb and prove equal to it.

It's a game, but the image has stayed with me all week. It describes, more exactly than anything I could have invented, where the deepest knowledge of music engraving has lived for the last thirty years.

​The Monastery

Masters of the Voice, guarding its secrets on a mountain: you could hardly ask for a better image of the people who know how music should be laid out on a page. Never mind what the notes are, which is the composer's business; the question is how they share out the width of a line, where each line should end, and why a well-engraved page can be read at a glance while a poor one makes the player work for every bar. Those are the real secrets of engraving, and they're mostly invisible. When they're kept, nobody notices anything at all.

In the world of notation software, the monastery is LilyPond. Over three decades its makers have assembled the most serious body of engraving knowledge any program possesses, much of it traceable to a handful of academic papers from the 1980s, and built it into a program whose output a great many musicians regard as the nearest thing the field has to a grail.

The Seven Thousand Steps are real too. To engrave a piece in LilyPond you don't place notes on a page. You write the music out as text, in a syntax of its own that has to be learned, and hand the whole thing to the program, which works through it in one go and returns finished pages. If you want it to do something differently, you have to speak the monastery's own dragon language, Scheme: a dialect of Lisp, one of the oldest families of programming languages, famous for its thickets of parentheses and impenetrable to most outsiders. Nothing answers you while you work. You write, you wait, you look.

I want to be fair to the mountain, because the analogy invites a sneer it doesn't deserve. The steps are no affectation. A program that is given the whole piece at once, and allowed to take its time, can afford to consider every way of laying it out and choose the best. That is exactly what makes its results what they are. The climb is the price of the view.

​The Valley

Most musicians stay below, and so do most notation programs. Down in the valley a program has to answer as you work: you enter a note and the page changes in front of you. That leaves no time to reconsider the whole piece after every keystroke, so the programs of the valley fill each line as they go, bar by bar, move on when the next bar won't fit, and make the best of whatever they've been left with. Dorico, which takes engraving more seriously than most, works this way, and its developers have said openly why: the careful method was evaluated and found too slow for a program that must respond in real time. Most of the time the results are very good. The rest of the time the engraver finishes the job by hand.
​
So the field has divided along the mountain's flank. Up there, the beautiful results, for those who make the climb. Down here, the convenience, at the cost of a little beauty and a good many afternoons spent correcting. Hardly anyone has said outright that it must be so, but everything has been built as though it were. The knowledge of High Hrothgar, the assumption goes, can only be practised on High Hrothgar.

The Path Up

Until a few days ago Ooloi would have been counted among the valley programs, if it was counted at all. It's an interactive program, after all, and that seemed to settle which side of the mountain it belonged to.

It doesn't any longer. I've decided that Ooloi will lay out its music by the method Wael Hegazy and John Gourlay described in 1987, in the paper Ulrik Bodén tracked down for me and which I wrote about in the last post. It's the same text LilyPond's teaching grew from, and I'm taking it in its original form: the whole piece considered at once, and the best layout found exactly. ADR-0037, which specifies Ooloi's line breaking, has been revised accordingly, and a new decision record, ADR-0055, now describes how the music is prepared for it. The details are there for anyone who wants them; this post isn't the place.

That puts Ooloi in the mountain's lineage. It doesn't put it anywhere near the top. LilyPond has thirty years of practice behind its answers; Ooloi has a decision and a specification. The monastery's knowledge was earned slowly, and I'm a newcomer at its gate with a borrowed book. I do at least speak a dialect of the language. Ooloi is written in Clojure, which is also a Lisp: I speak Dragon. This is perhaps not a coincidence.

Down the Mountain

Knowledge that stays on the mountain is only half useful, though. The real question, the one this whole project keeps returning to, is whether it can be brought down: whether a program that answers as you work can produce what has so far only been produced at the summit.

Ooloi takes its name from Octavia Butler's Xenogenesis trilogy. Butler's alien Oankali have three sexes, and the third, the ooloi, can perceive and rearrange the living matter of other creatures. They take genetic material from different lineages and combine it, by instinct, into children that neither parent could ever have produced alone. Nikanj, the ooloi at the heart of the first novel, does exactly this with humans.

That's the most honest way I can describe what I'm attempting without a single formula. Ooloi takes the mountain's DNA, its knowledge of how music should be spaced and where lines should break, and combines it with the valley's: a program that answers as you work. If it works, the child will be neither LilyPond made faster nor Dorico made more careful, but something neither lineage could have become by itself.

Speed has very little to do with it. Computers have been fast enough for this for decades. What makes the crossing possible is the way Ooloi has been built over the last two years, for reasons that had nothing to do with engraving: by the time layout begins, every bar has been reduced to a handful of numbers that will never change underneath it. The monks' long contemplation of the whole piece becomes a short piece of arithmetic, quick enough to repeat after every note you enter. The last post was about that, under Horace's motto: all the footprints lead one way, and none lead back.
​
(There's also a Dragonborn in the story, a mortal who learns in days what the Greybeards needed lifetimes for. I'll resist that one.)

On the Mountain

​There's another way to read the picture, and it would be dishonest to leave it to the comments.

A man working alone for two years on foundations nobody can see yet, refusing to show anything until it's right, measuring himself against a fifty-year horizon: that isn't a portrait of the valley. 'Nun denn, allein!' could have been carved over the door of High Hrothgar. If anyone in this story is living on the mountain at the moment, it's me.
​
The difference, I hope, is the direction of travel. I'm up here so that what gets built can be used down there, by someone who has never heard of Gourlay and never will, and who simply wants a part whose page turns fall in rests. Whether that works isn't something a blog post can settle. None of it is built yet. Everything I can see suggests the architecture will allow it, and the judges will be the printed pages of the great engraving houses, not my hopes for them.

'Come Back in a Year'

Almost exactly a year ago, people on various forums were asking when they'd see Ooloi render any notation, and I answered in a short post called 'Where's the Music?'. Not yet, I wrote: foundations first. Come back in a year, and the conversation will be about music by then.

The day after, in 'The Lineage: When Ledger Lines Shorten', I wrote that reading LilyPond's essay on engraving had made me realise we came from exactly the same place. I had no idea then how literally that would turn out to be true.
​
Here we are, two weeks early. 'Boxes & Glue', 'Vestigia Nulla Retrorsum' and this post deal with the very heart of engraving: how a line of music shares out its space, and where it should end. Together with ADR-0037 and ADR-0055, they say everything you need to know to understand what Ooloi is aiming for and how it means to get there.

​The Trade

Butler's ooloi aren't comfortable creatures. Their trade is seldom asked for, and the humans they trade with don't come through it unchanged. The engraving version is gentler. LilyPond will go on compiling on its mountain and Dorico will go on answering in the valley, exactly as before; nothing is taken from either that doesn't remain where it was. Only the child is new.

Dawn, the first volume of Butler's trilogy, was published in 1987, the same year as Hegazy and Gourlay's paper. That's a coincidence, and I won't pretend otherwise.
​
But Nikanj would have approved.
8 Comments

Vestigia Nulla Retrorsum

10/10/2026

5 Comments

 
Picture
The paper is here. 'Optimal Line Breaking in Music', by Wael A. Hegazy and John S. Gourlay of the Ohio State University, 1987: fifteen typed pages, scanned from somebody's reading copy, complete with underlinings and a few pencilled notes in the margins. It's out of print and it isn't online, and I'd been looking for it far and wide. In the end Ulrik Bodén, owner of Musikboden and one of Ooloi's sponsors, tracked down a copy and sent it to me. Once again the small circle of friends around this project has done what searching couldn't, and I'm very grateful. Under the last post, Magnus Johansson asked whether I'd had the chance to study it yet. I have, and this is what I found.

First, a word about how I look at other programs, since several of them appear below.

I don't run Dorico, MuseScore or LilyPond, and I don't intend to. That isn't disdain. I read what can be read: source code where it's open, development diaries where their authors have published them, forum posts where a decision has been explained. I read them as I read the source of gRPC or the JVM, to understand how something was built and, above all, why. What I don't do is examine the latest release to see what I'm up against, because I'm not up against anything. Ooloi isn't a feature race. I'm trying to build an engine for music notation in which the difficult parts are dealt with underneath, once and properly, so that whoever builds on it doesn't have to. If it works, it'll be because of what Ooloi is rather than what it does.

Casting off and horizontal spacing are where reading other programs is most illuminating. Casting off is the engraver's term for deciding where each system ends; horizontal spacing is how the notes within a system share out its width. Between them they decide whether a page reads evenly or lurches, and whether the last system of a movement is full or holds two forlorn bars. A player takes all of that in before reading a single note. Every notation program has to answer the question, the answers differ, and the reasons for the differences say a great deal about the architectures behind them.

The Other Ninety Per Cent

In September 1985 Jon Bentley's Programming Pearls column in Communications of the ACM collected a page of programmers' aphorisms. One of them, credited to Tom Cargill of Bell Labs, has outlived most of the others: 'The first 90 percent of the code accounts for the first 90 percent of the development time. The remaining 10 percent of the code accounts for the other 90 percent of the development time.'

Engravers have their own version. Notation software handles about 95% of engraving well, and engravers spend about 95% of their time on the remaining 5%. Those figures are practitioners' experience rather than measurements, but anyone who has prepared parts for a performance will recognise the shape. The afternoon goes on forcing system breaks, prising collisions apart, and recasting a part so that the page turns fall in rests.

The two rules describe the same remainder from opposite ends. The cases a developer leaves unfinished, because they belong to the last 10% that would take the other 90% of the time, are precisely the cases the engraver then finishes by hand. Shipping at the 90% mark doesn't make the remaining work go away. It passes it on to the users, multiplied by every user and every score.

That's a tax, and like most taxes it's paid continuously by people who never voted for it. Ooloi is in large part an attempt to abolish taxes of this kind wherever the architecture allows, from undo to collaboration. The engraver's 5% is the largest of them.
​
I should be fair here, because it matters. Doing 95% well might genuinely be good enough for most people's music. In December 2016 Daniel Spreadbury wrote that Dorico's casting off, tested against the Gourlay method, 'produced very similar results a lot of the time'. That's the 95% working exactly as designed. The 5% is where it doesn't, and that's where the engraver's afternoons go.

Knuth & Plass, Briefly

I wrote about the algorithm in 'Boxes & Glue', so a reminder will do. In 1981 Donald Knuth and Michael Plass published the line breaker that TeX still uses. A paragraph is a row of boxes (the words, which are rigid) with glue between them (the spaces, each with a natural width and a given capacity to stretch and shrink). Any choice of breaks gives each line an adjustment ratio r: the stretch or shrink the line needs, divided by the stretch or shrink its glue can supply. So r = 0 is a line at its natural width, r = 1 is a line stretched as far as its glue is meant to go, and r = −1 is the tightest line TeX will set.

Knuth turns r into badness, roughly 100 × |r|³, and badness into demerits, (l + b)² + p², where l is a small charge for every line and p the penalty attached to the break. Then he finds the set of breaks with the smallest total for the whole paragraph. The cubes and squares mean that one very bad line is punished far more than several slightly imperfect ones, which is exactly the judgement a good compositor makes.

What makes it fast is dynamic programming. The program walks through the paragraph once and, at each possible break, remembers only the best way of getting there. If the cost of a line depends on that line alone, nothing more is needed: when the walk reaches the end, the best layout of the whole paragraph is recovered by following the remembered steps backwards. The result is exact, meaning provably the minimum of its cost rather than a good guess, and the work grows with the number of possible breaks times the number of words that can share a line.
​
The alternative, and still the usual one, is greedy filling: put bars on a system until the next one won't fit, move on, and never look back. It's quick and it's local, and the bill arrives at the end of the piece.
Picture

What Hegazy and Gourlay Actually Wrote

As far as I can tell, nobody has described this paper in public. LilyPond's source names it as the origin of its first line breaker, and Daniel Spreadbury has said it informed Dorico's casting off, but I've found no account of what it actually contains. ADR-0037, which specifies Ooloi's breaker, cited it while admitting that it described none of its contents. That ADR has now been updated with a description along these lines.

The paper opens by explaining why music isn't text. The last system of a piece is always full, so a copyist has to be prepared to revise early breaks that don't lead to a full last line, and a program must be able to do the same or it'll stretch the last system grotesquely. Long works should also fill their last page, which sometimes means forcing a particular number of systems. Clefs and key signatures repeat at the start of every system, and they change, in content and in width. Most important of all, notes don't move linearly when a system is stretched or squeezed.
​
The state of the art, they note, offered little help. Byrd's 1984 thesis program did first-fit breaking, which is greedy filling by another name, and expected users to choose their own breaks. Ross's engraving manual advised avoiding bad breaks and keeping the spacing uniform. 'There appears to be no published algorithm', they write, that attempts to deal with these problems at all.

Their claim is that Knuth's model already handles the first three. A paragraph with no fill glue at its end gets a full last line automatically. Penalties encourage or discourage particular breaks, which is how a performer's awkward page turn can be avoided. TeX can be told to use a set number of lines. And TeX's discretionary breaks, the mechanism behind hyphenation, can change what's printed at the end of one line and the start of the next. Only the fourth problem needs new theory.

That theory is the paper's real contribution, and it's lovely. Think of the space between two notes as a spring. In text the springs join the outsides of rigid boxes. Hegazy and Gourlay pass the springs through the boxes and attach them to the left edges of the noteheads, because what the eye measures is the distance from one note to the next, not the white space between their shapes. The boxes still can't pass through each other, though. A note and the accidentals of the note after it take up room, and when those shapes touch, the spring between them can shrink no further.
Picture
So each gap carries four numbers: an ideal width w, a stretchability y, a shrinkability z, and a blocking width b, the width at which the shapes on either side collide. Under a force f, which is Knuth's adjustment ratio under another name, positive to stretch and negative to compress, the gap's width is the larger of two quantities:

width = max(b, w + f·k), where k is y when stretching and z when compressing.

Read as a musician: the spring tries to be its ideal width plus whatever the force asks of it, but never narrower than the collision allows. Read as a mathematician: each gap is a piecewise-linear function of the force, and therefore so is the whole system.

The interesting case is the one where b exceeds w, which they call 'prestretched'. Their Figure 1 shows it: a note preceded by two flats so wide that the gap before it is already larger than its duration warrants. That gap doesn't move at any line length until the force on the rest of the system has caught up with it; only then does it begin to grow with the others. The accidental takes the room it needs and not a hair more, and once the system is loose enough it costs nothing at all. That's exactly how an engraver treats an accidental.
Picture
The consequence for breaking is that the force needed to fit a system is no longer a single division, as it is in TeX. It's the solution of a piecewise-linear equation whose kinks lie wherever an individual gap collides or begins to stretch. The search around it is Knuth's, which they say 'does not differ in any significant way' from TeX's: remember the best predecessor for each barline, discard lines whose force falls outside a permitted window, and trace the optimum backwards from the end.

Their efficiency section is the most telling part of the paper, because they never treat the dynamic programming as the expensive part. The expense lies in working out the force for each candidate system, and they attack it twice. First comes a cheap lower bound on the force, built from running totals: 'the sums are computed from the beginning of the piece to the current place, and two such sums are subtracted to obtain the sum for what lies between them'. Programmers call these prefix sums. The bound is designed so that it can never wrongly reject a system that would fit. Second comes a fast path for the common case, in which the force stays on the first straight segment of the curve, before any gap has collided. They test for that with minima precomputed for each bar.

Their evidence is modest and well chosen. They broke a 48-bar piece on a single stave, Dean K. Roush's 'Lacrimosa', into systems. The breaks matched those chosen by a professional musician, who had spent a few hours on it. The program took a few seconds on a personal computer of 1987.

So is it Knuth–Plass? Not purely. The search is Knuth's without his fitness classes, which TeX uses to stop a tight line from sitting next to a loose one, at the price of extra bookkeeping. The cost is shaped like TeX's but never written down as a formula. And the model of a line is a strict generalisation of boxes and glue: TeX's glue is the special case in which nothing ever collides.
​
But it isn't approximate either. The cost of each system depends only on that system, the pruning is sound, and the cheap bound never discards a line that would fit, so the result is the exact optimum of its own cost. Nor do the modifications reduce the efficiency of the algorithm. The dynamic programming is untouched; what grows is the arithmetic inside the evaluation of a single system. What Hegazy and Gourlay did to Knuth and Plass was extend them.

The Descendants

Three documented lines of descent made three different choices, and in each case the authors have said why.

LilyPond's first line breaker, gourlay-breaking.cc, says in its source that it was 'adapted from the OSU Tech report on breaking lines'. It was a straightforward dynamic program until October 1999 (release 1.2.14), when a term comparing each system with its predecessor was added for the sake of evenness. With only one predecessor stored per breakpoint, that made the result an approximation of its own cost, and the term survives in LilyPond's current breaker. LilyPond's spacing, which I'll come back to, is solved afresh for every candidate line. Han-Wen Nienhuys, who wrote the original breaker, commented in 2015 that he'd first run it on a 386 at about 40 MHz, where 'it was somewhat expensive'; that computers had since become a hundred times faster; and that you have to solve 'O(#bars * #bars-per-system) spacing problems'. He thought it could be used for interactive scores too.

Dorico's team evaluated the Gourlay method early on. In 2015 Spreadbury set out the reasoning in his development diary. A program that compiles its output from text input needn't respond in real time, but for an interactive one 'a compromise is needed in order to balance the quality of the result against the time taken to compute it', and Dorico's principle was to 'always do only the minimal amount of recalculation to respond to an edit'. In December 2016 he wrote that the method's performance characteristics weren't suitable for Dorico's real-time use, and that Dorico's own algorithm 'basically runs only one way, from the start of the layout to the end'. In April this year he confirmed that the paper had informed Dorico's casting off, which is greedy, with a separate remainder-distribution step at the end of each flow. That remainder step deals with the full last system, the first of the four problems Hegazy and Gourlay listed in 1987.

Others claim the full prize. Christof Schardt, the author of PriMus, wrote in 2015 that PriMus had used TeX's total-fit algorithm, 'modified for scores instead of text', interactively for over ten years, taking collisions into account 'by an equivalent linear operation'. Basil Crow's open-source Neanes editor does optimal line breaking for Byzantine neume notation. I haven't checked either at source.
​
None of this is a league table. Each choice was rational under the constraints its makers had, and Spreadbury's 2013 statement of Dorico's ethos, that the application should do 'automatically what an experienced engraver or copyist would do anyway', is one I'd sign without changing a word. The goal is shared. The constraints aren't.

Speed was Never the Obstacle

Put the dates side by side. In 1987 an exact optimum over a nonlinear spring model ran in seconds on a personal computer. In 2015 the author of LilyPond's first breaker, who had run it on a 386, reckoned that machines a hundred times faster could manage it interactively. Processor speed hasn't been the obstacle for a very long time.

What costs something is evaluating each candidate system, and everyone who has looked closely puts the cost there: Hegazy and Gourlay in 1987, Han-Wen in 2015. Hegazy and Gourlay's remedies, the running totals and the per-bar minima, rest on an assumption so basic they never needed to state it, which is that each bar's numbers are fixed before breaking begins. They could assume it because their input was a single stave, handed to the program as a ready-made sequence of springs.

A notation program has to manufacture that input from a full score, and this is where architecture comes in. Suppose a candidate system's width depends on which bars share it, or on something settled only after the breaks are chosen: the courtesy accidentals at a system start, an accidental decision that changes when a tie crosses a break, spacing that's adjusted and then fed back. Then every candidate needs its own spacing calculation. In a mutable, incremental program, every moved break also invalidates whatever was computed downstream of it. A global optimum, where one edit can move breaks anywhere in the score, then becomes the most expensive thing you could possibly ask for, and greedy filling is the sensible choice.
​
I can't see inside anyone else's program, so take this as my reading of the problem rather than a finding about any product. But it's consistent with everything their authors have said, and it puts the obstacle where the 1987 paper already implied it was: in the data, not in the processor.

Vestigia Nulla Retrorsum

Ooloi lays out a score in six stages, and information moves through them in one direction only.

Stage 1 works on every bar in parallel. It forms the atoms (a note or chord with its accidentals, dots and articulations, handled as one unit) and traces their outlines from the font, the shape each presents to its neighbours. Stage 2 lines the staves up vertically and works out, for every gap, both its ideal width, which comes from the durations, and its minimum, where neighbouring outlines would touch, so that each measure stack (one bar across all the staves) leaves it as a handful of numbers. Stage 3 breaks the systems. Stage 4 positions the atoms. Stage 5 draws what connects them, the ties, slurs, hairpins and beams, and works out how tall each system is. Stage 6 breaks the pages.

Nothing flows back. Stage 5 can't ask Stage 3 for more room, and Stage 3 can't reopen a decision made in Stage 1. The musical questions, such as which accidentals a note needs, are closed before layout begins, so layout can't change them. Everything Stage 3 needs is known before it starts, including what each bar would require at the start of a system and at the end of one.
​
The pipeline has a motto, borrowed from Horace. In the first of his Epistles (I.1.73–75) a fox declines the sick lion's invitation into its den and explains why: 'quia me vestigia terrent, omnia te adversum spectantia, nulla retrorsum'. The footprints frighten me: they all lead towards you, and none lead back. In the fable that's a warning; in a layout pipeline it's the design. Every footprint points forward, and that single property is what turns casting off from a negotiation into arithmetic.
Picture

Arriving at the Same Place

Ooloi’s breaker, specified in ADR-0037, was written from Knuth and Plass directly, before I’d read a line of Hegazy and Gourlay. Reading them now is a curious experience, because the search is the same. Both remember one best predecessor per barline, with no fitness classes. Both subtract running totals between barlines, and both stop extending a candidate system as soon as more bars can’t possibly fit. Their per-bar minima, used to test whether a line has reached its first collision, correspond to a number every Ooloi measure stack carried until now: its tightest gap’s ratio of minimum to ideal width, tracked as a running maximum while the candidate system grew.
​
The correspondence goes deeper than I expected. Until now, Ooloi’s baseline let every gap stretch and shrink in proportion to its ideal width, so each system had a single scale factor. It also calibrated the adjustment ratio so that r = −1 fell exactly where the tightest gap in the system reached its minimum, and allowed nothing beyond that point. In Hegazy and Gourlay’s terms, that was their model restricted to the first straight segment, before any gap has collided, with the force rescaled so that the first collision sits at −1.

I got there independently, but I don't think the convergence is remarkable. Both designs start from TeX, and both discover that the cost lies in evaluating a line; from there the problem pushes you towards the same answers. I find that reassuring rather than surprising.

Where Ooloi goes further, most of the reasons lead back to the direction of flow.

The first concerns system starts and ends. Hegazy and Gourlay pointed at TeX's discretionary breaks for the clefs and keys at each system start, and left it there. A discretionary has three parts: what's printed before the break, what's printed after it, and what's printed if no break happens. Ooloi's breaker has all three. A postamble holds what a system's end needs, which is the cautionary key and time signatures; a preamble and a gutter hold what the next system's start needs: clef and key, courtesy accidentals for tied notes, a start repeat. Everything else at a barline belongs to a bar, wherever that bar falls: the barline itself, as it looks at the end of a system, and a clef change drawn in front of it belong to the bar they close, and a new key or time signature to the bar it begins. The third part holds what exists only mid-system: the start half of a repeat barline, which at a break moves to the start of the next system, and the cancellation naturals of a key change, if the house style drops them at a system start because the previous system's cautionary has already shown them. Each is a fixed width at its barline, and the breaker subtracts those inside a candidate system with a single subtraction of running totals, so the result stays exact. All of it is known before breaking, because nothing downstream can change it.
​
This also matters for exactness. Hegazy and Gourlay's pruning is only safe because their systems carry no such material. Give each system start a width that varies from bar to bar and their pruning can wrongly discard systems that would have fitted. ADR-0037 prunes against the full system width instead, which stays exact.

The second concerns editing. A global optimum means that one edit can move breaks anywhere, which is why interactive programs avoid it. In Ooloi every stack's numbers are immutable and cached, so after an edit nothing upstream is recomputed except what the edit actually touched, which is usually the bar that changed. The new optimum is then found exactly from two stored tables, holding the best layouts of everything before the edit and of everything after it, in roughly K² evaluations, where K is the number of bars that fit on a system. That's a couple of hundred cheap evaluations, not a re-layout. Keeping breaks where they were while you work is a separate problem, and the ADR specifies mechanisms for it that are anchored to the identity of bars rather than to luck.

The third is determinism. Layout is computed once, by the authoritative backend, not separately by each client; but it still matters that the same music always produces the same layout. Everything is computed in exact rational arithmetic, and when two layouts cost exactly the same, which under exact arithmetic happens whenever bars are identical, the tie is broken by a rule that depends only on the layout itself, never on the order in which the program happened to meet the candidates. Re-optimising after an edit therefore gives the same answer as starting from scratch, undo brings back the identical layout, and a score opened on another machine looks the same there. Nothing on the page moves unless the music has given it a reason to, which removes a whole class of jitter at its source.
​
One further difference has nothing to do with immutability: Ooloi's cost is written down. It uses Knuth's badness and demerits with TeX's own constants as the starting point. That only works because the adjustment ratio is calibrated so that −1 means collision and +1 means a stated amount of stretch; without the calibration, TeX's numbers would mean something quite different for music. That one is simply care.

What Gourlay has that Ooloi Doesn't

The other direction is the more interesting one. Until now, ADR-0037 allowed four fitting rules, which are ways of deciding how each gap gives way when a system is looser or tighter than ideal. All four were linear glue: each gap stretches and shrinks in fixed proportion, and a system’s force is a single division. None of them could represent a gap that blocks while its neighbours carry on, and none could represent a prestretched gap at all. The ADR’s contract with Stages 1 and 2 actually forbade it, since every gap’s minimum had to be at or below its ideal.
​
And the case isn’t rare. The engraver’s principle is that everything belonging to a note, accidentals included, should fit within its proportional allocation: accidentals don’t add space. But a sixteenth’s allocation is around one and a half stave spaces, and a notehead plus a sharp plus clearance needs more than two. In any chromatic passage in sixteenths, a good share of the gaps have a minimum larger than their ideal. That’s Gourlay’s prestretched spring, and it’s what the decision below turns on.
​
All of this is easiest to picture on a single stave, but Ooloi doesn't space just single staves. Stage 2 aligns every stave in a measure stack on a shared vertical raster: one column for each rhythmic position that occurs in any stave, so that notes sounding together line up from the top of the system to the bottom. A gap in Gourlay's sense is the distance between two columns, and its blocking width is set by whichever stave needs the most room there. A sharp in the violas widens that column for the flutes as well.

What I Have to Decide

There are three ways to go, and each of them shows on the page. Take a bar of chromatic sixteenths, half of them carrying accidentals, as the running example.
​
  1. The first is to stay linear and have Stage 1 raise the ideal of such a gap to its minimum. The accidental then does add space, against the principle. When a system is stretched, the inflated gaps stretch in proportion, so bars with accidentals look looser than bars without them, for no musical reason. Worse, under the current baseline a gap whose minimum equals its ideal can't shrink at all, and one such gap blocks compression of its whole system. In chromatic music that would be most systems, and the breaker would be pushed towards looser systems, and more of them.

  2. The second keeps the raised ideal but gives each gap a shrinkability equal to its own room above its minimum, which was one of the fitting rules ADR-0037 already listed. Compression is then put right: the rigid gap stays where it is and its neighbours give way. Stretching is still wrong, because the raised ideal still stretches in proportion.​
    ​
  3. The third is to adopt Gourlay’s springs. The accidental holds its room until the rest of the system catches up, and then moves with its duration. Under compression, a gap with nothing left to give stays where it is, and the rest carry on giving. It’s what an engraver does, and the existing linear rules survive as alternatives, so nothing already specified is thrown away.

I have decided that Ooloi will adopt Gourlay’s springs, and ADR-0037 has been revised to specify them.
Picture
Picture
Will it make Ooloi slower? As with Hegazy and Gourlay, the dynamic programming itself doesn’t change at all: the same states, the same number of candidate systems, the same tables for re-optimising after an edit. What changes is the arithmetic inside the evaluation of a single candidate system, and only for the systems that need it. Compression is always a single division, exactly as before. So is stretching, until a gap held open by an accidental starts to stretch. Only then does the candidate take the slower path, in which those gaps’ kinks are kept in sorted order as the candidate grows and the force is found by walking them. That costs a handful of extra operations per kink passed, not a spacing calculation.

Those are precisely the systems the linear baseline spaced wrongly. The ones it rejected outright, frozen by a single gap that couldn’t shrink, now cost nothing extra at all. Stages 1 and 2 already compute every gap’s ideal and minimum, so nothing new is asked of them; each stack simply keeps a few sums and a short list of its accidental-held gaps. The result stays exact and identical on every machine, and nothing flows backwards. I’ll know the real cost when there’s a benchmark on chromatic material. Until then, that’s reasoning rather than measurement.

As I've decided to go with the springs, more questions follow.

The first is what r = −1 should mean. If each gap’s shrinkability is set to its room above collision, every gap reaches collision at the same moment, at −1, and TeX’s constants keep their meaning. But wherever long notes have more room than short ones, they give up more of it, and the rhythmic hierarchy flattens under pressure. If shrinkability is weighted by duration instead, short values compress and collide first while longer ones keep giving. That’s nearer to the way engravers describe their own practice, but −1 then needs another definition. The choice decides whether a tight system still reads as rhythm. I’m starting with the first, which is also LilyPond’s default and keeps compression a single division; duration weighting stays a candidate for the plates to decide.

The second is minimum distances that span more than one gap: a long syllable sung across a melisma, or material that crosses between staves. Gourlay’s blocking works between neighbours, so such constraints have to be reduced to minimums on adjacent gaps before breaking. LilyPond’s spacer shows how: a minimum distance spanning several notes becomes a blocking force on every spring beneath it, at a small cost in density that a comment in its source considers acceptable. Since that force depends only on the springs inside the span, it can be worked out before any break is chosen, and that’s the reduction ADR-0037 now specifies, in Stage 2. So Ooloi doesn’t need the per-candidate spacing calculation that LilyPond chose to pay for.

The third is what the raster should do with the room. Take two staves of sixteenths in the same stack, some notes carrying accidentals and some not, in different places in each stave. One answer is that every sixteenth in the bar sits at the same distance from the next, so the rhythm reads as a regular grid and every column gets as much room as the most demanding one. Another is that each column takes only what it needs, so a column with an accidental in any stave is a little wider and the rest a little narrower: more economical, less regular. Gourlay's springs give a third answer that moves between the two. Under pressure the columns differ; as the system loosens, the columns held open by accidentals stop growing while the others catch up, until at some point the grid is even again. Which of these an engraver would choose, and at what degree of tightness, is a question for the plate.

A related case shows what's at stake. Take a bar that opens with a half note, continues with eight thirty-second notes and ends on a quarter. Logarithmic spacing already gives the thirty-seconds far more room than strict proportion would, and with their beams, stems and perhaps an accidental or two they may need more still. The half note and the quarter, on the other hand, are mostly air. An engraver lets them pay: the run of thirty-seconds gets the room it needs, and the long notes give some of theirs back.

Proportional scaling can’t do that. Every gap shrinks by the same factor, so the thirty-seconds reach their minimum first and the whole system stops compressing while the half note still has room to spare. Shrinkability bounded by each gap’s own room, the second option above, does let the long notes give way, and Gourlay’s springs do it as a matter of course: the thirty-seconds, with little or no room above their minimum, give up little or nothing, and the half note and the quarter absorb the rest. This is also where the weighting question gets interesting. ‘Shorter values compress first’ sounds right until the shorter values have nowhere left to go; beyond that point the blocking decides, not the weighting.

What none of this decides is who pays. Gourlay's force is one number for the whole system, so the cost of the thirty-seconds is spread over every gap in it, including a half note three bars away. An engraver might prefer the half note in the same bar to pay, and leave the rest of the system alone. That's a choice between consistency, where the same duration gets the same space across the system, and locality, where each bar settles its own debts. It belongs to the setting of ideal widths within a bar, before any fitting begins. In a full score it's subtler still: if the half note sounds against thirty-seconds in another stave, the raster has no half-note gap to shrink at all.
​
All of this sits beside two questions ADR-0037 already left open. One was whether to add a term for evenness between neighbouring systems, as TeX does with its fitness classes. I’ve decided against it. The cubic badness already punishes an extreme system out of all proportion, so under an exact optimum a cramped system survives next to a loose one only when every alternative costs more. And a comment in LilyPond’s source warns that such a term can make cramped lines more cramped where the music grows gradually denser. Music changes density for reasons of its own, and the layout shouldn’t pretend otherwise. The other question, how page breaking and with it the page turns in parts should be costed, remains open.

How the Others Answer

​Each of the programs I've read has answered these questions definitely, and since I read rather than run them, what follows comes from their source and their documentation. It describes how they work, not how their pages look.

LilyPond's answer is the closest to Gourlay's, more literally than I'd realised. A spring in its spring.cc has an ideal length, a stretch, a compression and a minimum, and its length under a force is the larger of the minimum and the ideal plus the force times the flexibility: Hegazy and Gourlay's formula, prestretched springs included. By default a spring compresses by exactly its room above its minimum, which is the second option above, and a note's stretch is proportional to the space between bare noteheads, so the air stretches and the ink doesn't. In the bar with the half note and the thirty-seconds, the half note therefore takes most of any stretching and most of any compression, because it has most of the air. Durations are spaced from the most common shortest duration, each doubling adding a fixed increment of about a notehead's width, and each column takes the shortest duration sounding in it.

MuseScore, in its current source, derives each note's natural width from its duration on a logarithmic curve: every doubling multiplies the space by a factor, 1.5 by default, starting from 3.5 stave spaces for a quarter. Where a collision demands more room, the extra is spread over the preceding notes rather than piled into one gap. When a system is justified, its notes act as springs whose stiffness comes from their durations, and a note already widened by a collision doesn't stretch until the force reaches it, which is the stretching half of Gourlay's model. Compression works differently: a system that is too wide is re-spaced with paddings and duration spacing reduced in steps, and as a last resort collisions are accepted. Bars are added to a system until the next one no longer fits at its natural width, and the system is then stretched to the margin, as its handbook also describes.

Dorico's documentation says less about mechanism, but two things are on record. In 2015 Spreadbury described forming a column for every onset across all staves and giving it the value of the shortest note sounding there, the same raster as Ooloi's, and spreading surplus space as 'a tiny fraction of a space to each column', in contrast to the hand engraver's habit of giving it to the longest notes first. Its current layout options include a minimum space for short notes, which is the thirty-seconds' case, and a choice, when justifying, between 'actual widths', which count accidentals and dots, and 'ideal widths only', which count the notes. That last option is, in effect, the question of whether accidentals add space, offered to the user as a setting.

None of it will be settled by argument. Ooloi's Vorbilder, the models it measures itself against, are printed pages from the great engraving houses, made by people who did this by hand for a living, and that's where the questions will be settled: on material chosen for where the 5% lives, such as chromatic passages, vocal scores heavy with lyrics, tight orchestral pages and parts with page turns. The measure is how many interventions it takes to reach the layout an engraver produced by hand. That number is the tax. And when I start showing pages from Ooloi, I'll set them beside printed music, never beside another program's output, however anonymised.

Coda

'Boxes & Glue' ended on a thought I hadn't finished: that the space after a whole note and the space after a sixteenth want different things, that each might have its own idea of how far it will stretch and how far it will give, and that this seemed very close to how a human engraver reasons about whitespace.
​
The thought is thirty-nine years old. Hegazy and Gourlay had it in 1987. They passed the springs through the boxes, gave each one a point beyond which it won't give, and solved the result exactly on a machine any modern thermostat would outrun. What they didn't have was a full score reduced to numbers that couldn't change underneath them. But that's exactly what I've spent the last two years building, mostly without realising that this was one of the things it was for.
5 Comments

    Author

    Peter Bengtson –
    Cloud architect, Clojure advocate, concert organist, opera composer. Craft over commodity. Still windsurfing through parentheses.

    Search

    Archives

    November 2026
    October 2026
    September 2026
    August 2026
    July 2026
    June 2026
    May 2026
    April 2026
    March 2026
    February 2026
    January 2026
    December 2025
    November 2025
    October 2025
    September 2025
    August 2025
    July 2025
    June 2025
    April 2025
    March 2025
    September 2024
    August 2024
    July 2024

    Categories

    All
    Accidentals
    Alfred Korzybski
    Architecture
    Backend
    Beaming
    Benchmarks
    Casting Off
    Clefs
    Clojure
    CLOS
    Common Lisp
    DDD
    Death Of Igor Engraver
    Documentation
    Donald E Knuth
    Dorico
    Dynamic Programming
    Finale
    Fonts
    FrankenScore
    Franz Kafka
    Frontend
    Functional Programming
    Generative AI
    GRPC
    Hegazy Gourlay
    Hegazy-Gourlay
    Igor Engraver
    Ingmar Bergman
    Instruments
    Jacques Derrida
    JVM
    Knuth Plass
    Knuth-Plass
    License
    LilyPond
    Lisp
    Localisation
    MIDI
    MPL 2.0
    MuseScore
    MusicXML
    Ooloi
    Ortography
    Pitches
    Platforms
    Playback
    Plugins
    Python
    QuickDraw GX
    Rendering
    Rhythm
    Rich Hickey
    Road Map
    Scheme
    Semiotics
    Sibelius
    Silicon Valley
    Site
    Skia
    Sponsorship
    Testing
    Transposition
    UI
    Umberto Eco
    Vertigo
    VST/AU
    Wednesday Addams

    RSS Feed

Home
​Overview
Documentation
About
Contact
Newsletter
Ooloi is an open-source desktop music notation system for musicians who need stable, precise engraving and the freedom to notate complex music without workarounds. Scores and parts are handled consistently, remain responsive at scale, and support collaborative work without semantic compromise. They are not tied to proprietary formats or licensing.
​
Ooloi is currently under development. No release date has been announced.


  • Home
  • Overview
    • Background and History
    • Project Goals
    • Introduction for Musicians
    • Introduction for Programmers
    • Technical Comparison
  • FAQ
  • Documentation
  • About
  • Contact
  • Workbench
  • Home
  • Overview
    • Background and History
    • Project Goals
    • Introduction for Musicians
    • Introduction for Programmers
    • Technical Comparison
  • FAQ
  • Documentation
  • About
  • Contact
  • Workbench