ScoreScript Language wiki

Page and system layout

Start systems and pages at musical places

A system-map lists the first measure of each new system; a page-map lists the first measure of each new page. Measure 1 is implicit. Put the map inside a part when it describes that player's page.

ScoreScript sourceDownload source
scorescript 0.3
score "Four lines" {
  parts { fl }
  fl {
    system-map {3, 5, 7}
    page-map {5}
    m1-8 { 1C5 | D | E | F | G | F | E | C }
  }
}
Generated notationNotation for the preceding Page and system layout example
Canonical spelling
scorescript 0.3
score "Four lines" {
  parts {
    fl
  }

  fl {
    system-map {3, 5, 7}

    m1-2 {
      1C5 | D
    }
    m3-4 {
      1E | F
    }
    \p
    m5-6 {
      1G | F
    }
    m7-8 {
      1E | C
    }
  }
}

system-map {5:2} starts a system at measure 5 and requests exactly two semantic measures. A plain 5 starts a system without prescribing its count. When copying a printed part, read each system's first measure number directly. Page starts imply system starts; system starts alone do not imply new pages. Conflicting authored cuts can cause the renderer to decline an exact-count span; inspect the render report instead of treating it as an override. The example requests systems beginning at 1, 3, 5, and 7, with measure 5 starting a new page. The inline preview is flowing SVG; use paginated SVG or PDF output to see page boundaries.

Local cuts

\n starts a system before its containing measure. \p starts a page and system there. Prefer placing either immediately after the preceding barline, before the target measure's first note. A trailing cut before a barline still belongs to the current measure; it does not mean “after this bar.”

Source within a musical rowResult
1C5 | D \n | ENew system before D, measure 2
1C5 | D | \n ENew system before E, measure 3
1C5 | D | \p ENew page and system before E, measure 3

Address a cut inside omitted silence by attaching its number, such as \n29. A part's cut belongs to that part. A score-level layout { \n13 \p46 } applies globally.

These are actual backslash letters in the source, not escaped newlines in a programming string. A lone backslash at the end of a physical source line continues the same musical row instead of requesting an engraved break.

Inside parts-first and measures-first music

These two sources request the same notes and player-local cuts. In both, flute starts a system at measure 2 and a page at measure 4; oboe has no player-local cuts.

Parts-first:

ScoreScript sourceDownload source
scorescript 0.3
score "Part-local cuts" {
  parts { fl ob }
  fl { m1-4 { 1C5 | \n D | E | \p F } }
  ob { m1-4 { 1C4 | D | E | F } }
}
Generated notationNotation for the preceding Page and system layout example
Canonical spelling
scorescript 0.3
score "Part-local cuts" {
  parts {
    fl
    ob
  }

  fl {
    m1 {
      1C5
    }
    \n
    m2-3 {
      1D | E
    }
    \p
    m4 {
      1F
    }
  }

  ob {
    m1-4 {
      1C4 | D | E | F
    }
  }
}

Measures-first:

ScoreScript sourceDownload source
scorescript 0.3
score "Measure-row cuts" {
  parts { fl ob }
  m1-4 {
    fl { 1C5 | \n D | E | \p F }
    ob { 1C4 | D | E | F }
  }
}
Generated notationNotation for the preceding Page and system layout example
Canonical spelling
scorescript 0.3
score "Measure-row cuts" {
  parts {
    fl
    ob
  }

  m1-4 {
    fl {
      1C5 | \n D | E | \p F
    }
    ob {
      1C4 | D    | E | F
    }
  }
}

In a parts-first body, system-map {2} and page-map {4} can express those same flute boundaries. Do not put these maps inside the flute's measures-first row or invent a map-only detached flute body beside it: those placements are not supported. Use inline cuts in that row, or a score-level map when the intent is genuinely global.

Duration inheritance still applies around cuts

ScoreScript sourceDownload source
qEb5 Bb D E | wD | A | \n eD D D D hr | eEb G Bb er hr
Generated notationNotation for the preceding Page and system layout example
Canonical spelling
4Eb5 Bb D E | 1D | A | \n 8D D D D 2r | 8Eb G Bb r 2r

The first bar has four quarters. wD changes the inherited duration to a whole note, so the next A is also whole. In measure 4, eD changes it to an eighth; four eighth notes plus hr fill the bar. The \n begins a system before that measure and consumes no duration.

After hr, the inherited duration is a half. Therefore measure 5 needs the explicit e on Eb: three eighth notes, an eighth rest, and a half rest fill 4/4. Writing only Eb G Bb er hr there would overfill the bar. Layout placement and rhythmic validity are independent checks.

Score Page versus Parts Page

PlacementCombined scoreExtracted player part
Score-level map or layout blockApplies globallyAlso applies to every extracted part
Cut in one player's musicDoes not alone force an ensemble breakApplies to that player
Same local cut on every present partAlso becomes an ensemble boundaryApplies individually
Selected view's layout configurationRefines that selected score viewRefines that selected part view

Global and player-local source cuts add together. A part map does not override or remove global cuts. For a full-score-only paper arrangement, use a score view's layout configuration instead of imposing global source cuts that every extracted player will inherit.

A “Score Page” configuration and a “Flute Page” configuration can select different page settings and additional breaks from the same source. A part view is not a parts-first source file; a score view is not a measures-first source file. See source arrangements and output views.

What normalization changes

arrange=parts and arrange=measures reorganize source music. maps=top|inline moves musical context such as meter; it does not toggle system/page maps versus inline cuts. Break formatting independently uses maps for multiple cuts of a kind or exact-count system entries. hoist-breaks can move matching per-part break maps to global scope; it is not a command to discard player-specific layout.

Physical source wrapping changes code readability. Engraved systems and pages follow musical layout directives and the selected output settings, not the width of your code editor. Normalization is an optional source rewrite; choosing another output view need not rewrite the music.

Rest groups

[|] begins a new engraved multirest group at a silent bar. multi-map {3, 7} records several such points compactly. This splits rest grouping without forcing a system or page break. Keep the map in the same scope as the intended rest grouping.

Paper and engraving settings

The score source carries musical layout intent. An optional name.layouts.json beside name.scorescript carries named paper and engraving configurations. It can refine page size, margins, staff size, spacing, and the selected part. A score still opens without the sidecar. Use the editor's layout controls to create a configuration rather than guessing JSON property names.

Layout affects the printed view. It does not change the pitches, durations, or identities in the music. Always inspect the exported pages: a source system map alone does not prove good spacing or correct pagination.