ScoreScript Language wiki

Repeats, endings, and navigation

Barlines

| is a plain barline, || a double barline, and ||| a final barline. Keep the pipes touching. Spaced | | includes an empty bar between two barlines.

ScoreScript sourceDownload source
4C5 D E F || 1G |||
Generated notationNotation for the preceding Repeats, endings, and navigation example
Canonical spelling
4C5 D E F || 1G |||

Repeated sections

|: opens a repeat; :| closes it. The repeat sign already includes its double-bar geometry. Do not add another double bar beside it. The checker reports redundant pipes and the formatter removes them. :|: closes one repeat where the next begins.

ScoreScript sourceDownload source
|: 4C5 D E F | 1G :|
Generated notationNotation for the preceding Repeats, endings, and navigation example
Canonical spelling
|: 4C5 D E F | 1G :|

Repeat or borrow a measure

A measure containing only && repeats the preceding bar and prints a simile sign. &&! repeats it with the notes written out. &&4 repeats four bars. These forms must occupy a bar on their own and need earlier music to borrow.

ScoreScript sourceDownload source
4C5 D E F | && | &&! | &&2
Generated notationNotation for the preceding Repeats, endings, and navigation example
Example notes (1)
  • measure 2 repeats m2 written out; the painter draws its borrowed notes
Canonical spelling
4C5 D E F | && | &&! | &&2

% borrows the preceding bar as written-out notes. %m1 borrows the addressed earlier measure. This older form uses colon-addressed measure lines; %m1 is not accepted inside a modern nested m2 { ... } body. For new range-based source, use named range assignments. The borrowed rhythm must fit the destination meter.

ScoreScript sourceDownload source
m1: 4C5 D E F
m2: %m1
Generated notationNotation for the preceding Repeats, endings, and navigation example
Example notes (1)
  • measure 1 repeats m1 written out; the painter draws its borrowed notes
Canonical spelling
m1: 4C5 D E F
m2: %m1

First and second endings

[1..] opens a first ending and [2..] the second. [1,2..] names several passes. The closing repeat closes the first ending. A final ending can close at an explicit double or final barline; without one it follows the length of the ending it parallels.

ScoreScript sourceDownload source
4C5 D E F [1..] | 1G :| [2..] | 1C, |||
Generated notationNotation for the preceding Repeats, endings, and navigation example
Canonical spelling
4C5 D E F | [1..] 1G :| [2..] C, |||

Use bracketed musical instructions: [segno], [coda], [to coda], [fine], [D.C.], [D.C. al Fine], or [D.S. al Coda]. Navigation is case-insensitive and periods are optional: [DC], [dc], and [D.C.] all mean da capo; [DS], [ds], and [D.S.] mean dal segno. A deliberately named boxed label is [[DC]], not a jump; prefer actual measure-number rehearsal maps such as RH {5, 9, 13} for ordinary landmarks.

ScoreScript sourceDownload source
[segno] 4C5 D E F | 1G [fine]
Generated notationNotation for the preceding Repeats, endings, and navigation example
Example notes (1)
  • navigation word "fine" is not drawn (measure 1)
Canonical spelling
[segno] 4C5 D E F | 1G [fine]

Printed navigation and a playback itinerary are separate acceptance checks. Inspect and listen to the finished work; do not assume that a renderer showing an instruction proves every player follows its return path.