OOLOI.ORG
Menu

OOLOI

An Organism Evolved.

OVERVIEW

DOCUMENTATION

NEWSLETTER

Six Degrees of Unification

6/1/2026

2 Comments

 
To implement what was described in the last blog post deterministically, ADR 0028, on the hierarchical rendering pipeline, and ADR 0037, about measure distribution, both have been updated. The rendering pipeline now has six stages rather than five.

The additional stage enables the behaviour discussed in the previous post, but also allows slurs, lyrics, dynamics, and other elements that require vertical space to adapt dynamically without introducing layout jitter.

What follows is a brief tour of the six pipeline stages. Each has a clearly defined role, a fixed direction of information flow, and no hidden feedback paths. Together, they transform musical structure into pages without iteration.

If you are a musician, you should be able to follow how the music moves from essential meaning to visual expression. If you are a developer, the architectural choices should be readable between the lines. In both cases, the ADRs contain the full technical detail.

Stage 1: Atoms

Each measure is processed independently and turned into engraving atoms: indivisible musical units that already contain noteheads, augmentation dots, accidentals, stems, articulations: everything that belongs together. A note or a chord is an atom, including everything at a fixed distance from that note or chord. Once an atom is computed, its constituent parts never move relative to each other, though they can be adjusted manually or converted by the user to pure graphics for Illustrator-like manipulation.
​
From these atoms, the system derives three facts about the measure stack: a minimum width, where atoms are simply lined up after one another (guaranteeing that nothing ever collides); an ideal width, based on proportional spacing from rhythmic density; and a gutter width – extra space required only if the measure begins a system. Courtesy accidentals caused by system breaks are accounted for here as space requirements, not as symbols. Ordinary courtesy accidentals are already part of the atom.

​Stage 2: Rhythmical Alignment

All measures in a stack contribute a rhythmic raster: the sequence of atom positions implied by their rhythmic content at ideal spacing. Stage 2 takes these per-staff rasters and aligns them into a single, stack-wide rhythmic grid, so that 'the beat structure' is shared across staves rather than each staff carrying its own local spacing. Because the system has both the rasters and the atom extents from Stage 1, it can adjust the aligned positions so that collisions are avoided while still preserving the intended proportional structure.

​Stage 3: System Formation

With rhythmical alignment complete, the score collapses to a one-dimensional sequence of measure stacks, each described only by stack minimum width, stack ideal width, and possible stack system-start gutter. System breaks are chosen using dynamic programming, and a scale factor is computed for each system so that ideal proportions are preserved as well as possible within the available width. At the same time, system preambles (clefs, key signatures) are fully determined. Apart from these, the stage produces only break decisions and scale factors; no measure content is positioned yet.

​Stage 4: Atom Positioning

The abstract decisions from system formation are applied. Each atom is positioned horizontally by scaling its ideal spacing according to the scale factor of its system. Because atoms were defined with purely relative internal geometry, they can be moved without recomputation. This stage is a pure projection from musical proportions to absolute coordinates.

​Stage 5: Spanners

All connecting elements are resolved against the fixed atom positions: ties, slurs, hairpins, ottavas, lyric extenders. They adapt to the horizontal geometry they are given and never influence spacing upstream. System-start decorations live here as well: courtesy accidentals now appear in the gutter space that was explicitly reserved earlier.

​Actual system heights emerge at this stage as a consequence of what must be drawn – slurs, ties, lyrics, pedalling indications, hairpins – each claiming vertical space as required to avoid collisions. In this stage, braces, brackets, and instrument name indications are also computed for the left margin, as all information required to determine system grouping and extent is now available.

​Stage 6: Page Formation

Systems are distributed across pages using dynamic programming, this time over the actual system heights produced by the previous stage. As in Stage 3, the distribution is optimal with respect to the available space. Once page breaks are chosen, layout is locked and no earlier stage is revisited. At this point, all rendering decisions have been made. The score can now be drawn directly from the cached paintlists.
2 Comments
Roland Gurt
6/1/2026 22:38:12

Thank you for keeping us updated!

I would recommend to everyone interested to read the "Architectural Decision Records" on github https://github.com/PeterBengtson/Ooloi-docs/tree/main/ADRs which go into even greater detail than the blog posts here on the site.

If I may post some casual thoughts on the positioning of notation elements:

If the notation elements themselves are tightly and space-efficiently positioned and kerned (using exact bounding boxes), there is less need for the user to step in – and for example nudge an octave line closer to the staff (which might then require readjusting the vertical distance between every staff on the page). The system might have placed this octave line too far away from the staff because of flageolet circles, articulation marks, slurs and text items all coming together below, each not ideally kerning into each other and therefore creating too much white space. A particular and long-standing culprit of suboptimal positioning have been of course slurs (as well as maybe text items, rehearsal marks, and lyrics). Surely, a high-grade slur forming algorithm would be like the holy grail in many cases.

But I’m also reminded more generelly of the terms "white space" and "blackness": I think it is the user OCTO on the notat.io forum whom I noticed using the term "blackness"(?) of a page, which is quite evenly and pleasingly distributed in hand-engraved scores; while digitally engraved scores tend to have inconsistent line thicknesses but also rely too much on fixed distances between classes of elements (leaving inharmonious white space, making the page harder to parse). For example, in traditional scores, a forte for a high note might almost touch the staff (or even be placed partially within the staff in tight situations), but for a lower note, one might want to keep a minimum distance (or even move the dynamic to the left of the note to avoid large vertical gaps between staves).
This reminds me of graphic designers using optical distances between elements to achieve a visual impression of uniformity, rather than using bounding box edges as anchor points. Almost as if each element had its own magnetic field that can vary in size, corresponding with surrounding elements in certain harmonious proportions.

Reply
Peter Bengtson link
7/1/2026 09:32:02

Thank you, Roland. That’s a thoughtful and generous response.

You’re touching exactly the boundary where objective guarantees end and aesthetic judgement begins. My focus so far has been to make the non-negotiable parts of engraving behave correctly and predictably: spacing that doesn’t jitter, system and page breaks that don’t cascade, accidentals and attachments that don’t require manual repair after edits. Without that stability, aesthetic refinement is largely futile.

What you describe in terms of blackness, optical balance, and perceived harmony is very real, and also precisely the kind of work that only becomes safe once the underlying layout is deterministic and one-way. In Ooloi, those refinements live strictly downstream: they can improve how things look, but they are not allowed to feed back and renegotiate spacing, breaks, or structure.

Slurs are indeed the next genuinely difficult frontier. Not because they should influence layout – they must not – but because they are continuous geometry reacting to a fixed world. That makes them hard in an honest way. The hope is that the six-stage separation removes everything that shouldn’t make slurs hard, so what remains is curve quality rather than architectural entanglement. This is exactly where treating the piece as a stream again will allow me to focus on the task itself, rather than wasting energy running up and down the stairs of that prison complex, if you remember the Computer Science for Musicians post.

In short: I agree with you. And I also think this is precisely the point in the process where those questions can finally be explored without destabilising the score. That’s the work that comes next.

And you’re spot on about the practical side: the work immediately ahead – windows, palettes, dialogs, popups, rendering plumbing – is all a very leisurely walk in the park compared to the truly difficult engraving problems of getting slurs and ties right. Those are harder than sit-straddle-hang. By far.

Reply



Leave a Reply.

    Author

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

    Search

    Archives

    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
    Benchmarks
    Clojure
    CLOS
    Common Lisp
    DDD
    Death Of Igor Engraver
    Documentation
    Donald E Knuth
    Dorico
    Dynamic Programming
    Finale
    FrankenScore
    Franz Kafka
    Functional Programming
    Generative AI
    GPL V2
    GRPC
    Igor Engraver
    Jacques Derrida
    JVM
    License
    LilyPond
    Lisp
    MIDI
    MuseScore
    MusicXML
    Ooloi
    Ortography
    Pitches
    Plugins
    Python
    QuickDraw GX
    Rendering
    Rhythm
    Rich Hickey
    Road Map
    Scheme
    Semiotics
    Sibelius
    Site
    Skia
    Sponsorship
    UI
    Umberto Eco
    Vertigo
    VST/AU
    Wednesday Addams

    RSS Feed

Home
​Overview
Documentation
About
Contact
Newsletter
Ooloi is a modern, open-source desktop music notation software designed to produce professional-quality engraved scores, with responsive performance even for the largest, most complex scores. The core functionality includes inputting music notation, formatting scores and their parts, and printing them. Additional features can be added as plugins, allowing for a modular and customizable user experience.

​Ooloi is currently under development. No release date has been announced.​


  • Home
  • Overview
    • Background and History
    • Project Goals
    • Introduction for Musicians
    • Introduction for Programmers
    • Introduction for Anti-Capitalists
    • Technical Comparison
  • Documentation
  • About
  • Contact
  • Home
  • Overview
    • Background and History
    • Project Goals
    • Introduction for Musicians
    • Introduction for Programmers
    • Introduction for Anti-Capitalists
    • Technical Comparison
  • Documentation
  • About
  • Contact