OOLOI.ORG
Menu

OOLOI

OVERVIEW

FAQ

DOCUMENTATION

NEWSLETTER

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
Magnus Johansson
19/10/2026 20:18:15

Impressive work, Peter! This looks really promising.

Reply
Peter Bengtson
19/10/2026 20:29:30

Thanks, Magnus! I’m really glad you think so. I’d written about these springs for weeks, but nothing prepared me for seeing an accidental hold its ground and then let go, or the ledger lines shorten and lengthen of their own accord. Now it’s a matter of building it, and I can’t wait to get started.

Reply
Renaud
19/10/2026 20:30:28

I, too, am impressed by the fluidity of the layout. I'm curious to see how this balance will be rendered in an actual score. Peter, your work is becoming more and more surprising.

Reply
Peter Bengtson
19/10/2026 20:44:58

Thank you, Renaud! I’ll tell you a little secret: I’m surprised myself. And relieved. I can’t stop watching the animations and thinking about what they mean. As for a real score, the principle doesn’t change. Each column is one spring shared by every stave, held back by whichever stave needs the most room. Whether the balance is right is something only engraved plates can settle, and I’m as curious as you are.

Reply
Ulrik Bodén
20/10/2026 06:40:50

Wow Peter, this is beautiful!

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

Isn't it? I can't stop watching those ledger lines. And all of that motion comes from a single equation, in a paper you found at exactly the right moment. Adopting Hegazy and Gourlay in full is without question the biggest decision Ooloi's engraving has made so far, and it changes what Ooloi is. It's no longer Igor 2.0 in any sense, nor merely an interactive LilyPond. Igor was semantic, and so is Ooloi; that part stays. But Igor's layout was heuristic, like nearly every interactive program's, and with Gourlay we've switched teams. Layout is now mathematics, not a collection of rules of thumb, and your copy of the paper is what made that possible.

Reply
Roland Gurt
20/10/2026 09:11:35

Amazing! Now that is truly an „organism evolved“!

The ledger line example wants to bring a tear to my engraver’s eye... (of course as you say, the exact parameters might be tweaked)

A whole score moving that organically would be an almost artistic sight in and of itself.

The way you rethink decades-old engraving software paradigms continues to impress.


...I can't help but think of one other significant (mine-)field of horizontal spacing: lyrics.

Are they also "handed springs by the barkeeper"? Lyrics are commonly compressed to the point of hyphens and even spaces between words disappearing (as can be seen in any vocal score by Wagner and others). In addition to that, each sillable might not be center-aligned with its note, but can significantly budge to either side. (pic: example from Wagner’s Holländer: https://www.pasteboard.co/Q9jF4p2KlO1y.png)

Reply
Peter Bengtson
20/10/2026 09:17:43

Thank you, Roland! An organism evolved, indeed, and I'm glad the ledger lines reached your engraver's eye, because they reached mine too.

Yes, lyrics get springs as well, and you've picked the hardest case. A syllable is a shape like any other: two syllables can't pass through each other, so the room they need becomes part of the blocking width on the gaps beneath them, worked out before any line break is chosen. The hyphens and word spaces you describe behave much like the ledger lines. Each gap under lyrics has a comfortable distance and a shortest acceptable one, and the springs decide which it gets: in a loose bar the hyphen has its full room, and as the pressure rises it gives way, down to vanishing where the house style allows. As with the ledger lines, nothing is checked afterwards; the hyphen simply takes the room it's given.

The budging syllables are the more interesting part. A syllable that may slide off-centre lends its neighbours room, but it can also push the next one along, so the constraint no longer lives between two notes but across several. That's one of the four forms the spacing model accepts, and how far a syllable may move is exactly the kind of value that should come from plates like your Holländer example, and then be the user's to change. I don't have the final answer yet, but I know where it goes.

And I agree: a whole vocal score breathing like that would be quite a sight.

Reply
Magnus Johansson
20/10/2026 10:07:32

Peter, will it be possible to let the C#4 and A#5 in the examples have the normal ledger line length of C4 and A5 when there is room enough to the left of the accidental?

Reply
Peter Bengtson
20/10/2026 10:18:55

Oh, I should think so, and it fits the model without anything new. Stage 1 reserves the shortest form, Stage 4 decides how much room each gap actually gets, and Stage 5 spends it. An accidental easing leftwards to make room for a full ledger line is spent the same way as a ledger line lengthening: it takes room the springs have already given and never asks for more. Whether to do it, and how far, would be part of the house style you configure.

Reply
Magnus Johansson
20/10/2026 11:13:14

Great!

Reply
Peter Bengtson
20/10/2026 18:26:15

Magnus, I’ll admit I was half expecting that question. ;) You once said that shortened ledger lines weren’t always necessary as far as you were concerned, and that stayed with me. It made me see how the work divides, and I think we’re in a good position. Hegazy and Gourlay guarantee the machinery: notes where their durations put them, and nothing ever colliding. My job is to provide the settings and the means of control. What’s left is taste: whether a ledger line shortens at all, whether the accidental moves aside for it instead, and by how much. That part is yours. At least, that’s the ideal.

Peter Bengtson
20/10/2026 18:38:59

Or put it like this: Hegazy-Gourlay provide the physics, I provide the dials, and you provide the artistic judgement.

Magnus Johansson
20/10/2026 21:40:56

"Magnus, I’ll admit I was half expecting that question. ;) You once said that shortened ledger lines weren’t always necessary as far as you were concerned, and that stayed with me."

Thank you, Peter; you are not only an outstanding "windsurfer", you have a good memory also!

"Or put it like this: Hegazy-Gourlay provide the physics, I provide the dials, and you provide the artistic judgement."

Excellent!

Reply
Andreas Kågedal
22/10/2026 15:20:45

Beautiful! Indeed!

In the second animation the distance between the two middle notes (the D and the Abb, if this is treble clef) seems to be shorter than the distans between the first and second, and thirt and fourht notes when the system i the fully "stretched". Is that intended?

Reply
Peter Bengtson
22/10/2026 15:36:24

Thanks, Andreas, and well spotted! Yes, it’s intended. I should have said that the rhythm is dotted eighth – sixteenth – dotted eighth – sixteenth, so the middle gap belongs to the sixteenth and is the shortest once the bar is loose. I left out stems and beams to keep the animations clean, but here they’d have made it obvious.

At the tight end the order flips. At a force of −1, where 0 is ideal spacing and positive values stretch, every gap is at its blocking width. Durations no longer count at all, and the double flat’s gap is the widest because it needs the most room. In practice that extreme is strongly avoided, since the cubic penalty makes it very costly. It’s in the animation only to show that even there, with proportional spacing squeezed out entirely, nothing collides.

Reply
Malte
23/10/2026 16:03:57

I have a question about lyrics: if there is enough room between syllables you print a hyphen. If there is no room at all (spring totally compressed) you don't print it. But what about a spring that is almost totally compressed, i.e. only very little room? IIRC LilyPond shortens and then omits hyphens but a very small gap without a hyphen looks wrong. Is there a possibility to have a spring that has it's minimum length at the smallest hyphen width but may collapse completely under really strong force so you don't have this ugly small space?

Reply
Malte
23/10/2026 16:32:46

I just tried it with LilyPond and it’s worse than I thought: There is *always* a gap between syllables. https://www.pasteboard.co/DW_8OyEJMTys.png

It’s even worse in MuseScore because the minimum gap is larger.

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

Thanks, Malte, and thanks for testing it. I’m delighted that the conversation here has turned from event systems, window handling and the rest of the plumbing to the central questions of engraving, almost the very moment the project reached horizontal placement. It shows me the practical side of things, and exactly where engravers’ afternoons actually go.

You’ve put your finger on exactly the case where giving way gradually isn’t enough. A hyphen can shorten, but below a certain point a gap with no hyphen in it just looks wrong, and then the only good answer is no gap at all.

A single spring can’t do that. Its width changes continuously with the force, and a gap that jumped from room for a hyphen to nothing would leave some system widths impossible to reach. But the jump doesn’t have to live in the springs. Let them reserve the collapsed form, syllables closed up, so they know how tight the words can go. Then, once the notes are placed, each gap is spent in order of preference: a full hyphen where there’s room for one, then a shortened hyphen down to its smallest acceptable length, and below that the syllables slide together off-centre until they close up, as in Roland’s Holländer example. Sliding only uses room the springs have already given, so nothing collides and nothing is respaced. The small, empty gap only remains where a syllable isn’t allowed to move far enough.

How short a hyphen may get, and how far a syllable may slide from its note, are house-style values, and exactly the kind of thing the plates should settle. None of this is specified in that detail yet. Lyrics will have an ADR of their own: they matter far too much to vocal music to live as a subsection of spacing, and your question goes straight into it.




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