neumaRk — Notes and Durations¶
This document defines the syntax and semantics of musical notes in neumaRk: pitches, accidentals, durations, extensions, and implicit deduction mechanisms.
The goal is to provide a deterministic specification that remains compatible with fast writing in informal mode.
1. Note event¶
A note event is the fundamental musical unit in the N) line.
A note event may contain:
- a pitch
- a duration (explicit or implicit)
- duration modifiers
- optional annotations
Some of these elements may be omitted, according to precise deduction rules.
Deduction continuity¶
Pitch and duration deduction in neumaRk is based on the last explicit value encountered across the entire document, and is not limited to a single note line.
At the beginning of a new musical datapack, the reference for pitch and duration deduction is the last note of the previous datapack, if present.
If no previous reference exists (start of the document), default deduction rules apply for implicit pitches and durations.
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, double accidentals allowed)octave shift(optional, see next section)
Examples:
c d# fb g##
2.2 Relative octaves¶
Octave calculation is performed relative to the previous pitch, choosing the smallest possible interval.
Examples:
f4 bb f c
The character ' immediately after the pitch raises the octave.
The character , immediately after the pitch lowers the octave.
Examples:
f4 bb, f' c'
Multiple consecutive octave shift symbols are allowed.
Examples:
a,4 g''' a,,,
At the beginning of the document, the reference pitch is:
- f4 in treble clef
- f3 in bass clef
2.3 Absolute octaves¶
An absolute octave may be explicitly specified by appending @
followed by the octave number (4 = middle C) and the _ character.
Examples:
c@4_8. g@3_2
2.4 Implicit pitch¶
If a note does not specify a pitch, it inherits the last pitch encountered during parsing, or defaults to:
- f4 in treble clef
- f3 in bass clef
Example:
f4 8 8 g 4 8
2.5 Forced accidentals¶
The ! character immediately following the pitch forces the display of
the accidental, even if it would normally be deduced from the key.
Example:
f#!8
This indicates that the # accidental must be rendered explicitly.
3. Duration¶
3.1 Explicit duration¶
Duration may be specified immediately after the pitch:
c4 d8 e16
Allowed values correspond to standard musical notation (note values with denominators based on powers of two):
1→ whole note2→ half note4→ quarter note8→ eighth note16→ sixteenth note32→ thirty-second note
3.2 Irregular groups (tuplets)¶
A duration may be followed by the letter t, indicating a tuplet value.
If no further specification is provided, it denotes a 3:2 tuplet (triplet).
If t is followed by n:m, the tuplet uses that ratio (e.g. 5:3, 7:8).
The second part of the ratio may be omitted in common cases:
t5is equivalent tot5:4t7is equivalent tot7:4
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 in the measure, it occupies the entire measure;
- the last explicit duration encountered in the musical context is used;
- if at the beginning of the document and no prior reference exists,
the duration is considered unknown (
?).
The rule stating that a single note occupies the entire measure has higher priority than all other deduction rules, including those based on the persistent musical context.
Recalculation of implicit durations¶
During duration deduction, a measure may temporarily exceed the theoretical duration defined by the meter.
In such cases, implicit duration values are recalculated so that the total duration of the measure becomes metrically valid.
Explicit duration values are never modified by recalculation.
3.4 Unknown duration (?)¶
When ? is specified as duration, the value is considered undetermined.
The missing duration required to complete the measure is distributed evenly
among all notes with duration ?.
Example:
c? d? e?
In a 4/4 measure, this yields a triplet of half notes.
4. Duration extensions¶
Note¶
The meaning of the dot (.) is specific to note lines
and does not match its meaning in chord lines.
Its semantics depend on whether it is adjacent to or separated from
the note event.
4.1 Adjacent dot¶
A dot immediately adjacent to the duration extends it by half of the previous value, as in standard notation:
g4.
4.2 Separated dot¶
A dot separated by a space extends the duration by the same value and may be repeated:
g8 . .
g8 ..
Both forms result in a duration of three eighth notes.
Only the space after the note is significant; spacing between dots is irrelevant.
4.3 Multipliers¶
An explicit multiplier may be specified as:
g16*5
g16x5
Both forms indicate a duration of 5/16 and are equivalent.
5. Repetition (!)¶
The exclamation mark (separated from the note event) repeats the same note with the same duration:
g8 !!!
Equivalent to:
g8 g8 g8 g8
The symbols . and ! may be combined.
6. Tie (^)¶
The ^ symbol indicates a tie.
- if adjacent to a note event and placed after it, it ties to the next note;
- if adjacent and placed before it, it ties to the previous note;
- if isolated, it is equivalent to a dot (
.); - if it is the only symbol in the measure, it ties to a note filling the measure.
7. Anacrusis¶
An anacrusis is introduced by the > symbol.
In this case, implicit durations are calculated solely based on
the last explicit duration encountered.
8. Annotations¶
An annotation may be appended immediately after a note, enclosed in double quotes:
c4"$F1"
Reserved prefixes:
$F→ fingering$S→ string number
Additional prefixes may be defined in future extensions.
9. Deduction rules (summary)¶
- omitted pitch or duration values are deduced from context;
- deduction must never produce semantic ambiguity;
- in case of conflict, explicit syntax always prevails.
This document defines the atomic level of musical notation in neumaRk.