Expand description
Logical, pixel-free score layout engine for acorde-core
scores — computes row breaks, multi-rest collapsing, beam groups, tuplet groups, courtesy
accidentals, and span (hairpin/ottava/pedal/slur) resolution for score renderers (e.g. VexFlow).
Structs§
- Accidental
Mark - A mandatory (non-courtesy) accidental that must be drawn beside a notehead.
- Beam
Group - A group of beamed notes within a single voice of a measure.
- Concert
KeyOverride - Concert-pitch key signature override for a specific staff of a transposing instrument.
- Courtesy
Accidental - A courtesy (cautionary) accidental to display in parentheses.
- Glyph
Metrics - Font-independent metrics for one print glyph, expressed in millimetres.
- Glyph
Placement - A positioned print glyph with a deterministic collision priority.
- Keep
Together Range - A contiguous range of physical measures that must remain in one printed system.
- Layout
Config - Configuration for a layout pass.
- Layout
Result - The result of a layout pass.
- Measure
Mark - Host-neutral notation marks attached to one physical measure in a print system.
- Note
Addr - Physical address of a note within a score.
- Page
Address - Stable address of a page within one print-layout result.
- Page
Layout - One page in a
PrintLayoutResult. - Page
Span Segment - A cross-system span’s intersection with one printed page.
- Print
Config - Host-neutral inputs for deterministic page and system layout.
- Print
Layout Result - Deterministic page/system geometry for a score.
- RowLayout
- One horizontal row (system) of measures.
- Span
Segment - A span’s intersection with one printed system.
- System
Address - Stable address of a system, including global and page-local positions.
- System
Layout - A logical system placed on a page.
- Tuplet
Group - A group of notes forming one tuplet bracket within a single voice of one measure.
Enums§
- Break
Reason - Explains why a system or page ended at its final measure.
- Crop
Mark Policy - Whether a host should expose crop marks at the configured bleed boundary.
- Final
Page Policy - Policy for distributing systems when automatic pagination would leave a one-system final page.
- Glyph
Resource Policy - How a host resolves fonts and notation glyph resources for print output.
- Notation
Break Policy - Policy for preserving repeat-ending notation while systems are reflowed.
- Page
Numbering - Policy for the page number exposed in logical page metadata.
- Page
Orientation - Page orientation for a logical print layout.
- Paper
Size - A paper size expressed in physical millimetres.
- Pickup
Policy - Policy for reserving the first system for a partial pickup measure.
- Print
Color Policy - Color intent for a print-capable host.
- Print
Layout Error - Span
Mark - A resolved span between two note addresses.
Functions§
- compute_
layout - Compute a
LayoutResultfor the given score and configuration. - compute_
print_ layout - Compute physical page and system placement without rendering or host integration.
- resolve_
glyph_ collisions - Move lower-priority glyphs vertically until their bounding boxes no longer overlap.