Partitura (.pta) is a compact, human-readable source language for authoring musical scores. It serves as a canonical authoring surface over a semantic model grounded in the full MusicXML specification.

What Is .pta?

.pta is:

.pta is not:

Design Goals

Partitura 0.1.0 is designed to:

Language Shape

A valid Partitura document has two top-level blocks:

score {
  metadata { ... }
  part-list { ... }
  parts { ... }
}

config {
  defaults { ... }
  appearance { ... }
  print { ... }
  import-detail { ... }
  links { ... }
  bookmarks { ... }
}

The score block is required. The config block is optional and exists for advanced configuration and interchange-preservation detail.

Canonical Example

score {
  title "Sonata in C"
  composer "Example"

  part "Piano" {
    measure 1 {
      time 4/4
      key c-major
      clef treble

      note c4 quarter
      note e4 quarter
      note g4 quarter
      rest quarter
    }
  }
}

Key Concepts

Concept Description
Keywords English, case-sensitive (score, measure, note, etc.)
Blocks Use { and } with two-space indentation
Fields Written as name value pairs
References Use @identifier syntax
Comments Start with # and continue to end of line
Strings Double-quoted: "text"
Booleans true or false
Numbers Base-10 integers and decimals

Compact vs Explicit Forms

Partitura provides compact authoring forms for common cases and explicit block forms for full MusicXML semantics:

# Compact form
note c4 quarter

# Explicit form
note n1 {
  pitch {
    step c
    alter 0
    octave 4
  }
  duration 1/4
  type quarter
}

Both forms produce identical IR and canonical output.

Next Steps