Notes and Durations¶
This document defines the syntax and semantics of musical notes in neumaRk: pitches, accidentals, durations, prolongations, and implicit deduction mechanisms.
The goal is to provide a deterministic specification that is nonetheless compatible with rapid writing in informal mode.
1. Note event¶
A note event is the atomic musical unit in the N) line of neumaRk.
Each note event represents a single musical occurrence in time and contributes to building the rhythmic and melodic sequence of the piece.
A note event may specify, in explicit or implicit form:
- a pitch;
- a duration;
- duration modifiers;
- octave modifiers;
- annotations;
- ties.
Some of these elements may be omitted, provided they can be deduced deterministically from the persistent musical context, according to the rules defined in this document.
Continuity of deduction¶
The deduction of pitches and durations in neumaRk is based on the last explicit value encountered across the entire document, and is not limited to a single note line or a single datapack.
At the start of a new musical datapack, the reference for deducing pitches and durations is the last note event of the previous datapack, if present.
In the absence of any prior reference (for example at the start of the piece), deduction uses the default values defined by the specification, or fails in cases where deterministic deduction is not possible.
1.1 Syntactic structure of the note event¶
A note event consists of an ordered sequence of adjacent elements, with no intervening spaces.
The order of the elements is fixed and must be the following:
- Unpitched marker (
=), optional, always first (§11.5) - Tie to the preceding note (
^), optional - Pitch, optional because deducible
- Forced accidental (
!), optional
(allowed only if the pitch is explicitly indicated) - Octave modifiers, optional
(relative octaves via'or,, or absolute octave) - Duration, optional
- explicit duration (power-of-2 number, with optional dots or multipliers);
- tuplet indicators;
- or
?for unknown duration - Annotations, optional, between double quotes
- Tie to the following note (
^), optional
All elements composing a note event must be adjacent. The presence of a space separates distinct note events.
Groups in parentheses
(…). Beyond explicit duration as a list (r(…), suffix) and clef change ((@…), prefix), a note event may carry additional(…)groups that specify its notehead or an ornamental glissando. Their meaning is determined by content and position: see the single rule in §11. At most per note: one clef (prefix), one glissando-in (prefix), one notehead (suffix), one glissando-out (suffix).
A note event may omit one or more elements according to the deduction rules defined in this document, but the relative order of the elements may never be altered.
Note events consisting of a single symbol¶
A note event consisting exclusively of a single symbol is allowed, without explicit indication of pitch or duration, provided a valid prior musical context exists.
The following symbols may by themselves constitute a valid note event:
- Octave modifiers (
'or,) - Tie (
^)
In such cases, the note event:
- inherits the pitch from the preceding note event;
- inherits the duration from the preceding note event;
- applies exclusively the semantics of the indicated symbol.
In particular:
- an event consisting of
'or,modifies the octave of the inherited pitch; - an event consisting of
^prolongs the preceding note by the same value.
A note event consisting of a single symbol is valid only if
pitch and duration can be deduced deterministically from the context.
In the absence of such context (for example at the start of the piece),
the event is invalid (E018). If only a rest (or a spacer, §14) comes
before, ' and , have no note to move: they repeat the rest with W012
(r4 ' c = two quarter rests, then c).
2. Pitch¶
2.1 Basic syntax¶
A pitch is expressed as:
<note>[accidental][octave]
Where:
note∈{a b c d e f g}accidental∈{#, b}(optional, also double)octave change(optional, see the next paragraph)
Examples:
c d# fb g##
2.2 Relative octaves¶
The octave is computed based on the pitch of the preceding note, considering the smallest interval from it.
Examples:
f4 bb f c
The character ' immediately after the note's pitch shifts its octave upward.
The character , immediately after the note's pitch shifts its octave downward.
Examples:
f4 bb, f' c'
Multiple consecutive signs are permitted for octave change.
Examples:
a,4 g''' a,,,
At the start of the piece (or at the start of a staff, in a multi-staff
datapack) the orientation pitch is the note marked by the
starting clef: clefs in G use a g reference, clefs
in F an f reference, clefs in C a c reference.
In detail, for the clefs provided by neumaRk:
| Clef | Notation | Reference |
|---|---|---|
| treble | (@G) |
g4 |
| treble 8va alta | (@G8va) |
g5 |
| treble 8va bassa | (@G8vb) |
g3 |
| soprano | (@C1) |
c4 |
| mezzo-soprano | (@C2) |
c4 |
| alto | (@C3) |
c4 |
| tenor | (@C4) |
c4 |
| baritone (C variant) | (@C5) |
c4 |
| baritone (F variant) | (@F3) |
f3 |
| bass | (@F) or (@F4) |
f3 |
| bass 8va bassa | (@F8) or (@F8vb) |
f2 |
Only the clef declared at the start (of the piece or of the staff) determines the orientation reference. Any subsequent clef change (see §9) modifies the graphical clef and the visual rendering of the notes, but does not alter the reference used for computing relative octaves.
"At the start" means at the first explicit pitch: if only rests precede it, the clef in effect there applies. The clef belongs to the staff, not to a single measure: it stays in effect until the next change, across measures and datapacks, and applies to both voices of the staff (
N)andN2), whether it was declared in the barline decorator (|(@F)) or as a token ((@F)).
2.3 Absolute octaves¶
It is nonetheless possible to assert the absolute octave of a note by adding
the character @ followed by the octave number (4 for middle C)
and the character _. The numbering is scientific: C-1 is
MIDI 0, C9 is MIDI 120; the practical useful range is roughly -1..9.
Examples:
c@4_8. g@3_2
The duration is mandatory when using
@<n>_: the_acts as a separator between the octave number and the duration value, and is meaningless without a value following it. A spelling such asc@4_(without duration) produces error E008.
'/, remain allowed as a "nudge" on the absolute octave, written before
@ (in the order of §1.1: pitch, accidental, octave): c'@4_4 is equivalent to
C5 as a quarter note, c,@4_8 to C3 as an eighth note. They are discouraged
because redundant: use directly c@5_4 / c@3_8.
After a note with an absolute octave, the inference for subsequent events
restarts from that note as the standard last_pitch (smallest interval
via DIATONIC_MATRIX, as in §2.2).
Absolute octave in chord-stack <…>
Inside a chord-stack, the absolute octave is allowed only on the first pitch, in the form:
<a@4_ c>4
Mandatory constraints:
- the
_that closes@<n>_on the first pitch is mandatory (it is the separator required by the notation); - the duration of the chord after
>is mandatory (e.g.>4). The duration lives outside the braces and refers to the whole chord; omitting it falls into the same error E008 as the monophonic case, because internally the token is reformulated asa@4_4(first pitch + duration) and that_remains without a numeric value following it.
The subsequent pitches of the chord-stack (the "extras") accept
only relative notation: their octave is inferred by smallest
interval starting from the primary pitch (see §2.2). A spelling
such as <a@4_ c@5_>4 is not supported.
2.4 Implicit pitch¶
If a note does not specify a pitch, it inherits the last
pitch encountered during parsing; if no pitch has yet been
seen, the initial orientation reference defined
in §2.2 is used (g4 for treble clef, f3 for bass clef,
c4 for C clefs, etc.).
Example:
f4 8 8 g 4 8
2.5 Forced accidentals¶
The character ! immediately after the pitch forces the display of the accidental, even if it would be implicitly deducible from the key. When the pitch carries no accidental, ! forces a courtesy natural.
Example:
f#!8 → the sharp is shown by force
c! → a courtesy natural is shown by force
f#!8 indicates that the accidental # must be displayed graphically; c! forces a natural sign even where no accidental would otherwise appear.
2.5.1 Propagation of accidentals within the measure¶
An accidental, once shown, propagates according to the standard convention
until the end of the measure. The rule is modeled by a matrix
[letter][octave] that stores the active inflection for each pair
letter+octave; the matrix is initialized from the key at the start of every
measure (and every staff).
- A note shows its own accidental symbol only if its inflection
differs from the current value in the matrix for that letter+octave (or
if forced with
!, §2.5); otherwise no symbol. When the symbol is shown, the matrix is updated. - Propagation is per-octave: an accidental on
c(octave 4) does not affectcof another octave (c5). Each letter+octave pair is independent. - Chord-stack (§2.6): each pitch of the stack is evaluated individually against the matrix.
- Voice 2 (
N2): has a propagation matrix independent of voice 1. - Grace notes (preceding the main): are evaluated against the matrix but do not
update it; if a grace deviates from the matrix, it breaks propagation for
that letter+octave → subsequent mains in the same measure show an
explicit accidental even if they coincide with the matrix (so the reader is not
misled by the inflection introduced by the grace). See
neumaRk_grace_notes.md §8.
2.6 Stacked chords (chord-stack) <…>¶
Multiple simultaneous pitches are written between angle brackets as a single
event: <p1 p2 …> followed by a duration.
N) <c e g>4 . // C major held for two quarter notes
N) <f c'> f // dyad + f on top
Internal syntax. The pitches inside <…> are separated by spaces; each uses
the note syntax (letter + accidental + '/, for octaves). The octaves
are inferred in a cascade: the first pitch from the preceding note outside the
stack, each subsequent one from the previous one inside the stack (smallest interval,
§2.2). The absolute octave is allowed only on the first pitch (§2.3).
Duration. Lives outside the angle brackets, after > (<c e g>4), and applies to
the entire chord. If omitted, the event inherits the duration from the context like a
normal note (<c e g> .).
A single event. The chord-stack counts as one event in the
count-based alignment with the A)/D)/L) lines.
Tie ^. Applies to the entire event; in rendering it ties the corresponding
keys by index (<c e>4^ <c e>4 → two ties).
Primary anchoring (normative rule). The event following the stack infers pitch and octave from the first pitch of the stack, not from the last. Internally the stack maintains the cascade; toward the outside only the primary counts.
N) <c e g>^ <c e g> // two identical chords (without the rule the 2nd would rise an octave)
N) <f c'> f // the 2nd f stays at the octave of the first f of the triad
N) <f bb, d> f // Bb triad with f on top; following f = first of the stack
Errors and limits.
- unclosed
<…or<>→ E016 (malformed chord-stack);< >with no pitch → E017. - Stack attached to the following note without a space (
<c e g>e4) → E001; remedy: add the space. r(rest) ands(spacer, §14) are not valid inside a stack: E004 (E004.stack_rest), the element is discarded and the stack keeps its other pitches (<c r e>4→<c e>4). The same for an element that is not a pitch (E004.stack_pitch_invalid).
The
>that closes a stack belongs to the token: it is never a barline nor an anacrusis (§7), even when followed by a pitch (<c e g> e4). Likewise the|internal to a polychord[top|bottom]is the separator of the polychord, not a barline (neumaRk_chords.md §7.2).
3. Duration¶
3.1 Explicit duration¶
The duration may be indicated immediately after the pitch:
c4 d8 e16
The allowed values are the standard ones of musical notation (units with denominator based on powers of 2): 1 => whole note 2 => half note 4 => quarter note 8 => eighth note 16 => sixteenth note 32 => thirty-second note
3.2 Tuplets¶
A duration may be followed by the letter t indicating a tuplet value.
If there are no other completing characters, it will be understood as a tuplet with ratio 3:2 (triplet).
If the letter t is followed by n:n the tuplet will be based on that ratio (e.g. 5:3, 7:8).
The second part of the ratio may be omitted in the most frequent cases:
t4 is equivalent to t4:3
t5 is equivalent to t5:4
t7 is equivalent to t7:4
3.2.1 Inheritance of the ratio within the group¶
Only the first note of the group must carry the tuplet marker. A note
without an explicit duration that follows it inherits both the duration
and the ratio of the current group (t_num:t_den): inheriting the ratio is a
special case of the general inheritance of duration (§3.3), and follows the same
rules.
N) c8t d e | // d, e inherit the eighth and the 3:2 triplet opened by c8t
Group closure (duration-based). Inheritance continues note after note until a note with an explicit duration appears: that note closes the group and is a normal note outside the tuplet. The group does not close automatically when a cycle of the ratio completes: if inheritance continues past the cycle, the extra notes open a new cycle of the same ratio (possibly incomplete at the end of the measure, §3.2.2). In other words, it is the explicit duration that marks the exit from the group, not the note count — consistent with the general inheritance of duration (§3.3).
N) c8t5 d e f g // 5 eighths = one complete 5:4 cycle (g inherits eighth + ratio)
N) c8t5 d e f g a // 6 eighths in the tuplet: a opens a 2nd, incomplete cycle →
// autofill with rests + W002 at the end of the measure (§3.2.2)
N) c8t5 d e f g a4 // 5 eighths in the tuplet + a as a normal quarter OUTSIDE the
// tuplet: the explicit duration 4 closes the group (no warning)
Inheritance follows the prolongation and repetition forms: in
a8t5 !!!! !, the six events (the note plus five!repetitions, §5) are all eighths inherited into the tuplet → the sixth opens a 2nd incomplete cycle and, at the end of the measure, autofill kicks in with rests + W002 (§3.2.2).
Closure on an incomplete cycle (W011). If the explicit duration arrives while
the group has not completed its cycle, the closing note would start off the
measure's binary grid, and everything after it with it. The group is then
completed with rests of its own unit (as in §3.2.2, but before the closing
note) and W011 is emitted. If the measure then exceeds the time signature,
E005 follows (§3.3.1). A mixed-duration group that fills a whole beat
(bb4t a8t) is complete and receives no rests.
N) | c8t d e4 f g | // 2 triplet eighths out of 3 → c d r8t e4 … (W011)
N) | a8t b4. b8 b8 | // a lone triplet eighth → a8t r8t r8t b4. … (W011)
N) | r2 r8t bb db | a b4. | // a inherits the eighth AND the triplet across the barline
// (§3.3): same case, W011 on b4.
A group with a different ratio declared while the previous one is still
open closes it like an explicit duration without t: the open group is
completed with rests of its unit and receives W011.
N) |(12/8) c16t5 c4t7 c8t3 | // c4t7 closes the quintuplet, c8t3 the septuplet (W011 ×2);
// the triplet stays open at the end of the measure (W002)
3.2.2 Incomplete tuplet at the end of the measure¶
If at the end of the measure a tuplet remains open (the sum of its units
does not reach a complete cycle of the ratio), autofill completes it with
rests of the same tuplet unit (the same base_dur as the last note of the
group), until the group closes or the measure is full.
- If closure succeeds, no diagnostic (this is the typical case of the round-trip of a complete triplet whose final rest had been omitted).
- If autofill cannot close the group, W002 is emitted («Tuplet not closed before measure end; auto-filled with tuplet-unit rests»).
If the group's unit does not fit in the space left, the measure is completed with rests of the same ratio and of a smaller value; the group stays incomplete (W002). A group left with a single note still gets its bracket.
N) |(3/4) c4. c8t d e f | // f opens a 2nd cycle: the measure closes with f8t r16t (W002)
Note (informative). If the space cannot be expressed in the group's ratio even so, the same numerator over another denominator is used (5:4 → 5:2), or the standard ratio of the numerator (§3.2: a 5:3 quintuplet is completed with 5:4 quintuplet rests).
3.3 Implicit duration¶
If a note does not specify a duration, the following rules apply, in order of priority:
- if it is the only note of the measure, it occupies the entire duration of the measure;
- the duration of the last written event, note or rest, is used, after the
reconciliation of its measure (§3.3.1). The rests added by autofill to
complete a measure are not written events and do not count: in
c4 d | e f |theeinherits the quarter of thed, not the rest that completes the first measure; ina4 r8 | d e f gthe notes inherit the eighth of the written rest; - if it is at the start of the piece and no prior reference exists,
the duration is considered unknown (
?). In the opening upbeat (§7), where there is no measure to complete, an unknown duration is a quarter note and the parser emits W005. Within a measure, if the unknown durations (these, or the?of §3.4) cannot share the space in writable values, each takes the longest binary value that fits for all of them, at most a quarter note, with W005 (W005.uneven_split); the measure is then completed with rests (§3.3.1) or, if it overflows, gives E005. An irregular ratio is allowed when the unknown durations make complete cycles or continue a group of the same ratio: inN) |(5/8) c d e |the three notes are eighths (W005) and a rest closes the measure, inN) | c? d? e? |they are a half-note triplet.
The rule of the single note occupying the entire measure has higher priority than all other forms of deduction, including those based on the persistent musical context.
3.3.1 Reconciliation with the measure duration (normative algorithm)¶
Once a duration (explicit or inherited) has been assigned to each event, the sum of the measure may not coincide with the time-signature duration. Reconciliation follows a deterministic algorithm. Each event is first classified:
- explicit — duration written in the event. In an anacrusis (§7) with more than one note, all events are treated as explicit (the anacrusis does not fill the measure, so it is not redistributed);
- unknown — duration
?(§3.4); - implicit — duration inherited from the context. Only the trailing implicits (the sequence of implicits after the last explicit) participate in redistribution.
Invariant: explicit durations are never modified by reconciliation. Only the trailing implicits, the
?s, are touched, or a final rest is added.Outside reconciliation. Some events do not count toward the sum: editorial parentheses
( … )(§11.4, which create no events) and the notes of the reprise pickup group>( … )(§7.2), which are excluded from the sum and stay trailing in the measure (a counted note after the group → E134).
Case A — no ? (all durations known). Let S be the sum of the measure and
M the time-signature duration:
S ≈ M(within tolerance) → the measure is valid, no action.S > M(excess):- if trailing implicits exist and the recomputed duration
(M − S + sum_of_trailing_implicits) / number_of_trailing_implicitsfalls on a representable rhythmic value (power of 2 with 0 to 3 dots) → silent redistribution over those implicits. Typical idiom:c2 d ein 4/4 →d/einherit the half note (total 1½ whole notes), are compressed to quarter notes; the recomputed duration may also be an irregular value (triplet, quintuplet, septuplet), but only if the trailing implicits form complete cycles of the ratio:a2 g d gin 4/4 →g d gbecome a quarter-note triplet (a real idiom: the Speak Low rhythm written withoutt). Three implicits that would become sixteenths in 9:8 (b2 c8t b b bin 3/4) do not form a cycle: that is a real excess; - otherwise it is a real excess → error E005 (duration beyond the time signature),
measure marked invalid, truncation of the final notes until the measure
fits, plus a possible final filling rest. Covers both the purely explicit excess
(
4 4 4 4 4in 4/4) and the non-representable implicit excess. S < M(deficit):- if a tuplet has remained open, it is first completed (§3.2.2);
- then the residual duration is filled with a final rest. This is standard NRK autofill: no diagnostic.
Case B — mixed (? together with known durations). The residual duration M − S is
distributed equally among only the ? events (see §3.4); no final rest
is added (the ?s absorb the residual).
Reference rendering (informative). A voice that is silent for the whole bar (a written rest covering it, a lone
r, or the implicit rest) is drawn as a whole rest centred in the bar, in every metre, including those of two whole notes or more (4/2, 8/4); its duration remains that of the bar. This does not apply to pickups, open bars, or several written rests. It holds per voice: on a two-voice stave the silent voice gets its centred rest even when the other voice has notes (neumaRk_voices.md§5.2). A single note that fills the bar is centred too. Consecutive written rests that each fill a whole block of the metre's pulse stay as written (r2 r2in 4/4,r1 r1in 4/2); the others may merge into a single value (r4 r4 r4in 3/4 is drawn as a dotted half rest).
3.4 Unknown duration (?)¶
By indicating ? as the duration, the value is considered indeterminate.
The value missing to complete the measure is distributed equally among all notes with duration ?.
Example:
c? d? e?
in a 4/4 measure will identify a triplet of half notes.
4. Duration prolongations¶
N.B.¶
The meaning of the dot (.) is specific to the context of note lines
and does not coincide with the one used in chord lines.
The dot character takes on different meanings depending on its position adjacent to or spaced from the note event.
4.1 Adjacent dot¶
A dot immediately adjacent to the value prolongs the duration by half of the preceding value, as in standard notation:
g4.
4.2 Spaced dot¶
A dot separated by a space prolongs the duration by the same value, and may be repeated:
g8 . .
g8 ..
will identify a duration of three eighth notes.
Only the space after the note matters, not the one between the dots: both forms are equivalent.
4.3 Multipliers¶
An explicit multiplier may be indicated as:
g16*5
g16x5
will identify a duration equal to 5/16. Both forms are equivalent.
5. Repetition (!)¶
The exclamation mark (spaced from the note event) repeats the same note and the same duration:
g8 !!!
Is equivalent to:
g8 g8 g8 g8
It is possible to combine . and !.
! repeats the last note, not the last event: after a rest or a spacer it
repeats the note before them (g2 | s4 !!! = one spacer and three g4). If no
note comes before, at the start of the piece, ! repeats the rest or spacer
itself with W012 (r4 !!! = four quarter rests).
! also repeats the notehead (§11.2) and the unpitched marker = (§11.5) of
that note: =c8(x) !!! = four unpitched cross heads. It does not repeat a
glissando (§11.3).
6. Tie (^)¶
The symbol ^ indicates a tie.
- if adjacent to a note event, immediately after it, it ties with the following note
- if adjacent to a note event, preceding it, it ties with the preceding note
- if isolated, it is equivalent to a dot (
.) - if it is the only sign in the measure, it ties with a note that fills the measure
- followed by a duration (
^2), it is a note tied to the preceding one, at the same pitch and with that duration:c2^ ^2= two tied half notes
A leading ^ stays on a note even when the event written before it is a rest
(r2 ^c2) or when the note opens the second ending of an alternative ending
(|[2.] ^d): it marks the note as tied on entry, and the rewritten document
keeps it that way. A rest carries no ties.
Accidentals across the tie. A note tied to the preceding one follows two regimes with respect to propagation (§2.5.1):
- natural continuation — same spelling (e.g.
eb ^eb): no accidental symbol (the graphical tie expresses the continuation), but the note still seeds the matrix, so that subsequent notes with the same letter+octave but a different inflection show the explicit accidental; - enharmonic respelling — different letter/inflection across the tie
(e.g.
eb ^d#): the second note is treated as a new note and shows the accidental, because it is the first time that letter appears in the measure.
6.bis Manual beaming: / breaks, - joins¶
Beam grouping is normally automatic (inferred from the meter). Two per-note
marks let you force it when the musical intent is not derivable from the notes
(e.g. 3+3+2, hemiola, repeated notes, melismas):
/= break the beam at the adjacent gap;-= join the beam at the adjacent gap (across an automatic boundary).
They are symmetric like the tie ^ (§6): adjacent to a note event, a trailing
mark acts on the gap to the right, a leading mark on the gap to the left. a8/
(trailing) and /a8 (leading) mark the same gap from either side. They may combine
with the tie in any order (c8-^ ≡ c8^-).
N) c8 c8 c8/ c8- c8 c8/ c8 c8 // 4/4: forces 3+3+2 (instead of the automatic 4+4)
N) |(6/8) c8 c8/ c8- c8/ c8 c8 // 6/8: hemiola 2+2+2 (instead of 3+3)
Rules:
- Precedence. The manual mark wins over everything (automatic grouping, tuplet, tie).
- Conflict on the same gap. If one side asks to join and the other to break, break wins.
joinonly between beamable notes.-joins two events only if both are real notes of duration ≤ eighth; on a rest or a note ≥ 1/4 it is a no-op.- Does not cross the barline (beaming is per-measure).
The default grouping behaviour (by metric block or by beat) and beaming over rests are score rendering preferences, not syntax: they belong to the renderer.
7. Anacrusis¶
The anacrusis (upbeat measure) is introduced by the sign > as a marker of
the initial barline of the first measure:
N) > c8 d | e4 e e e | // upbeat of two eighth notes before measure 1
Rules:
- Where it applies. The
>that introduces the upbeat (the leading-barline marker) lives only in a note or chord line (C/N): that is where the music originates. In the other lines the same character has its own meaning — inA)it is an accent, inD)a decrescendo, inM)/L)text (seeneumaRk_datapack.md §3.bisfor the classification filter). The>is recognized as an anacrusis only if followed by content — pitch /</ barline, a grace block[…](§8.2), or a glued BEGIN decorator ($/@,neumaRk_datapack.md §7.1) or a glued repeat-open/bar-style marker (:/.) — so a final accent>is not confused. - Upbeat column in column-aligned lines (leading
>, NOT an accent). The secondary lines are column-aligned to the C/N. When the datapack has an anacrusis, a leading>(first token, only whitespace before it) of anA)/D)/L)/M)line is not an accent/decrescendo/text but the upbeat marker that reserves the anacrusis column, identical to the C/N>(same leading barline, same color in the editor). It is the position, not a different character, that distinguishes it — exactly as the rule above distinguishes the upbeat from the accent. The discriminant is per-row:M)andL)—>is not a significant character there, so a leading>is always the upbeat (unconditional).A)andD)—>is significant (accent / decrescendo), so a leading>is the upbeat only if the datapack's C/N actually carries the anacrusis. Without an anacrusis it stays an accent / decrescendo on the first beat. With the anacrusis, an accent or hairpin starting from the first upbeat note is written after the placeholder (D) > > | p |: the first>reserves the column, the second opens the decrescendo).- Rows without placeholder. If an
A)/D)/$)row does not write the placeholder and starts with a barline (D) | p . . . |underN) > g8 | c4 d e f |), its first token goes on the first upbeat note, as inL): thepabove falls on theg8. To start the row on the full measure, write the placeholder (D) > | p . . . |).
A) > | > | // leading `>` = UPBEAT (the N) has the anacrusis); the 2nd `>` = accent on `a1`
N) > a4 | a1 |
A) > | > | // leading `>` = ACCENT on `a4` (the N) has NO anacrusis)
N) a4 | a1 |
> g a b | c1 = three quarter notes); writing the duration of the first note
(> g8 a b) avoids the warning. If the durations inherited from a previous
datapack take the upbeat beyond the measure (N) c2 d | followed by
N) > g a b | c1: three half notes), it is a real excess: E005 and the
excess notes are discarded (§3.3.1).
- Rest or spacer at the head of the upbeat. The upbeat may start with a rest
or a spacer (> r8 g a, > s8 g a): they are upbeat content like the notes,
and the completion rest is added before them.
- Only at the start of a row. The anacrusis > opens the row (or the
datapack); a > followed by content in the middle of a row
(N) c4 | > r g a | c1 |) is not a valid upbeat: the parser emits W184, the
preceding measure stays empty and the following notes form an upbeat. For a
section upbeat, start a new datapack (§7.1).
- Completion rest at the start. If the anacrusis measure is shorter than the
full measure, the completion rest is added at the head (not at the tail),
so the events align to the strong beat that follows.
- Clef / measure attributes with the anacrusis. The anacrusis measure may
carry a clef change (or meter/key) like any other measure. Three forms,
all valid and with the same result:
| Form | Syntax | Path |
|---|---|---|
| A | > (@F) g8 |
standalone spaced directive after the > |
| B | (@F) >g8 |
standalone leading directive, before the > (canonical) |
| C | >(@F) g8 · >(3/4,Ab,@F) g8 |
glued decorator on the anacrusis barline > (see neumaRk_datapack.md §7.1) |
Graphical constraint: the combined decorator (meter/key/clef together) is
glued to the barline (>(…)), whereas the standalone directive is
spaced (> (@F) or (@F) >). Form B is the one emitted by the serializer:
the clef setting visually precedes the music.
- Other glued decorators on the anacrusis barline. Like a full | barline,
> can also carry the same measure decorators glued to it:
| Decorator | Syntax | Meaning |
|---|---|---|
$ / @ |
>$ g4 · >@ g4 |
segno / coda (BEGIN decorator, neumaRk_datapack.md §7.1) |
: / . |
>: c4 · >. c4 |
repeat-open / dashed bar-style on the anacrusis barline itself |
[…] |
>[d8]e4 · > [d8]e4 |
grace block (§8.2) as the first event of the upbeat, glued or spaced |
Real-world cases: a forward-repeat that in MusicXML lands on the left
barline of the first measure (which is also the anacrusis) produces
>: …; a segno placed at the very start of the piece produces >$ ….
7.1 Section anacrusis (mid-song)¶
The anacrusis is not confined to the start of the song: an internal section (typically a Refrain after a Verse) may open on an upbeat. In that case the last measure of the previous section shows its values up to the upbeat notes excluded, and the new section starts with the anacrusis.
The case is expressed with two distinct markers, one per side:
| Marker | Position | Row it sits on | Meaning |
|---|---|---|---|
>>> |
trailing the measure | no content after | open measure: the measure is not completed with a tail rest, because an upbeat completes it later |
> |
leading the measure | followed by content | incoming upbeat: as §7, but allowed as the initial barline of the first datapack of a section, not only the first datapack of the song |
[Verse]
a b | c d | a2 r8 >>> // last measure of the verse, left OPEN
> || [Refrain] // Markers: `>` keeps the upbeat column empty
> g a b || c1 // Notes: `>` opens the upbeat g a b, then downbeat c1
The upbeat notes g a b inherit the eighth of the r8 rest written before
(§3.3).
Rules:
-
>leading vs>trailing. The same sign is disambiguated by position, exactly as §7 distinguishes the anacrusis from the accent:>followed by content (pitch /</|) is the incoming upbeat;>>>followed by nothing is the open (outgoing) measure. The trailing sigil is written>>>; the number of>carries no meaning, and a single>at the end of the row also means>>>(the rewritten document normalizes it to>>>). -
>>>explicit, mandatory. The open measure requires the>>>marker: without it, a short measure receives the normal tail completion rest (standard autofill). NRK does not infer the openness from the following datapack — every datapack stays self-describing, and the marker survives reordering / moving of sections. -
>>>is structural (propagates to the system). The open measure>>>is on a par with a measure sign / barline: it is a property of the system, not of an individual voice. It is therefore sufficient on one stave of the datapack to propagate to all the others, exactly like shared barlines (§4.1 ofneumaRk_datapack.md). It must not be replicated voice by voice. -
>incoming is per-row. The incoming upbeat>is instead per-row (as §6.4 ofneumaRk_voices.md): each voice carries its own. On rows without notes (Markers, Chords) the>reserves the upbeat column, leaving it empty, so the section label ([Refrain]) and the downbeat barline align to the first real measure and not above the anacrusis. The grammar already allows it because|counts as valid content after>(> || [Refrain]). The same column reservation applies to the secondary rowsA)/D)/L)aligned to the C/N (see §7, Upbeat column in column-aligned lines): their leading>is not an accent/decrescendo/text but the upbeat placeholder — unconditional forM)/L), conditioned on the C/N anacrusis forA)/D). -
Numbering. The section upbeat is not counted (as §7). The open measure preceding it is counted normally: it is a real measure of the previous section, only shorter.
-
No double rest. Unlike the initial anacrusis (§7), the section upbeat does not receive the head completion rest: it is the open measure preceding it that supplies the lead-in. The pair (open measure + upbeat) is temporally contiguous in the song's flow. Symmetrically, the open measure does not receive the tail completion rest.
-
No metric validation. (Open measure + upbeat) are taken as written, even if they do not sum to a full measure: no warning. It remains the author's responsibility.
-
Without an open measure. If the previous section ends on a full measure (no
>>>) but the new one opens with>, the>behaves as a standalone §7 anacrusis (partial upbeat with head completion rest).>>>is what links the two sides; in its absence there is no link. -
Section barlines. NRK does not impose the typographic convention of a "double barline before the upbeat": barlines (including
||) are placed where the author writes them. The form… || c1with the double barline on the downbeat is legitimate.
Composition with lyrics. The pickup group
<…>of theLYRICS)block (neumaRk_lyrics.md §8.4.1) is the textual counterpart of this upbeat: the pickup syllables attach to the notes of the section upbeat defined here.
7.2 Reprise pickup >( … )¶
Many standards with an anacrusis and a repeated ending print the last
measure filled with rests plus the pickup notes in round parentheses, to
show that when the repeat is taken those notes are played to lead back to the top.
Typical case: Now's the Time (an eighth-note pickup before the :|).
N) |: c1 | r2 r4 >( c@5_8 ) :|
Syntax. A group prefixed by >: >( opens the group, ) closes it. The
parentheses may be glued to the notes (>(c@5_8), the recommended form) or
detached by a space (>( c@5_8 )): the two forms are equivalent. It is the
>, which reuses the anacrusis sign (§7), that distinguishes this form from
editorial group parentheses §11.4, which open with a detached ( without
>. Inside the group the normal note grammar applies (pitch, duration, tie,
noteheads, chord-stack) and rests are allowed (>( r8 c ) — the pickup may
start on a rest).
Out of time. The group notes are real notes in every respect — pitch, duration, stem (standard direction), beams, ties, articulations A), lyrics L), dynamics D) — except that they are excluded from measure-duration reconciliation (§3.3.1): they do not consume metric time, they do not "eat" the rests that fill the bar. They are drawn in parentheses at the end of the measure, before the barline. The counted part of the measure completes normally via autofill (no warning).
Placement. The group must be the trailing content of the measure: a
counted note after the closing ) is error E134. Do not glue the group to
the barline token (keep the space before :|, as for the final barline). It also
works toward a jump or a segno/coda:
N) c1 | f2 e2 >( d@4_8 e@4_8 ) DCal@|
Suspended tie. A ^ on the last note of the group (>( … bb^ )) draws a
suspended tie that curves toward the barline, without attaching to a target
notehead (the pickup "leads back" into the repeat). Always allowed.
Musical content. Purely graphic: the group notes produce no events (like editorial parentheses §11.4).
Diagnostics.
| Code | Meaning |
|---|---|
E134 |
Counted note after the >( … ) group (the group must be trailing in the measure). |
W160 |
More than one >( … ) group in the same measure. |
A/L/D alignment. The count-based layers treat the group notes as ordinary events (A) counts rests too, L) only notes): the pickup's syllables/articulations go in the matching trailing positions of the row.
8. Annotations¶
After a note it is possible to add, adjacent to it, a textual
annotation. It follows the frame model shared by all textual
containers (neumaRk_text_markup.md §2.1): the text is always a "…"
string; the frame is an optional wrapper around the string that
selects only its graphical rendering.
| Form | Frame | Example |
|---|---|---|
"<text>" |
none | c4"dolce" |
["<text>"] |
box | c4["cantabile"] |
("<text>") |
round frame | c4("ten.") |
The quotes are always present; [ ] and ( ) are pure frame
wrappers. The " is the sentinel that makes both frames safe: ("
distinguishes it from the notehead/gliss/clef namespace (whose character
after ( is one of x d t s / ) u @); [" distinguishes it from the
grace block (whose content is never quoted).
c4"text" annotation without frame
c4["text"] annotation with box
c4("text") annotation with round frame
Shorthand: the box may also be written without quotes (c4[text]), as
in every container (neumaRk_text_markup.md §2.1); it is read identically
and the serializer normalizes it to the reference form ["text"].
Single slot: a note has one annotation slot, and it is always
text (framed or not). Any content between the quotes, including content
starting with $, is annotation text.
The annotation allows the text markup defined in
neumaRk_text_markup.md, including the line break ; (§3bis): the note
annotation renders on multiple lines. The default style is plain, medium size (role reduced;
### makes it small), in all forms; with a
frame, a single frame scales to wrap the whole stack of lines.
8.1 Fingering and strings: the $) row¶
Fingering, strings, plucking fingers and fixed positions are not written on
the note: they have their own row, the fingering row $), aligned by count
to the events of the N) below it, like the A) row. See
neumaRk_fingering.md.
$) | 1 3B 0E |
N) | c4 d e |
8.2 Disambiguation with grace notes¶
In a note-row the delimiter […] is shared with the grace block
(see neumaRk_grace_notes.md). The disambiguation is positional
relative to the adjacent pitch:
| Pattern | Interpretation |
|---|---|
[…]MAIN (no space after ]) |
grace block |
PITCH[…] with whitespace or EOT after ] |
annotation with box |
PITCH[…]MAIN (no space before or after) |
grace block (priority): PITCH and […]MAIN are two events |
PITCH […] MAIN (space between ] and the note) |
W003, block ignored |
orphan […] (no note after it) |
W004, block ignored |
Examples:
c4[text] d4 annotation with box on c4 (space after `]`)
c4 [d8/^]e4 grace block anchored to e4
c4[d8/^]e4 grace block anchored to e4 (grace priority)
c4 [text] d4 space between `]` and d4 → W003 (grace ignored)
c4 d e [text] no note after `]` → W004 (grace ignored)
To avoid ambiguity in edge cases, it is recommended to use the primary
form c4"text" for annotations: the delimiter "…" does not
collide with the grace block.
9. Clef change¶
The default clef is the treble clef. A clef change can be defined with the notations:
(@G)for the treble clef(@C1)for the soprano clef(@C2)for the mezzo-soprano clef(@C3)for the alto clef(@C4)for the tenor clef(@F3)or(@C5)for the baritone clef(@F)or(@F4)for the bass clef(@G8va)for the treble clef at the upper octave(@G8vb)for the treble clef at the lower octave(@F8)or(@F8vb)for the bass clef at the lower octave
The clef change is maintained in the piece until a new definition. Consistently with §2.2, only the initial clef (first measure of the stave or of the piece) sets the octave reference; later clef changes are graphical only and do not alter the computation of relative octaves.
The (@…) directive is a standalone token and may appear anywhere in an
N) line: as the first token (stave start or right after a barline) or
mid-measure, between two notes — in the latter case the change takes effect
from the following note. It may also be glued to the barline as a
begin-barline decorator (|(@F)), optionally combined with meter/key (see the
note below and neumaRk_datapack.md §7.1).
Combination and disambiguation. In a measure decorator
(…)(seeneumaRk_datapack.md §7.1) the clef is combinable with meter and key within the same decorator, in any order:(@F),(3/4,Ab,@F). Each component self-identifies from its first character —@= clef, digit/[= meter, uppercase A–G = key. The prefix@identifies the clef, so(@F)is not read as the key of F ((F)).
In a multi-staff datapack (see neumaRk_datapack.md §4), the clef
declared as the first token of an N) line applies to the corresponding
staff. In the absence of a directive, each staff inherits the last
clef defined in its own context.
10. Non-standard notations¶
Slash notation¶
On the staff, in place of the notes, slashes (oblique bars) are drawn in number equal to the beats of the measure. There are two ways to generate it:
1. Implicit (default). In a measure with active harmony, if the note line is empty (without even rests), the measure is rendered with slash notation. Active harmony means: an explicit chord, a %, or a chord persisting from a previous measure (empty chord cell, see neumaRk_chords.md §1.1). A measure marked NC (neumaRk_chords.md §1.2) is not active harmony: with an empty note line it gets a rest, not slashes.
2. Explicit, with the construct /. The symbol / in the N) line is a language event that generates slash notation. It can be used by itself to fill the entire measure, or mixed with notes: its duration is implicit (autofill) and occupies all the space not covered by the other notes of the measure.
Examples (in 4/4):
N) a b c d | / | a b c d
N) a4 /
N) / a8 b
Rules.
- At most one
/per measure (more than one produces error E006). - The slash does not accept a duration: its duration is always the residual one of the measure.
- When the slash region starts or ends in the middle of a beat (e.g.
| a8 / |), an internal rest is added to close the partial beat, and the drawn slashes cover the remaining whole beats (in| a8 / |in 4/4: 1 eighth note + 1 eighth rest + 3 quarter-note slashes). - A)/D) alignment: the slash region counts as ONE position (anchored to the first slash), regardless of how many beats it draws. That is, one
/is covered by a single token / a single-in theA)/D)rows (dashed line, articulation, dynamic), not one per beat. E.g.N) | bb4 / |+A) | "riff"- - |= label onbb4and one-over the whole slash. To mark the individual beats of an all-slash measure use explicit rhythm ({…}) or real notes instead. (L)syllables never touch slashes: they are rests and receive no text.) - If after alignment to the beats less than one beat remains for the slash, the
/is downgraded to a rest (error E007); if no space remains at all, the/is removed. - A line composed only of
/(plus barlines/dots/spaces) does not require theN)prefix: it is automatically recognized as a note line. E.g.| / | / | / | / |is already a valid note line.
Note-event extensions¶
Sections §11-§13 are normative. History:
neumaRk_changelog.md, What's new in 0.6. Impact on classification low:N)is the default sink of the cascade (neumaRk_datapack.md §3.bis), so a line with(x),(u-)…,{…},R4or=c4falls into Notes without touching the other predicates ({}R=are in no charset; uppercaseRis free, pitches are lowercase).
11. Noteheads and note glissando (the parentheses rule (…))¶
In N) the parentheses are overloaded. The meaning of (…) attached to a
note is determined by content (and prefix/suffix position):
| Parenthesis content | Meaning | Position |
|---|---|---|
@… (e.g. @G) |
clef change (§9) | prefix/inline |
digits / list (e.g. 4, 16,8,8) |
explicit rhythm (§3, also r(…)) |
suffix |
notehead-token x d t s /, or empty |
notehead / parenthesized note (§11.2) | suffix |
direction+dash u- d- u-- d-- |
note glissando (§11.3) | prefix = in, suffix = out |
( / ) space-detached (standalone tokens) |
editorial group parentheses (span, §11.4) | span delimiters |
>( … ), glued or detached |
reprise pickup (out-of-time upbeat, §7.2) | group delimiters at measure end |
Operational discriminator: first character + presence of the trailing dash. Key
case: (d) = diamond (notehead); (d-) = glissando down (the dash marks the
glissando). Without the dash the two collide.
Adjacency vs detachment. Every form in the table except the last is
adjacent to a note event (prefix or suffix, no spaces). Space-detached
parentheses (a4 ( b c d )) do not decorate a single note: they open/close an
editorial span over the series (§11.4). NRK's cardinal principle holds:
adjacency binds, space separates.
A note may combine distinct parenthesis groups (one per concept):
(u-)a2(x) = short glissando-in up + a2 + cross notehead; a2(x)(d-) = a2 cross
notehead + glissando-out down.
11.1 The three "slash" things not to confuse¶
- standalone
/: rhythmic slash-region (1 slash = 1 beat, beat-aligned), see §10. (/): slash notehead on a note, at the real pitch of the note (§11.2).{…}: rhythmic notation, slash centered without pitch (§12).
11.2 Noteheads¶
Suffix (…) on a note, closed set:
| Form | Notehead |
|---|---|
(x) |
cross |
(d) |
diamond |
(t) |
triangle (single orientation) |
(s) |
square |
(/) |
slash (rhythm notehead at the pitch height) |
() (empty) |
parenthesized note (editorial / ghost) |
N) a2(x) b2(/) | c2() d2(d)
- Chord-stack:
<c e g>(x)applies the notehead to all the pitches of the stack. - A single notehead per note.
- Inheritance: the forms that take their pitch from the previous note take its
notehead too — repetition
!(§5), a bare duration (8),'/,, a bare^(§6) — also across a rest, from the last note:c8(x) ! ! != four cross heads,c4(x) r4 != a cross after the rest. A notehead written on the token wins (c4(x) !(d)); an explicit pitch starts again from the normal head (c4(x) c4), also when a tie arrives on it. The glissandi (§11.3) are not inherited.
Positional overload: inside
()the lettertis a triangle; outside,tis the tuplet marker (8t, §3.2); inA)it is the turn. Disambiguate by position inside/outside parentheses (rule §11). Likewised(outside()it is not a notehead). Fors: inside()it is the square notehead; outside, as a standalone token-pitch, it is the spacer (§14).
11.3 Single-note glissando (scoop / fall / doit / plop)¶
Co-locatable with the noteheads (
a(x)(d-)).
Ornamental glissando into or out of a note (different from the glissando between
two notes, which lives in A) as gl — neumaRk_articulations.md §9).
- direction:
u(up) /d(down); length:-short,--long; - in/out from position: prefix = in, suffix = out;
- the dash marks the glissando (distinguishes it from the notehead, §11).
| Spelling | Meaning | Jazz name |
|---|---|---|
(u-)a |
gliss IN up, short | scoop |
(d-)a / (d--)a |
gliss IN down | plop / drop |
a(u-) |
gliss OUT up, short | doit / lift |
a(d-) / a(d--) |
gliss OUT down | fall (short / long) |
N) (u-)a2 a8 a(d--) | (d-)a a(u-)
11.4 Editorial group parentheses ( … ) (delimited span)¶
A pair of space-detached round parentheses encloses a series of notes in a
medium-sized editorial parenthesis. ( opens on the note at its position, )
closes on the note at its (LilyPond-style, like the A) slur). Detached ( and
) are new delimiters in N) (like { }, §12).
N) a4 ( b c d ) | e ( f g ) a
It is distinguished from the project's other parentheses by content and size:
| Construct | Size | Scope |
|---|---|---|
a() (empty, adjacent suffix) |
small, on the single notehead | parenthesized / ghost note (§11.2) |
( … ) detached in N) |
medium, over the notes' extent | series of notes (this §11.4) |
( … ) in C) |
large, over the whole harmonic column | series of chords (neumaRk_chords.md §5) |
- They do not count as events (design decision): the
(/)tokens carry no duration, occupy no metric position, and are excluded from measure reconciliation (§3.3.1) — they do not affect autofill nor the split of implicit durations. - Rendering: a medium round parenthesis — left stem at the start, right
stem at the end — around the horizontal extent of the covered notes
(coordinate-based: clipped edges use the stave-margin X, no width = 0). It is
N)information (per-stave/voice), notA). - Purely graphic: no effect on musical content (an editorial annotation, like the
A)analysis bracket §10.3, which uses{ }). - Cross-barline / cross-system: yes — a span may cross the barline and continue
on the next logical stave (same model as the
A)spans). - No overlap / nesting (v1): at most one open span at a time; a second
(with one open → warning (W010.paren_open_overlap); an orphan)→ warning (W010.paren_close_unmatched); a degenerate( )(open and close with no note in between) → warning (W010.paren_degenerate); a span left unclosed at end-of-line → implicit close + warning (W010.paren_unclosed_eol).
Syntax note. A
( … | … )inN)is a span crossing the barline: the inner|is a real barline. Parentheses adjacent to a note remain local decorators (clef / glissando / notehead / rhythm, §11); only the detached form opens the span — the discriminator is the space.
11.5 Unpitched notes =¶
The prefix = marks a note as unpitched: what it writes is a position on the
staff, not a pitch. The typical case is a percussion hit (cross notehead) on a
pitched staff:
N) > =c,8(x) =c'4(x) || b1 | d,8 c#8 b8 g#8 b4 ||
An unpitched note:
- is never transposed: not by the reader's transposition, not by a transposing instrument, not by an edit operation that transposes a range of measures;
- carries no accidental: the key signature does not apply to it, it draws no
accidental and it does not affect the propagation of accidentals in the measure
(§2.5.1). An accidental written on it is ignored, with W013
(
W013.accidental); - keeps its staff position when the reader's instrument forces a different clef (an instrument sounding an octave lower, drawn in bass clef): the position is the one it has in the clef written at that point;
- still acts as the reference for the relative octave of the next note (§2.2):
adding or removing
=never moves the notes that follow.
Syntax. = is the first character of the note event, before everything else
(tie ^, glissando-in, beaming marks, <): =^c4, =(u-)c4, =<c e>8(x). It is
independent of the notehead: =c4(x), =c4(t), or =c4 with a normal head.
| Form | Meaning |
|---|---|
=c4 |
unpitched note |
=<c e>8(x) |
unpitched chord-stack: = applies to all the pitches (§2.6) |
[=c16]d4 |
unpitched grace note (neumaRk_grace_notes.md) |
[c16]=d4 |
unpitched main note after a grace block |
>(=c8 =c8) |
reprise pickup on unpitched notes (§7.2) |
Inheritance. The forms that take their pitch from the previous note take its =
as well; an explicit pitch takes it only if written:
| Event | Unpitched? |
|---|---|
=c4 |
yes |
c4 after =c4 |
no: an explicit pitch without = is pitched |
! (§5), a bare duration (8), ' / , after =c4 |
yes |
! after =c8 r8 |
yes: like the pitch, = comes from the last note, across the rest |
arrival of a tie (=c4^ c4, =c4 ^) |
as the source note (§6) |
A tie between an unpitched note and a pitched one keeps the flag of the source
note, with W013 (W013.tie_mixed).
Restrictions.
=must be glued to a note:=alone, or followed by a space, is ignored with E022 (E022.unpitched_bare).- Not on a rest or a spacer:
=r4,=s4→ E022 (E022.unpitched_rest), the rest stays. - Not inside a chord-stack:
<=c e>→ E022 (E022.unpitched_inside_stack), the=is discarded; write=<c e>. - Not before a non-note token:
=(@F),=/,=X, a detached(or), a grace block=[…]→ E022 (E022.unpitched_misplaced), the=is discarded. - On rhythmic notation
{…}(§12), which has no pitch already,=is redundant: W013 (W013.rhythm_redundant).
12. Rhythmic notation {…}¶
A group {…} is rendered as rhythmic notation: slash noteheads centered on the
staff, without pitch. { and } are new delimiters in NRK.
N) a4 r | b4 {8 8 16 16 8 4}
- Content: only durations (no pitch); rests allowed (
{8 8 r8}→ rest glyphs) and spacers allowed ({8 8 s8}→ rhythmic position skipped, no notehead, §14). The pitch is always centered. - Default notehead = slash. Override with the notehead suffix of §11.2:
{8 8 16}(x)= cross noteheads. - Only the notes inside the braces are rendered as rhythm notation; the rest of the measure is normal.
- Tuplets allowed inside
{…}(e.g.{8t 8t 8t}); invalid tuplet marker → warning W007. - Context: the group is metric, not melodic (like the slash
/, §10). A rhythmic notehead has no pitch, so it does not touch the current pitch: a note with implicit pitch after the group inherits from the last real note, across the barline too (a,4 {4} 4— the second note isa,), and the centered position never emits an accidental nor consumes the measure's accidental propagation (in F major the natural belongs to the first writtenb, not to the rhythmic notehead). The duration does carry over: the group is explicit rhythm and its last notehead sets the current duration (a4 {8 8} c—cis an eighth).
13. Multi-measure rest (MMR) RN¶
History:
neumaRk_changelog.md, What's new in 0.6.
RN (e.g. R4) renders a multi-measure rest of N measures: a single cell
worth N measures, with the measure count advancing by N. Rendering: standard MMR glyph
(thick bar) with the number N above. R is uppercase (free in N), where
pitches are lowercase). Requires N ≥ 2 (R1 = single-measure rest,
redundant → normal rest).
13.1 When it is used (empty-span condition)¶
The barlines are shared by the system: a staff is not collapsed while another is
shown. Therefore an MMR is rendered only if the entire span is empty at the system
level — all voices/staves at rest and chords empty. It is useful
in exactly two cases: (a) a single staff/voice with an empty span; (b) multiple
staves/voices all RN aligned on the same span (including the piano grand staff at rest).
C) A | | B // empty chords on the central span
N) a | R4 | b // → 4-measure MMR; measure count +4
If there is any content on the span (chords, notes of another voice, markers),
RN is not the right tool: W008 and degradation to one measure rest, so the
span counts as a single measure (one writes normal rests directly). The same
happens if another stave of the system, in the same measure, does not carry the
same RN (W008.other_stave): N) | c1 | R2 | d1 | above N+ | c1 | e1 | d1 |
gives one measure rest.
Corollary: since
RNlives only in uniformly empty spans, there never exists another part with content to align in that span → no "expand-to-align" machinery.
13.2 RN ≠ collapse in extraction¶
These must be kept separate:
RN= "I want an MMR here, in this view" (explicit notation, empty span).- Collapse in extraction = automatic: when extracting a single part from a multi-part score, the empty measures of that part collapse into MMR without special notation (one writes normal rests). It is behavior of whoever extracts the parts, not syntax. The choice "in the part the chords are omitted" is an extraction setting, not an MMR marker.
13.3 Boundary rules (rendering)¶
- Whole measures only: if the part enters mid-measure, the whole measures go into MMR and the half-beat at the edges remains a normal rest.
- The span breaks at: system change (line break), double barline,
repeat
:|/|:, key/time-signature/tempo change, rehearsal mark. E.g.R8with a key change in the middle → two MMRs.
14. Spacer — invisible rest (s)¶
History:
neumaRk_changelog.md, What's new in 0.6. Impact on classification low: as forr, a line of onlysfalls into the default sinkN)(neumaRk_datapack.md §3.bis, TB1 extended tos).
The spacer is an event that occupies duration exactly like a rest
(r), but renders no glyph: it advances the metric time without drawing
anything on the staff. It is borrowed from the eponymous construct in LilyPond. It serves to reserve
metric space without a graphical sign: aligning a second voice or
syllables (L)) by column, leaving driven "gaps" in a measure, positioning a single
annotation at a point in time without a visible rest.
14.1 Syntax¶
s is a special token-pitch (like r): it replaces the pitch and accepts
the entire duration grammar of a rest.
| Form | Meaning |
|---|---|
s |
spacer of implicit duration (inherits from the context, §3.3) |
s4 s8 s16 |
explicit duration (§3.1) |
s4. s2.. |
adjacent dot (§4.1) |
s8 . . |
spaced dot (§4.2) |
s4t s8t5 |
inside a tuplet (§3.2) |
s16*5 s16x5 |
multiplier (§4.3) |
s !!! |
repetition (§5): repeats the last note; at the start of the piece, with no notes, repeats the spacer (W012) |
N) c4 s4 e4 s4 // two real events alternated with two quarter-note spacers
N) s2 g2 // first "empty" beat (invisible), then g as a half note
14.2 Semantics¶
The spacer is indistinguishable from r for: duration, measure count,
autofill (§3.3.1) and absence of a note (it carries no pitch). The only
difference is the graphical rendering.
r (rest) |
s (spacer) |
|
|---|---|---|
| Rendering | rest glyph | no glyph |
| Duration / time signature | counts | counts (identical) |
| Note | none | none (identical) |
| Line classification | Notes | Notes |
Measure entirely of spacers. The measure appears optically empty but the time advances normally. The filling measure-rest (whole rest) does not apply, nor the slash notation reserved for empty harmonic measures (§10): the spacer is an explicit choice of "no sign".
14.3 Restrictions¶
The spacer has no pitch nor graphical presence, so it does not accept the modifiers that presuppose a note or a visual anchor. In all the following cases the modifier is ignored with warning W009:
| Spelling | Outcome |
|---|---|
^s / s^ |
no tie: the spacer does not tie (§6). To prolong, use the real note or r |
s"…" / s[…] |
no annotation (§8): the visual anchor is missing |
s(x) (u-)s |
no notehead/glissando (§11): reserved for real notes |
In addition, by symmetry with r:
- Chord-stack
<…>:sinside it is not valid, silently ignored (§2.6). - Grace block:
snot allowed as a grace event → E013 (liker,neumaRk_grace_notes.md).
14.4 No multi-measure form¶
There is no multi-measure spacer (SN is not defined): the uppercase S is
the Style header marker (neumaRk_header.md), and an MMR (§13) is by
definition a visible rest. To skip N measures invisibly one repeats
s measure by measure.
15. Deduction rules (summary)¶
- omitted pitch or duration are deduced from the context
- deduction must never produce semantic ambiguity
- in case of conflict, the explicit syntax always prevails
16. Diagnostics¶
| Code | Condition |
|---|---|
| E001 | Note token cannot be parsed (no more specific code applies; e.g. <c e g>e4, §2.6) |
| E002 | A duration after . or ! (c4 !8) |
| E003 | Invalid tuplet (§3.2) |
| E004 | Pitch cannot be parsed · rest, spacer or non-pitch inside a chord-stack (E004.stack_rest, E004.stack_pitch_invalid): element discarded (§2.6) |
| E005 | Durations beyond the measure meter: real excess (§3.3.1), also in the upbeat (§7) |
| E006 | More than one / per measure (§10) |
| E007 | Less than one beat for the / after alignment: downgraded to a rest (§10) |
| E008 | Absolute octave @<n>_ without a duration (§2.3) |
| E014 | Unclosed {…} group (§12) |
| E016 | Malformed chord-stack: < without >, or <> (§2.6) |
| E017 | Chord-stack without pitches < > (§2.6) |
| E018 | ., !, ^, ' or , without a preceding note (§1.1) |
| E022 | Unpitched marker = misplaced: alone (unpitched_bare), on a rest or spacer (unpitched_rest), inside a chord-stack (unpitched_inside_stack), before a non-note token (unpitched_misplaced); the = is ignored (§11.5) |
| E134 | Counted note after the >( … ) group (§7.2) |
| W002 | Irregular group not closed at the end of the measure (§3.2.2) |
| W005 | Opening upbeat with implicit durations and no reference: quarter notes (§7) · unknown durations that cannot share the measure in writable values (W005.uneven_split, §3.3) |
| W006 | Pitch outside the MIDI range 1–127 (§2.3) |
| W007 | Invalid token in rhythm notation {…} (§12) |
| W008 | RN on a span with content, or not shared by the other staves: one measure rest (§13.1) |
| W009 | Modifier on a spacer, ignored (§14.3) |
| W010 | Malformed editorial parentheses ( … ) (§11.4) |
| W011 | Irregular group closed before completing its cycle, by an explicit duration or by a group with a different ratio (§3.2.1) |
| W012 | !, ' or , after a rest with no preceding note: the rest is repeated (§1.1, §5) |
| W013 | Unpitched note =: accidental ignored (accidental), tie with a pitched note (tie_mixed, the source wins), = on {…} (rhythm_redundant) (§11.5) |
| W160 | More than one >( … ) group in the same measure (§7.2) |
| W184 | Anacrusis > in the middle of a row (§7) |
The diagnostics of grace blocks (E009–E013, E015, E019–E021, W003,
W004) are in neumaRk_grace_notes.md; those of the context object (…)
(E135, E136, W169) in neumaRk_datapack.md §7.3. The full table is in the
changelog.
This document defines the atomic level of musical notation in neumaRk.