Skip to main content
See: /MRS-Specification-RFC#12-validation-rules

Syntax Validation

  • Document matches grammar
  • All required sections present
  • Version is supported
  • No malformed tokens

Structural Validation

RuleSeverityDescription
STRUCT-001ERRORDuplicate UUIDs
STRUCT-002ERRORInvalid measure numbers (non-positive)
STRUCT-003ERRORInvalid beat position
STRUCT-004ERRORReference to non-existent UUID
STRUCT-005ERRORMissing required :id or :at
STRUCT-006WARNINGGap in measure numbering
STRUCT-007WARNINGEmpty measure

Musical Validation

RuleSeverityDescription
MUSIC-001ERRORTie connects different pitches
MUSIC-002ERRORDuration overflow
MUSIC-003WARNINGExtreme pitch (outside practical range)
MUSIC-004WARNINGParallel fifths/octaves
MUSIC-005WARNINGVoice crossing
MUSIC-006WARNINGLarge melodic leap

Span Validation

RuleSeverityDescription
SPAN-001ERRORSpan references non-existent UUID
SPAN-002ERRORSlur from/to identical
SPAN-003WARNINGSlur spans more than 8 measures
SPAN-004WARNINGOverlapping slurs
SPAN-005FATALBoundary-anchored span modified

Validation Levels

ValidationLevel {
  STRICT      ; All rules, errors and warnings stop processing
  STANDARD    ; Errors stop, warnings are reported
  LENIENT     ; Only errors stop processing
  PERMISSIVE  ; Report all, stop on nothing
}