|
“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. Notehead to NoteheadHere 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. The Springs Made VisibleThis 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. Three Ways to Fit a BarThis 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. Ledger LinesThe 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. Nothing CollidesLook 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. WarmthThat 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“!
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.
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."
Reply
Andreas Kågedal
22/10/2026 15:20:45
Beautiful! Indeed!
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.
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
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. Leave a Reply. |
AuthorPeter Bengtson – SearchArchives
November 2026
Categories
All
|
|
|
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.
|
RSS Feed