<line-repeat>
The <line-repeat> element repeats a consecutive range of lines within a section, without repeating the section as a whole.
Parent
Section titled “Parent”Attributes
Section titled “Attributes”| Attribute | Required | Type | Description |
|---|---|---|---|
first |
Yes | integer | 1-based first line number this repeat covers. |
last |
Yes | integer | 1-based last line number this repeat covers, inclusive. |
times |
No | integer | How many times the range is played in total, 2 or more. Default: 2. |
Semantics
Section titled “Semantics”Each time playback reaches line first, lines first through last play times times before continuing past last. Setting first and last to the same number repeats a single line.
times counts total plays rather than extra ones, and defaults to 2. A bare <line-repeat first="2" last="3"/> therefore plays those lines twice, which is what the unadorned ซ้ำ bracket on a printed score means.
A line repeat is independent of any <repeat> enclosing the section, and nests inside it. It re-triggers in full on every pass of the section, including the second and later ones.
A section may carry several <line-repeat> children covering different ranges. When one range contains another, the inner range runs to completion each time the outer range reaches it.
Example
Section titled “Example”<section id="s1" name="ท่อน 1"> <line-repeat first="2" last="3"/></section>Lines 2 and 3 play twice before the section continues to line 4, times being 2 by default. If a <repeat> in <structure> plays this section twice, that happens on both passes.
Rendering
Section titled “Rendering”A line repeat prints as a bracket in the margin right of the grid, spanning the repeated rows and labelled ซ้ำ. See Repeat brackets.
Conformance
Section titled “Conformance”firstandlastare both required, andfirstmust be less than or equal tolast.timesmust be an integer of2or greater, and defaults to2when absent. A range played once is not repeated, so a section that plays its lines straight through carries no<line-repeat>.lastmust not exceed the number of<line>elements in the section’s<section-ref>content. Where no<part-data>references the section at all, there is no line count to check against and the rule does not apply. Such a section has no music, contributes no rows to the page, and is not played.- A
<line-repeat>has no bearing on how<bow>,<parenthesis>, and<link>spans are matched. Those read the lines once in document order regardless of how often playback runs through them. - Two
<line-repeat>ranges in the same<section>must be either properly nested or wholly disjoint. Partially overlapping ranges are invalid, and so are two elements covering the identical range: combine those into one element with a highertimes. <ending>’spassvalues count passes of the section, not passes of a line repeat. An ending that replaces a line inside a repeated range applies to every play of that range within the pass it names.