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 atomic musical unit in the N) line of neumaRk.
Each note event represents a punctual musical occurrence in time and contributes to the construction of the rhythmic and melodic sequence of the piece.
A note event may specify, either explicitly or implicitly:
- 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 in the entire document, and is not limited to a single note line or to a single datapack.
At the beginning of a new musical datapack, the reference for the deduction of pitches and durations is the last note event of the previous datapack, if present.
In the absence of any previous reference (for example at the beginning 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 a note event¶
A note event consists of an ordered sequence of adjacent elements, with no spaces between them.
The order of the elements is fixed and must be as follows:
- Tie to the previous note (
^), optional - Pitch, optional because it may be deduced
- Accidental forcing (
!), optional
(allowed only if the pitch is explicitly specified) - Octave modifiers, optional
(relative octaves using'or,, or absolute octave notation) - Duration, optional
- explicit duration (power-of-two number, with optional dots or multipliers);
- tuplet indicators;
- or
?for unknown duration - Annotations, optional, enclosed in double quotes
- Tie to the following note (
^), optional
All elements that compose a note event must be adjacent. The presence of a space separates distinct note events.
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 must never be altered.
Note events consisting of a single symbol¶
A note event consisting exclusively of a single symbol is allowed, without explicit pitch or duration, provided that a valid previous musical context exists.
The following symbols may constitute a valid standalone note event:
- Octave modifiers (
'or,) - Value tie (
^)
In such cases, the note event:
- inherits the pitch from the previous note event;
- inherits the duration from the previous note event;
- applies exclusively the semantics of the specified symbol.
In particular:
- an event consisting of
'or,modifies the octave of the inherited pitch; - an event consisting of
^prolongs the previous note by the same duration.
A note event consisting of a single symbol is valid only if pitch and duration can be deterministically deduced from the context. In the absence of such context (for example at the beginning of the piece), the event is not valid.
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.