OOLOI.ORG
Menu

OOLOI

OVERVIEW

FAQ

DOCUMENTATION

NEWSLETTER

No Cats Were Herded

4/11/2026

6 Comments

 
Picture
​ADR-0055 says that the first note of a measure stands one staff space from the barline, measured to whatever ink comes first. It's a reasonable rule, and the kind you only really understand by looking at it. So I looked.

This week has been play, in the most serious sense I know: change a number, watch what the page does, change another. The stretch dial was already settled at 1, so that only white space stretches, which is what an engraver does. What I wanted now were sensible defaults for everything around a barline: the space after it, the space before it, and how both behave when a system is squeezed or pulled. Defaults defensible today, as legible as the mathematics allows, and still only defaults, since a house style can replace any of them.
​
What follows are four pictures, in the order I made them, each answering a question the one before had raised. They're computed by Ooloi's reference model, not rendered by Ooloi. Bravura's glyphs are drawn from the font's outlines and every contact is measured on them; the rest are placeholders until the plates have spoken. The music above is where it ended: four measures at the default settings, with nothing annotated. Everything below is how it got there.

One Rule, Six Notes

Here's the first column after a barline, six ways: a plain note, a sharp, a flat, a natural, two stacked accidentals and an arpeggio, at normal width and fully compressed. The sliders are the settings. Wherever a distance is drawn in a slider's colour, that setting is what put it there; grey is a result.
Picture
The trouble with the rule as written doesn't need a picture. One staff space to the first ink means that a sharp pushes its notehead 1.2 spaces further to the right than a plain note, and two stacked accidentals push it 2.1. Engravers don't do that. They let an accidental come closer to the barline than a notehead would, because the notehead is the rhythm and the accidental only announces it.

So the rule split in two. The standard distance, 1.0, runs from the barline to the notehead. A second setting, the least distance at normal width, lets any ink before the notehead come as close as half a space before it starts pushing. A third, the least distance at full compression, is where all of it ends up when a system is squeezed as far as it will go: a quarter space, approached in proportion on the way.

Now look at the bottom row. The sharp, the stacked pair and the arpeggio come in to a quarter space. The flat, the natural and the plain note stop at half a space, and nobody told them to.
​
A flat's upright, a natural's and a stem pointing down all run parallel to the barline, and two parallel lines closer than Bravura's double barline, whose lines are 0.4 apart, read as a double barline. That's the fourth setting, the least distance to a stroke, and it doesn't know what a flat is. It looks at the outline: where the edge facing the barline runs straight and parallel to it for at least a staff space, that edge is a stroke. A sharp's uprights are short and set back behind its crossbars, so a sharp isn't one.

Forty Staves

​The first column belongs to every staff in the system. If one staff's note has to move, the whole column moves with it, in every staff.
Picture
That's why the least distance at normal width matters more than it first seems to. In a score of forty staves, a single accidental in a single staff shouldn't push forty first notes to the right by its full width. An engraver would let that accidental sit closer to the barline than the standard distance and keep the column where it was. With the defaults, the sharp moves the column 0.70 rather than 1.20. Set the least distance at normal width to a quarter space, as the third panel does, and it moves 0.45.
​
The upper row stands still at normal width. The lower row runs through one adjustment ratio shared by all three panels, from fully compressed to as loose as TeX would tolerate, and the space after the barline shrinks in proportion as the stacks compress, like every other gap. Each panel ends in a double barline, so you can compare a stem beside a barline with the real thing.

Room to Spare

When a system stretches, every note's white space grows in the same proportion. The question is what the space after the barline should do meanwhile.
Picture
The fifth setting answers it: the share of the standard distance that stretches as white space does. At 0 the space after the barline stays put however loose the line gets; at 1 it keeps its proportion to every note's white. The three rows are identical down to normal width and only part company as the system loosens.
​
The default is a half, and it's also LilyPond's. Its barline gives the next note a semi-fixed space of 0.9, half of it fixed and half stretchable, and in this model that comes to exactly the same thing. The difference is that LilyPond chooses between a few fixed kinds of space (rigid, half, all), whereas here it's a number between 0 and 1.

The Other Side

​So far everything has happened after the barline. Before it the music is different: flags, dots, and the last note of a measure, whose space runs right up to the barline, which belongs to its measure, thickness and all.
Picture
​My first version gave this side a least distance of its own, a quarter space at every ratio. It left an eighth's flag 0.28 from the barline at normal width and a sixteenth's 0.25, and it looked cramped. The cure turned out to be no new setting at all. A least distance keeps ink legible beside a vertical line, and that has nothing to do with which side the ink is on, so the barline's own pair, half a space at normal width and a quarter at full compression, now guards both its sides. The stroke distance does too, which is why the up-stemmed quarter at the end of the first measure keeps its half space when everything else is squeezed.

The one setting that belongs to this side alone is the borrowing: how much of the barline and the space after it is taken out of the last note's own space. At 0, the default, the barline comes on top, as it does in LilyPond. At 1, the next measure's first note stands exactly where the last note's space ends, so the rhythm runs on across the barline as if it weren't there, at normal width and stretched alike. Watch the quarter at the end of the first measure: underneath, the barline adds 1.16, then 0.58, then nothing.

The eighth and the sixteenth have nothing to lend. Their flags need the room: a sixteenth gets 1.8 spaces, and its flag reaches 2.18 from the left edge of its notehead, so the barline makes way for it even at normal width.
​
And then there's the thing I keep going back to watch. At full compression, the two sixteenths in the third measure slide together until the first one's flag is a clearance away from the second one's stem, the two flags nesting one above the other. Nothing in the model knows what a flag is. The outlines of two notes, compared band by band, are all it has.

No Cats Were Herded

None of this needed a rule about anything in particular. There's no rule for a flat after a barline, none for a flag before one, and none to decide which rule wins when two of them meet. Every collision is the same comparison: two outlines, band by band, kept apart by a clearance. The settings say how far; the springs say where, and they're the same Hegazy and Gourlay springs that cast off the music.

Had I described spacing as rules about pairs of things, I'd be herding cats: a rule for a flat after a barline, another for a natural, another for a stem, exceptions to each, a referee for their quarrels, and a new cat for every new symbol. The springs and the outlines are what made the cats unnecessary, and I chose both for other reasons entirely, the springs for casting off and the outlines for a ledger line between a sharp's crossbars. Watching them pay out here, without being asked, is the best part of the week.

It's also why this week was possible at all. I could look for defaults by playing because the mathematics is pure: each setting does one job, so I could move one, look, and know that nothing else had shifted in some negotiation behind my back. And the model is exact. It's written from the ADRs in rational arithmetic, it reproduces their published numbers, and Ooloi's implementation will be checked against it number for number, so what these pictures show is what Ooloi will do with the same values, and any difference will be a bug. With a herd of cats I could have done neither. The defaults would have had to wait for the rendering pipeline, and then be found by arguing with it.
​
I want to be exact about the claim, though. The stroke distance is an optical rule rather than a matter of collision; it's simply stated geometrically, so that it applies to any straight edge. And there will be heuristics in Ooloi, because engraving is full of rules of thumb. One is already waiting: an up-stem just before a barline looks cramped, and LilyPond adds a little space for it. But rules of thumb will come where they cause no damage and no delay, on top of a model that already guarantees that nothing collides and every note stands where its duration puts it, never in place of it.

À la recherche des défauts perdus

So, for now: one staff space from the barline to the notehead; half a space to any ink at normal width and a quarter at full compression, on both sides of the barline; half a space to any stroke, always; the space after the barline stretching at half the rate of white space; and nothing borrowed from the last note. Each is a single number in a house style, and none needs another adjusted to it.

The relevant ADRs have been updated with the new settings, their defaults and the pictures you see here, ADR-0055, Horizontal Spacing, first among them.

Anyone who objects to the bottom rows of these pictures will be objecting to full compression, which is the limit the settings are defined at, not what a score will normally look like. A system that tight costs the line breaker more than a hundred times as much as one at its ideal width, so it adds a system long before it gets there. You'll see it where breaks are forced, or in a short passage between forced breaks with slightly too much music for one system and too little for two. And if a quarter space is still too tight for your taste, raise it: the breaker will simply add systems sooner.

Not everything came out clean. Compared band by band, two noteheads a second apart in successive columns were allowed to overlap a little in width, because their outlines curve away from each other and the ink never quite meets. Engravers don't let a note begin before the previous one has ended, so a rule about the order of columns is coming: a rule of rhythm, which outlines were never meant to know about. A dot at the end of a heavily compressed measure can also come close enough to a barline to look like half a repeat sign. Both will get their turn.
Picture
Exeunt, pursued by a stave
6 Comments
Magnus Johansson
4/11/2026 15:18:41

This all looks very solid. Thank you, Peter, for this account and congratulations! I believe the cats were never really there although they likely have wanted to.

Reply
Peter Bengtson
4/11/2026 16:10:12

Thank you, Magnus. Coming from you, 'very solid' means a great deal.

And in case anyone wonders: I don't hate cats. My cat Elsa lived to 25, which is ancient for a cat. The cats in the title are the other kind, the ones you herd while wearing protective clothing.

They did hang about outside for a while, though. As I've written before, I expected horizontal spacing to be a long, running battle over every single positioning decision. Instead I got the rarefied air of clean mathematics. So far the model has absorbed everything an engraver would do by instinct, or at least let me express a wide range of styles without any effort at all.

I can't begin to tell you how thrilling I find this work. And that we've all been able to discuss engraving purely from the model, which is to say music, is such a breath of fresh air. Those invisible underground tunnels were important, but now we're up in the daylight.

Reply
Roland Gurt
4/11/2026 23:47:50

Nice to see this mathematical model being so flexible and effective! You’re working on music engraving’s "Weltformel" ("theory of everything") ;-)


...by the way, for anyone interested... I recently viewed the (computer-engraved) score for Schott’s 1996 edition of Stravinsky’s "Firebird": https://www.schott-music.com/de/pdfpreview/index/view/id/158392 – this can be compared page-by-page with a traditional engraving (same line breaks) https://www.schott-music.com/de/pdfpreview/index/view/id/214586 and can be used to study every element of classic engraving and how it may translate to (early) computer engraving. (Both scores are not perfect of course.)

Ironically, the hand-engraving anchors my eyes solidly and gives me overview of the musical landscape like a perfect map, while the computer-engraving seems to me like a "hand-scribbled map" in a disorienting way, making it more uncomfortable to visually grasp macro-structures of the music.

Reply
Peter Bengtson
5/11/2026 10:52:45

Thank you, Roland. I really like ‘Weltformel’! I’d better be honest about authorship, though: I didn’t write the formula. Hegazy and Gourlay published it in 1987, and what I’m doing is finding out what it can do. So far that’s a great deal more than I expected.

I suspect nobody has explored it like this in an interactive program because it was thought too slow, and as far as I can see it never was. What it needs is data that’s settled before it starts, with every bar reduced to numbers that won’t change while the breaker works. Precompute that properly and speed stops being an issue. An architecture of negotiating formatters can’t supply that, because there the widths come out of layout rather than going into it. That negotiation is what really takes time. Remove the cats and you remove the meowing, and most of the burden on the computer with it.

The more I use it, the more it looks like a Weltformel, at least for horizontal space. The original one fared less well, mind you. When Heisenberg announced his in 1958, Pauli sent George Gamow a drawing of an empty frame, claiming he could paint like Titian: ‘Only technical details are missing.’

Ooloi’s technical details are slurs, ties and beams, and they’re the really difficult part. I have a few ideas built around negative space, treating the blank space itself as a factor in the mathematics. It’s the next frontier, I expect to spend a lot of time and effort on it, and I’ll be returning to it here.

And thank you for the Firebird pair: that’s exactly what I need. Side by side, the computer engraving feels soulless to me too. Its spacing is less ideal, though the hand engraving has some of that as well, to a lesser degree, so I doubt spacing is the whole story. Under ‘Ut Tensio, Sic Vis’ I said that warmth is in the tuning; your two editions make me suspect that’s only part of it. I keep asking myself why the digital version looks less alive, less sensuous, less organic. Sometimes I think it may simply be that it’s sharper, and I’ve toyed with the idea of adding a little noise to make everything slightly fuzzier. Engraving, true engraving, is as much about perception and psychology as about the typographical subtleties. We shall see.

I just wish I’d chosen a comment system for this blog that lets you upload images directly. Until then, pasteboard links like yours will have to do.

Reply
Roland Gurt
6/11/2026 18:34:31

Fascinating. Yes, which elements worsen the impression of the digital version compared to the original engraving?... I would say: the janky spacing is what makes it look stiff and unelegant.

The coldness might come from the line thicknesses and the symbols themselves (as well as black-white-balance). It’s been evident for a long time that plate-engravings have much thicker staff lines etc., especially full scores. This is tuning that can already be achieved in software, although decades of bad default settings in software have left their marks in people’s judgement.

Now the lack of sharp edges and the tiny imperfections could definitely play a significant part (they are certainly abundant in the hand-engraving), and this is not yet common in digital engraving. It remains to be tested to what degree this would result in a better output or would just appear more as a "vintage-mockery". (though I am always reminded of Friedensreich Hundertwasser’s art manifesto where he laments that today’s humans are the first in history who can never look in any direction without seeing a "jungle" of straight lines, which he called godless and immoral)

Here was discussed an astonishing example of a digital score indistinguishable from a traditional one: https://notat.io/viewtopic.php?t=46

A similar venture is here https://notat.io/viewtopic.php?t=1115

In closing, two further inputs on the matter of spacing: a description of the types of optical spacing adjustments Lilypond does https://notat.io/viewtopic.php?t=166
and maybe the greatest compendium of difficult notation situations, mastered to a staggering degree: UE’s vocal scores of Berg’s "Lulu", engraved in a time where maybe the most money and attention ever went into engraving: https://imslp.org/wiki/Lulu_(Berg,_Alban)

Best regards! Roland

Reply
Peter Bengtson
7/11/2026 13:17:02

‘Vintage-mockery’ is exactly the word, Roland, and ‘janky spacing’ is exactly the diagnosis. That’s why I want to get the basic spacing just so first. Once it’s right it stops masking everything else, and the intangibles we’re discussing here can be investigated on their own.

And yes, decades of bad defaults have left their mark on everyone’s judgement. Stockholm syndrome, and I say that as a Stockholmer. There’s more to it than defaults, though. Much of what makes a page harmonious, and lets you take in the large-scale structure at a glance, has never been formalised at all. We’re simply used to it. Working with Hegazy and Gourlay has underlined for me that the notes are rhythm, and that the page should show that rhythm as faithfully as is humanly possible. The borrowing setting in this post, which lets the rhythm run on optically across the barline, is one aspect of that. Thicker staff lines and ledger lines belong to the same unwritten knowledge, and there’s a great deal more of it.

One of the intangibles is worth investigating precisely because it isn’t vintage mockery. Small music, in ossias and cues, looks anaemic when it’s simply scaled down, because every stroke shrinks with it. Type founders knew this: metal type was cut separately for each size, and the small sizes were heavier. Some SMuFL fonts include optical variants for small staves for the same reason, but many don’t, and those that do are usually drawn for a single size. I have an ADR coming on doing it automatically in the graphics engine, thickening the ink of smaller music by an amount that depends on its size, so that it keeps its weight wherever dedicated glyphs are missing.

And Lulu! Like Wozzeck, it’s one of my favourite scores, for the music and the engraving alike. I got hooked on that sound and that look in my early teens, and they’ve stayed with me ever since. Which brings me to fonts. I’d like to make examples in November 2 for exactly that kind of repertoire, though Bravura has its merits too: its look is so well known.

I’ll take a look at the engraving links tonight. Many thanks!

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