OOLOI.ORG
Menu

OOLOI

OVERVIEW

FAQ

DOCUMENTATION

NEWSLETTER

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
Magnus Johansson
15/10/2026 21:38:43

"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."

is read by me as

"Parts are exactly where page turns matter, so for parts I'm inclined to let lines 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. Systems can keep the separation."

Is that correct?

Reply
Peter Bengtson
15/10/2026 23:26:35

Not quite, though you’ve found the soft spot. 'System' there means what an engraver means by it: a single-stave line in a part is still a system. The sentence contrasts parts and full scores.

But the reason I give, that heights are nearly predictable, belongs to the number of staves rather than to the word 'part'. A piano or harp part has two staves per system, with cross-staff material and dynamics between them, and still needs good turns. A solo work published as a score has one stave and could drop the separation just as well. The real condition is how tightly the heights can be bounded in advance, and that loosens gradually as staves are added. So it’s a choice per layout, with parts as the natural default, not a rule about parts as such. And it’s still an inclination: the ADRs currently record the separation.

Reply
Magnus Johansson
16/10/2026 08:56:25

" 'System' there means what an engraver means by it: a single-stave line in a part is still a system."

I can't find that Ted Ross used that meaning in The Art of Music Engraving and Processing but I am aware of that the makers of Finale used it. I think that "line" would avoid or at least decrease the confusion.

Reply
Peter Bengtson
16/10/2026 10:28:35

'Line' would trade one ambiguity for several, I'm afraid. To a musician, stave lines, ledger lines, barlines, melodic lines and line objects such as hairpins and trills are all 'lines', and a one-line percussion stave makes matters worse.

'System' has the opposite virtue: it doesn't depend on the number of staves at all. A single-stave line in a part is simply a system with one stave, just as working alone in Ooloi is a collaboration with one member. Internally that generality is the whole point. The breaker never knows how many staves there are, so it has no special case for parts. (The model even admits a system of zero staves, which no engraver would say aloud, but which keeps the definition clean.)

Nor is it only Finale's usage: Sibelius, Dorico and MuseScore all speak of system breaks in single-stave parts.

Where the terminology really does split is between engraving and computer science. The literature from Knuth and Plass onwards, including Hegazy and Gourlay's work on music, speaks of 'line breaking'. So I'll keep that term when discussing the algorithm, and 'system' for the musical object it produces.

Magnus Johansson
16/10/2026 13:45:21

"'System' has the opposite virtue: it doesn't depend on the number of staves at all."

But it does depend on the number: it has to have at least two to be a system. This computer software use of "system" seems to stem from ignorance.

Reply
Peter Bengtson
16/10/2026 14:08:02

You're right about the traditional definition, and I put it too strongly when I said that a single-stave line is what an engraver means by a system. In English engraving usage a system is two or more staves joined at the left. German is looser: 'System', or 'Notensystem', can mean a single stave as well as the 'Akkolade'.

But it isn't ignorance. It's two domains sharing one word, each correct in its own terms. To an engraver, a system is the bracket and what it holds. To the program, it's what the breaker produces: a run of bars between two breaks, set across however many staves the layout happens to have. The engraver's system is a special case of the program's, and the program needs the general case, because the breaker must never know how many staves there are.

Collaboration works the same way. Working alone in Ooloi is, as far as the computer is concerned, a collaboration group whose size happens to be 1. No human would call that a group, and nobody has to.

Mathematics is more permissive still: a set with one member is a set, and so is the empty set. That's why the model admits a system of zero staves, which no engraver would ever say aloud.

It reminds me of the old Infocom game of 'The Hitchhiker's Guide to the Galaxy', where to get anywhere your inventory had to be holding both 'tea' and 'no tea' at the same time. Software is full of inventories like that.

So 'system' stays where the general case is meant, and I'm glad of the reminder that musicians will read it in the narrower sense.

Reply
Magnus Johansson
16/10/2026 15:13:42

"German is looser: 'System', or 'Notensystem', can mean a single stave as well as the 'Akkolade'."

Traditionally it is "System" and "Akkolade" in German, but a modern word pair of "Notenzeile" and "System" has been introduced.

"To the program, it's what the breaker produces: a run of bars between two breaks, set across however many staves the layout happens to have."

Yes, and isn't the breaker called line-breaker?

Peter Bengtson
16/10/2026 15:54:50

Yes, it’s called line breaking, and I said earlier that I’ll use that term when discussing the algorithm. That doesn’t contradict anything. It’s the point.

Work like this sits between two domains, and each has its own vocabulary, settled long before the other arrived. An engraver’s system is two or more staves joined at the left: something concrete. A computer scientist’s line breaker divides a sequence into lines, and those lines are abstract, or general, depending on how you look at it. Ooloi has to be precise in both at once. The algorithm descends from Knuth and Plass, so in that context it’s line breaking. What it produces is a system, because that’s what musicians will see on the page and look for in the menus. The program itself needs the general case, a system of any number of staves, because the breaker must never know how many there are. Each term is correct where it’s used, and none of them is correct everywhere.

Your German examples show the same thing from the other side: System has meant the single stave, the bracketed group, or both, depending on period and context. No single word stays fixed across all of that, and insisting on one would make the writing less exact, not more.

So, tea and no tea, at the same time. Holding both is the job, not a lapse in it.

Reply
Peter Bengtson
16/10/2026 16:12:30

In practice I think this sorts itself out once one is used to the different contexts. When someone in Sweden says 'Jag tror jag går till Systemet' ('I think I’ll go to the state off-licence'), nobody assumes Systemet is a bracket of staves or a run of bars between breaks. Context settles it instantly.

And the zero-stave case is covered too: on a Sunday, Systemet is always completely empty. ;)

Reply
Magnus Johansson
16/10/2026 17:40:44

"Work like this sits between two domains, and each has its own vocabulary, settled long before the other arrived."

Yes, it sits between two domains, but wasn't it so that music notation software programmers just let the old music term "system" mean also a single stave instead of using "stave" for the same purpose, or instead of using another word that would not have confused things from a musician's point of view?

Reply
Peter Bengtson
16/10/2026 18:56:08

No, it isn’t as clear-cut as that. I’m doing this for the benefit of musicians, but to do so, the technical process and its terminology can’t simply be carried over from one domain to the other. Musicians should never have to think about these things, and getting there means working fully within the conventions of computer science, which includes naming the unit the breaker produces independently of how many staves it holds. ‘Stave’ couldn’t do that, and ‘system’, generalised, could.

You’ll find me mixing terminology too when talking loosely. In Swedish, ‘system’ is sometimes used for a single stave even in musicians’ speech. What matters is not being misunderstood when it really counts.

The computer side has to use its own terms in order to build something for users who never need to know about that side. It means holding both at once. Tea and no tea.

Reply
Magnus Johansson
17/10/2026 09:39:38

"[...] and ‘system’, generalised, could."

I don't see how such a generalisation is possible, but let's leave programmers with that. I see there is an established terminology although I do not like it.

"In Swedish, ‘system’ is sometimes used for a single stave even in musicians’ speech."

I never call a stave anything other than "system", "notsystem" or most preferably "notlinjesystem" in Swedish, and I don't believe any of my closest colleagues has done otherwise through the years.

Reply



Leave a Reply.

    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