{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://timetoalign.github.io/timetoshare/0.2.0/timetoshare.schema.json",
  "title": "TimeToShare manifest",
  "description": "The TimeToShare! 0.2.0 manifest, an exchange format for the structures of musical timelines without their events: their axes, extents, nesting, groups, conversion maps, regions, flow control, MeasureMaps, FlowMaps and virtual timelines. Music-research software trades these structures in it like a currency. The format expresses the TimeToAlign! model (TISMIR, https://doi.org/10.5334/tismir.296); the Python library timetoalign is one implementation of it. Every manifest is one AlignmentBundle with an array of root timelines, possibly empty, optionally named, optionally attributing timelines to groups, optionally styled for drawing (`docs/drawing.md`). Time coordinates use the model's time units and number-type primitives: a fraction is a [numerator, denominator] pair of integers with a strictly positive denominator, an integer is a JSON integer and a float is a JSON number. Every object is open but `@context`, the `statements` container and the values within it, whose keys JSON-LD reads: elsewhere a key an object does not declare is kept and reported as unknown by the TimeToShare validators, never refused. The `discriminator` annotations follow OpenAPI: they serve validators that understand them and change nothing for the others. Every key with a default may be left out; a reader supplies the default. Provenance entries follow the schema `provenance.schema.json` beside this one, which defines the one provenance entry of statements and MatchClaims. The definitions Manifest, Timeline, Group, Graphical, ConversionMap, Coordinate, Number, Fraction, TimeUnit, NumberType, Id, MeasureMap, MeasureMapRow, Resource, Timestamp, MatchStamp, AlignmentAnchor, Context, Statements, StatementValue and ProvenanceEntry are public: a host may refer to this document or to `#/$defs/<name>`, and they change only by addition within 0.2.x.",
  "$ref": "#/$defs/Manifest",
  "$defs": {
    "Manifest": {
      "type": "object",
      "description": "A TimeToShare manifest: an array of root timelines, possibly empty, with all their descendants (child timelines) and the MeasureMaps their conversion maps read, optionally named, optionally attributing timelines to groups, and optionally styled. A single timeline is represented as a manifest of a single root; a TimelineGroup is represented as a manifest with a single group. A manifest with an ID or a name constitutes a named AlignmentBundle, one with neither is anonymous. Every ID of a manifest is unique across the manifest: the manifest's own and that of every timeline (root or descendant), group, MeasureMap, conversion map at any nesting depth, region, flow-control element, named timestamp, elision, MatchStamp, alignment anchor, resource, FlowMap and virtual timeline. Every element of the drawing is addressed by an `Address` object, never by a string composed from IDs. An element drawn more than once (a timeline drawn in a card of each group that has it as a member or as the ancestor line of several members, with its descendants, bands, conversion maps, regions and flow-control elements; an ancestor line with its marks; and the parts of each) keeps one address, which every drawing of it carries, so a rule selecting that address styles every drawing of it. Object keys carry no order and are written sorted by code point. The roots, the groups, the MeasureMaps, the resources, the FlowMaps and the virtual timelines are written sorted by ID, each group's members by code point, the named timestamps by timeline, then coordinate, then ID, and the elisions by timeline, then start, then ID; readers accept any order. The manifest, every timeline at any depth and every region may carry `statements` and `provenance`; a flow-control element and a FlowMap may carry `provenance` alone, whose entries are about the element itself and name no pair; no other element carries any. A manifest carrying either holds the inline JSON-LD context `@context`, which makes it a YAML-LD document. The values of a pair and the entries of `provenance` keep the order they are given in.",
      "properties": {
        "$schema": {
          "type": "string",
          "description": "The URL of this schema, a hint for editors. It is never read."
        },
        "@context": {
          "$ref": "#/$defs/Context"
        },
        "timetoshare": {
          "const": "0.2.0",
          "description": "The TimeToShare version this manifest conforms to. Compulsory: a JSON structure without it is not a TimeToShare manifest."
        },
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The manifest ID. It addresses nothing: the bundle's address is `{}` whatever its ID."
        },
        "name": {
          "$ref": "#/$defs/Name",
          "description": "The manifest's human-readable name, its title, or null when none was given."
        },
        "meta": {
          "$ref": "#/$defs/Meta",
          "description": "Free-form metadata of the manifest."
        },
        "timelines": {
          "type": "array",
          "description": "The root timelines, each with all its descendants. The array may be empty.",
          "items": {
            "$ref": "#/$defs/Timeline"
          }
        },
        "groups": {
          "type": "array",
          "description": "The timeline groups. A root that no group names remains ungrouped in the bundle. A root whose descendants are named in a group is indirectly linked with that group.",
          "items": {
            "$ref": "#/$defs/Group"
          },
          "default": []
        },
        "measure_maps": {
          "type": "array",
          "description": "The MeasureMaps, which the measure views among the conversion maps name by ID. A MeasureMap belongs to no timeline and is not drawn. The array may be empty.",
          "items": {
            "$ref": "#/$defs/MeasureMap"
          },
          "default": []
        },
        "resources": {
          "type": "array",
          "description": "The files the manifest names, each one descriptor (`Resource`): the MatchClaim table, the Projections table and event tables. The manifest never names an event or a MatchClaim inside them. The array may be empty.",
          "items": {
            "$ref": "#/$defs/Resource"
          },
          "default": []
        },
        "flow_maps": {
          "type": "array",
          "description": "The FlowMaps: each one order in which stretches of one root timeline are played. Absent where the manifest states none; a timeline without flow control has none computed for it.",
          "items": {
            "$ref": "#/$defs/FlowMap"
          }
        },
        "virtual_timelines": {
          "type": "array",
          "description": "The virtual timelines: each the statement that a map was applied to a timeline, giving a timeline of which nothing else is written. Absent where the manifest states none.",
          "items": {
            "$ref": "#/$defs/VirtualTimeline"
          }
        },
        "statements": {
          "$ref": "#/$defs/Statements",
          "description": "Property\u2013value pairs about the bundle, which names the work it bundles manifestations of (`schema:about`)."
        },
        "provenance": {
          "$ref": "#/$defs/Provenance",
          "description": "The provenance of the bundle's pairs: of a stated pair, how it was stated and who believes it; of a pair held only here, a candidate never stated."
        },
        "graphical": {
          "$ref": "#/$defs/Graphical"
        }
      },
      "required": [
        "timetoshare",
        "timelines"
      ]
    },
    "Timeline": {
      "type": "object",
      "description": "One timeline without its events: its axis (unit and number type), its length, its children, conversion maps, regions and flow control. The unit decides the timeline's domain and modality. Every coordinate on the timeline's own axis (its length, its children's offsets, region bounds, flow-control coordinates and the distances `by` of a jump's destinations) is a bare Number represented as the axis's number type selects: a JSON integer for int, a JSON number for float, a Fraction pair for fraction. The declared number type decides how a value is read, never its spelling: on an int axis a number written with a zero fractional part is read as the integer it equals, on a float axis an integer as the float it equals, and a Fraction as Fraction says. Writers spell every value canonically: an int as a JSON integer, a float as Python's repr spells it, Fraction members as JSON integers. Arrays have one canonical order: children by offset, then ID; conversion maps by ID; regions by start, end, ID; flow-control elements by coordinate, then ID; a jump's `targets`, which carry no order, by place: the destination without a place first, then those with `by`, by value, then those with `to`, by ID. Readers accept any order.",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The timeline ID."
        },
        "name": {
          "$ref": "#/$defs/Name"
        },
        "unit": {
          "$ref": "#/$defs/TimeUnit"
        },
        "number_type": {
          "$ref": "#/$defs/NumberType",
          "description": "The number type of every coordinate on the timeline's axis. Absent means the unit's default number type, which the unit table (`TimeUnit`) states for every unit. A discrete unit admits int only, a continuous unit float or fraction, and `number` any of the three."
        },
        "length": {
          "description": "The end of the timeline on its own axis, or null when the length is not known.",
          "anyOf": [
            {
              "$ref": "#/$defs/NumberNonnegative"
            },
            {
              "type": "null"
            }
          ]
        },
        "offset": {
          "$ref": "#/$defs/Number",
          "description": "Where the timeline's origin lies. A child's offset is required, lies on its parent's axis, in the parent's number type, and may be negative: the child then starts before its parent's origin. A root's offset is optional, may be negative, and places the root's origin on its unit's absolute axis; typically absent."
        },
        "locked": {
          "type": "boolean",
          "description": "Whether the timeline's extent is fixed. A locked timeline, such as a CD track, cannot extend; an unlocked one may grow, as a CD timeline built by appending track after track does.",
          "default": false
        },
        "is_segment_line": {
          "type": "boolean",
          "description": "Whether the timeline is a segment line: a timeline containing only contiguous segments. Its children are its segments: each shares the segment line's unit, as every child shares its parent's; they are contiguous from 0 in offset order (a segment of unknown length ends where its successor starts) and end at its length where both are known, all with one is_segment_line value; segments that are segment lines themselves make a nested segment line. Contiguity and the one is_segment_line value are checked after the schema.",
          "default": false
        },
        "meta": {
          "$ref": "#/$defs/Meta"
        },
        "children": {
          "type": "array",
          "description": "The child timelines, each carrying its offset on this timeline's axis.",
          "items": {
            "$ref": "#/$defs/Timeline",
            "required": [
              "offset"
            ]
          },
          "default": []
        },
        "conversion_maps": {
          "type": "array",
          "description": "Conversion maps attached to this timeline.",
          "items": {
            "$ref": "#/$defs/ConversionMap"
          },
          "default": []
        },
        "regions": {
          "type": "array",
          "description": "Regions of this timeline.",
          "items": {
            "$ref": "#/$defs/Region"
          },
          "default": []
        },
        "flow_control": {
          "type": "array",
          "description": "The flow control of this timeline: its jumps, jump targets, breaks, section breaks and barlines.",
          "items": {
            "$ref": "#/$defs/FlowControlElement"
          },
          "default": []
        },
        "statements": {
          "$ref": "#/$defs/Statements",
          "description": "Property\u2013value pairs about the thing this timeline is the axis of: this recording, this edition, this encoding."
        },
        "provenance": {
          "$ref": "#/$defs/Provenance",
          "description": "The provenance of this element's pairs: of a stated pair, how it was stated and who believes it; of a pair held only here, a candidate never stated."
        }
      },
      "required": [
        "id",
        "unit",
        "length"
      ],
      "if": {
        "properties": {
          "unit": {
            "enum": [
              "ticks",
              "samples",
              "frames",
              "pixels"
            ]
          }
        },
        "required": [
          "unit"
        ]
      },
      "then": {
        "properties": {
          "number_type": {
            "const": "int"
          }
        }
      },
      "else": {
        "if": {
          "properties": {
            "unit": {
              "const": "number"
            }
          },
          "required": [
            "unit"
          ]
        },
        "else": {
          "properties": {
            "number_type": {
              "enum": [
                "float",
                "fraction"
              ]
            }
          }
        }
      }
    },
    "Group": {
      "type": "object",
      "description": "A timeline group: member timelines sharing, by definition, the same graphical start and end. Every member's 0 coincides with every other member's 0 and every member's length with every other member's length, and positions in between convert linearly; a member's length may be unknown. It is possible for child timelines to participate in a group. A group is defined by naming member timelines of the manifest, roots or children at any depth, and virtual timelines of the manifest; a timeline may be a member of several groups, and no member lies inside or contains another member of the same group (a virtual timeline lies inside none and contains none). A child may belong to a group while its root belongs to another or to none.",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The group ID."
        },
        "name": {
          "$ref": "#/$defs/Name"
        },
        "meta": {
          "$ref": "#/$defs/Meta"
        },
        "members": {
          "type": "array",
          "description": "The IDs of the member timelines, each a timeline of the manifest at any depth or a virtual timeline (checked after the schema), sorted by code point. The array may be empty.",
          "items": {
            "$ref": "#/$defs/Id"
          },
          "uniqueItems": true
        }
      },
      "required": [
        "id",
        "members"
      ]
    },
    "Resource": {
      "type": "object",
      "description": "A file the manifest names, one descriptor: its ID, the type of its rows, the timelines it holds data for and its location, with the optional media type, size and digest of the file. At most one resource of a manifest has the type `MatchClaim` and at most one the type `Projection`; every ID of `timelines` names a timeline of the manifest, at any depth, or a virtual timeline. Both are checked after the schema.",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The resource ID."
        },
        "type": {
          "type": "string",
          "minLength": 1,
          "description": "What the file's rows are: `MatchClaim` for the MatchClaim table, `Projection` for the Projections table, or the type of the events an event table holds. The Projections table and the event types are experimental: they may change in any version."
        },
        "timelines": {
          "type": "array",
          "description": "The IDs of the timelines the file holds data for, each once: timelines of the manifest at any depth and virtual timelines.",
          "items": {
            "$ref": "#/$defs/Id"
          },
          "uniqueItems": true
        },
        "url": {
          "$ref": "#/$defs/IriReference",
          "description": "Where the file lies: a reference resolved against the manifest's address, such as `match_claims.parquet` beside it."
        },
        "media_type": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]*/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]*$",
          "not": {
            "pattern": "[\\u0000-\\u001f]"
          },
          "description": "The media type of the file without parameters, such as `application/vnd.apache.parquet`."
        },
        "size": {
          "type": "integer",
          "minimum": 0,
          "description": "The size of the file in bytes."
        },
        "integrity": {
          "type": "object",
          "description": "The digest of the file's raw bytes: the hash function, named as the PREMIS vocabulary of cryptographic hash functions names it, and the digest in lower-case hexadecimal.",
          "properties": {
            "algorithm": {
              "enum": [
                "MD5",
                "SHA-1",
                "SHA-256",
                "SHA-384",
                "SHA-512"
              ]
            },
            "digest": {
              "type": "string",
              "pattern": "^[0-9a-f]+$",
              "not": {
                "pattern": "[\\u0000-\\u001f]"
              }
            }
          },
          "required": [
            "algorithm",
            "digest"
          ]
        }
      },
      "required": [
        "id",
        "type",
        "timelines",
        "url"
      ]
    },
    "Graphical": {
      "type": "object",
      "description": "How the manifest is drawn (`docs/drawing.md`): named styles, an ordered list of rules, the display order of each group's members, the band order of each timeline, the named timestamps, the named MatchStamps and the elisions. A rule selects drawn elements and sets presentation properties on them, either directly or by naming a style of `styles`; a name that `styles` does not hold sets nothing. Writers never reorder the rules or an order. An absent `graphical` object draws every element with the other style layers alone.",
      "properties": {
        "styles": {
          "type": "object",
          "description": "Declarations by style name.",
          "additionalProperties": {
            "$ref": "#/$defs/Declaration"
          },
          "default": {}
        },
        "rules": {
          "type": "array",
          "description": "Rules in order; of two rules of equal rank the later one decides.",
          "items": {
            "$ref": "#/$defs/Rule"
          },
          "default": []
        },
        "order": {
          "type": "object",
          "description": "The order of what a group or a timeline stacks, top to bottom, keyed by a group's ID (the display order of its members) or by the ID of a timeline, of a root or a descendant, or of a virtual timeline (its band order). A group without an entry is displayed in the order of its members; a timeline without one follows its parent's band order, and a root or a virtual timeline without one the default band order of the drawing specification. A band order may list a subset of the facets (`Order`).",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "$ref": "#/$defs/Order"
          },
          "default": {}
        },
        "timestamps": {
          "type": "array",
          "description": "The named timestamps, written in canonical order: by timeline (code point), then coordinate, then ID. Readers accept any order.",
          "items": {
            "$ref": "#/$defs/Timestamp"
          },
          "default": []
        },
        "matchstamps": {
          "type": "array",
          "description": "The named MatchStamps, written sorted by ID. Readers accept any order.",
          "items": {
            "$ref": "#/$defs/MatchStamp"
          },
          "default": []
        },
        "elisions": {
          "type": "array",
          "description": "The elisions, written in canonical order: by timeline (code point), then start, then ID. Readers accept any order. Elisions may overlap, on one timeline or on a timeline and its descendants; an overlap is never refused.",
          "items": {
            "$ref": "#/$defs/Elision"
          },
          "default": []
        }
      }
    },
    "Timestamp": {
      "type": "object",
      "description": "A named timestamp: a position `coordinate` on the own axis of the timeline `timeline` (any depth, a segment included, or a virtual timeline), a number as that timeline's number type selects, from its zero to its length (only from its zero when the length is null), named `name`. A match timestamp (`matchstamp: true`) is a timestamp of the named MatchStamps: at most one lies on a coordinate, some MatchStamp names it, its `name` is optional and its `display` defaults to `[\"cross_section\"]`. Five parts of it may be drawn, as `display` selects: a wedge `{\"id\": id}`, three labels stacked outward from the wedge (its name `{\"id\": id, \"part\": [\"name\"]}`, its ID `{\"id\": id, \"part\": [\"id\"]}` and its coordinate `{\"id\": id, \"part\": [\"coordinate\"]}`) and a cross-section line `{\"id\": id, \"part\": [\"line\"]}`. Only the coordinate on the timeline's own axis is stored. That the timeline is one of the manifest's or a virtual timeline, that the coordinate reads as its number type, that it lies within the timeline, that a groupstamp lies in a group, and the rules of match timestamps are checked after the schema.",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The timestamp ID."
        },
        "timeline": {
          "$ref": "#/$defs/Id",
          "description": "The ID of the timeline the timestamp lies on: a root or a descendant at any depth, a segment included, or a virtual timeline."
        },
        "coordinate": {
          "$ref": "#/$defs/Number",
          "description": "Where the timestamp lies on its timeline's own axis, represented as the axis's number type selects."
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "The timestamp's human-readable name, which its name label shows; never empty. Required unless the timestamp is a match timestamp."
        },
        "display": {
          "type": "array",
          "description": "What is drawn of the timestamp, each word at most once: `wedge` its wedge, `name` its name label, `id` its ID label, `coordinate` its coordinate label and `cross_section` its cross-section line. A part whose word is absent is not drawn, so an empty array draws nothing of the timestamp. The order carries no meaning: readers accept any order, and writers write the canonical order wedge, name, id, coordinate, cross_section.",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "wedge",
              "name",
              "id",
              "coordinate",
              "cross_section"
            ]
          },
          "default": [
            "wedge",
            "name",
            "cross_section"
          ]
        },
        "matchstamp": {
          "type": "boolean",
          "description": "Whether the timestamp is a match timestamp, a timestamp of the named MatchStamps; false, the default, makes it an ordinary named timestamp.",
          "default": false
        },
        "groupstamp": {
          "type": "boolean",
          "description": "Whether the timestamp is a groupstamp: its timeline lies in a group (it or one of its ancestors is a member of the group; a virtual timeline lies in the groups it is a member of), and its line extends across the frame of each group it lies in, over every member drawn there. The members' coordinates are derived from the group and never stored. False, the default, draws the line on the timestamp's own timeline alone.",
          "default": false
        }
      },
      "required": [
        "id",
        "timeline",
        "coordinate"
      ],
      "if": {
        "properties": {
          "matchstamp": {
            "const": true
          }
        },
        "required": [
          "matchstamp"
        ]
      },
      "then": {
        "properties": {
          "display": {
            "default": [
              "cross_section"
            ]
          },
          "groupstamp": {
            "default": false
          }
        }
      },
      "else": {
        "required": [
          "name"
        ]
      }
    },
    "MatchStamp": {
      "type": "object",
      "description": "A named MatchStamp: match timestamps of several timelines that MatchClaims state to be the same moment, joined by alignment anchors, with the IDs of the MatchClaims behind them at the time of naming or of the last update. The timestamps of a MatchStamp are those its anchors name. The manifest is valid whatever a MatchClaim table says. Every anchor names two match timestamps of two timelines, and the anchors are one connected set; both are checked after the schema.",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The MatchStamp ID."
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "The MatchStamp's human-readable name, which an anchor whose `display` holds `name` draws at the middle of its line; never empty."
        },
        "alignment_anchors": {
          "type": "array",
          "description": "The alignment anchors, each joining two match timestamps.",
          "items": {
            "$ref": "#/$defs/AlignmentAnchor"
          },
          "minItems": 1
        },
        "match_claims": {
          "type": "array",
          "description": "The IDs of the MatchClaims behind the MatchStamp, each once, as the MatchClaim table writes them (no `#`: they name rows of the table, not elements of the manifest).",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true
        }
      },
      "required": [
        "id",
        "name",
        "alignment_anchors",
        "match_claims"
      ]
    },
    "AlignmentAnchor": {
      "type": "object",
      "description": "An alignment anchor of a named MatchStamp: two match timestamps of two timelines, drawn as a line between their cross-section lines.",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The anchor ID."
        },
        "timestamps": {
          "type": "array",
          "description": "The IDs of the anchor's two match timestamps.",
          "items": {
            "$ref": "#/$defs/Id"
          },
          "minItems": 2,
          "maxItems": 2
        },
        "display": {
          "type": "array",
          "description": "What is drawn of the anchor, each word at most once: `line` its line, `name` the MatchStamp's name at the middle of the line. The order carries no meaning: readers accept any order, and writers write the canonical order line, name.",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "line",
              "name"
            ]
          },
          "default": [
            "line"
          ]
        }
      },
      "required": [
        "id",
        "timestamps"
      ]
    },
    "Elision": {
      "type": "object",
      "description": "An elision: the stretch from `start` to `end` on the own axis of the timeline `timeline` (any depth, a segment included, or a virtual timeline, on its played axis), left out of the drawing. Every row drawn across the stretch stops where it starts and resumes where it ends, at full scale on either side, and the narrow gap between holds one ellipsis, centred in it, with the elision's labels below it and grey continuations of the rows, as `display` selects. The elision lies on its timeline and moves with it; nothing refers to an elision but an address in a rule: its gap `{\"id\": id}`, its ellipsis `{\"id\": id, \"part\": [\"ellipsis\"]}` and its three labels, its name `{\"id\": id, \"part\": [\"name\"]}`, its ID `{\"id\": id, \"part\": [\"id\"]}` and its elided coordinates `{\"id\": id, \"part\": [\"coordinate\"]}`. `start` and `end` are numbers as that timeline's number type selects, from its zero to its length (only from its zero when the length is null), `start` before `end`. An elision on a timeline that lies in a group, a virtual timeline that is a member of one included, is drawn across that group's frame; every other is drawn in the cards of its timeline's root, a virtual timeline being its own, as their `elision-mode` selects; both are the drawing specification's (`docs/drawing.md`). That the timeline is a timeline or a virtual timeline of the manifest, that `start` and `end` read as its number type, and that they lie in order within the timeline are checked after the schema.",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The elision ID."
        },
        "timeline": {
          "$ref": "#/$defs/Id",
          "description": "The ID of the timeline the elision lies on: a root or a descendant at any depth, a segment included, or a virtual timeline."
        },
        "start": {
          "$ref": "#/$defs/Number",
          "description": "Where the elided stretch starts on its timeline's own axis, represented as the axis's number type selects."
        },
        "end": {
          "$ref": "#/$defs/Number",
          "description": "Where the elided stretch ends on its timeline's own axis, represented as the axis's number type selects; after `start`."
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "The elision's human-readable name, which its name label shows; never empty. Absent, the label shows the name of the timeline the elision lies on."
        },
        "width": {
          "type": "object",
          "description": "How wide the gap is drawn, in exactly one of three forms: `ratio`, `span` or `canvas`. A width larger than the stretch drawn at full scale draws the stretch at full scale: an elision never widens. Absent, the gap takes the standard width of the drawing specification (`docs/drawing.md`).",
          "properties": {
            "ratio": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 1,
              "description": "The gap's width as a share of the stretch's width at full scale, greater than 0 and at most 1."
            },
            "span": {
              "$ref": "#/$defs/NumberPositive",
              "description": "The gap is as wide as this many units of the elision's timeline drawn at full scale, greater than 0 and represented as the axis's number type selects."
            },
            "canvas": {
              "type": "number",
              "exclusiveMinimum": 0,
              "description": "The gap's width in canvas units, greater than 0."
            }
          },
          "oneOf": [
            {
              "required": [
                "ratio"
              ]
            },
            {
              "required": [
                "span"
              ]
            },
            {
              "required": [
                "canvas"
              ]
            }
          ]
        },
        "display": {
          "type": "array",
          "description": "What is drawn of the elision besides its gap, each word at most once: `ellipsis` its ellipsis, one centred in each drawing of its gap, `name` its name label (below the ellipsis), `id` its ID label, `coordinate` the label of its elided coordinates and `continuation` the grey continuations of the rows across its gap. The gap is drawn whatever `display` lists, so an empty array draws a bare gap; absent, the elision draws its ellipsis and its name label. The order carries no meaning: readers accept any order, and writers write the canonical order ellipsis, name, id, coordinate, continuation.",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "ellipsis",
              "name",
              "id",
              "coordinate",
              "continuation"
            ]
          },
          "default": [
            "ellipsis",
            "name"
          ]
        }
      },
      "required": [
        "id",
        "timeline",
        "start",
        "end"
      ]
    },
    "ConversionMap": {
      "type": "object",
      "description": "A conversion map of a timeline, discriminated by its type: a function from a position on the timeline's axis to a value. A map is an abstract type, independent of any number type: each of its Numbers is an int, a float or a Fraction, whatever the implementation computes in. Six types are general (LinearMap, TableMap, ConstantMap, PiecewiseMap, ChainMap, CombinationMap) and four read a MeasureMap (MeasureRecordMap, MeasureNumberMap, FloatingMeasureMap, MeasureBeatMap). A map attached to a timeline converts from the timeline's axis: its source_unit, where not null, is the timeline's unit, so a timeline in ticks reaches a measure view through a ChainMap. A map that another map holds reads its holder's input: every map of a PiecewiseMap or a CombinationMap, and the first map of a ChainMap, has its holder's source_unit wherever both are stated. Both rules are checked after the schema.",
      "oneOf": [
        {
          "$ref": "#/$defs/ChainMap"
        },
        {
          "$ref": "#/$defs/CombinationMap"
        },
        {
          "$ref": "#/$defs/ConstantMap"
        },
        {
          "$ref": "#/$defs/FloatingMeasureMap"
        },
        {
          "$ref": "#/$defs/LinearMap"
        },
        {
          "$ref": "#/$defs/MeasureBeatMap"
        },
        {
          "$ref": "#/$defs/MeasureNumberMap"
        },
        {
          "$ref": "#/$defs/MeasureRecordMap"
        },
        {
          "$ref": "#/$defs/PiecewiseMap"
        },
        {
          "$ref": "#/$defs/TableMap"
        }
      ],
      "discriminator": {
        "propertyName": "type"
      }
    },
    "Coordinate": {
      "type": "object",
      "description": "A self-describing position: the axis unit, the number type, and the value in the representation that number type selects. Inside a manifest every position lies on an axis its container declares (a timeline's unit and number type, a conversion map's source and target units) and is a bare Number; this form is for a position outside such a container, as hosts exchange single positions.",
      "properties": {
        "unit": {
          "$ref": "#/$defs/TimeUnit"
        },
        "number_type": {
          "$ref": "#/$defs/NumberType"
        },
        "value": {
          "description": "The position, represented as selected by number_type."
        }
      },
      "required": [
        "unit",
        "number_type",
        "value"
      ],
      "if": {
        "properties": {
          "unit": {
            "enum": [
              "ticks",
              "samples",
              "frames",
              "pixels"
            ]
          }
        },
        "required": [
          "unit"
        ]
      },
      "then": {
        "properties": {
          "number_type": {
            "const": "int"
          }
        }
      },
      "else": {
        "if": {
          "properties": {
            "unit": {
              "const": "number"
            }
          },
          "required": [
            "unit"
          ]
        },
        "else": {
          "properties": {
            "number_type": {
              "enum": [
                "float",
                "fraction"
              ]
            }
          }
        }
      },
      "oneOf": [
        {
          "description": "An integer coordinate.",
          "properties": {
            "number_type": {
              "const": "int"
            },
            "value": {
              "type": "integer"
            }
          }
        },
        {
          "description": "A float coordinate.",
          "properties": {
            "number_type": {
              "const": "float"
            },
            "value": {
              "type": "number"
            }
          }
        },
        {
          "description": "An exact fraction coordinate.",
          "properties": {
            "number_type": {
              "const": "fraction"
            },
            "value": {
              "$ref": "#/$defs/Fraction"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "number_type"
      }
    },
    "Number": {
      "description": "A bare JSON number or an exact Fraction pair.",
      "oneOf": [
        {
          "type": "number"
        },
        {
          "$ref": "#/$defs/Fraction"
        }
      ]
    },
    "Fraction": {
      "type": "array",
      "description": "Rational number encoded as a numerator and a strictly positive denominator, each an integer. The declared number type decides how a value is read, never its spelling: a member written with a zero fractional part, as in [1, 8.0], is read as the integer it equals, and a Fraction in any terms is read as its value, [2, 4] as 1/2. Any terms are read within the form its number type takes: only an axis of number type fraction takes a Fraction. Writers spell every member as a JSON integer.",
      "minItems": 2,
      "maxItems": 2,
      "prefixItems": [
        {
          "type": "integer",
          "description": "Numerator, signed integer"
        },
        {
          "type": "integer",
          "minimum": 1,
          "description": "Denominator. Strictly positive to prevent zero-division and negative bases."
        }
      ],
      "items": false
    },
    "TimeUnit": {
      "type": "string",
      "description": "The unit of a timeline axis. Each unit belongs to one domain (logical: musical time; physical: real time; graphical: space) and one modality (continuous or discrete), and states the default number type of an axis that declares none. A discrete unit admits the number type int only, a continuous unit float or fraction, and `number` any of the three. The domain and modality decide the timeline class: `seconds`, physical and continuous, makes a ContinuousPhysicalTimeline.",
      "oneOf": [
        {
          "const": "number",
          "description": "Logical, continuous; default number type float."
        },
        {
          "const": "floating_measures",
          "description": "Logical, continuous; default number type float."
        },
        {
          "const": "whole_notes",
          "description": "Logical, continuous; default number type fraction."
        },
        {
          "const": "quarters",
          "description": "Logical, continuous; default number type fraction."
        },
        {
          "const": "ticks",
          "description": "Logical, discrete; default number type int."
        },
        {
          "const": "milliseconds",
          "description": "Physical, continuous; default number type float."
        },
        {
          "const": "seconds",
          "description": "Physical, continuous; default number type float."
        },
        {
          "const": "minutes",
          "description": "Physical, continuous; default number type float."
        },
        {
          "const": "samples",
          "description": "Physical, discrete; default number type int."
        },
        {
          "const": "frames",
          "description": "Physical, discrete; default number type int."
        },
        {
          "const": "pixels",
          "description": "Graphical, discrete; default number type int."
        },
        {
          "const": "meters",
          "description": "Graphical, continuous; default number type float."
        },
        {
          "const": "centimeters",
          "description": "Graphical, continuous; default number type float."
        },
        {
          "const": "millimeters",
          "description": "Graphical, continuous; default number type float."
        },
        {
          "const": "inches",
          "description": "Graphical, continuous; default number type float."
        },
        {
          "const": "points",
          "description": "Graphical, continuous; default number type float."
        },
        {
          "const": "css_pixels",
          "description": "Graphical, continuous; default number type float. The CSS pixel (1/96 in), the unit of an SVG's outermost viewport."
        },
        {
          "const": "user_units",
          "description": "Graphical, continuous; default number type float. A document's own coordinate system, such as an SVG viewBox; sized only by that document, through a conversion map."
        }
      ]
    },
    "NumberType": {
      "type": "string",
      "description": "The number type of every coordinate on a timeline axis. It selects the representation of a coordinate's value: int is a JSON integer, float a JSON number, fraction a Fraction pair.",
      "enum": [
        "int",
        "float",
        "fraction"
      ]
    },
    "Id": {
      "type": "string",
      "pattern": "^#[\\s\\S]",
      "not": {
        "anyOf": [
          {
            "pattern": "[\\u0000-\\u001f]"
          },
          {
            "enum": [
              "#NOMATCH_SENTINEL",
              "#CHUNK_SENTINEL"
            ]
          }
        ]
      },
      "description": "An identifier, written `#` followed by the ID, both where an element states its own ID and where a member refers to one: `#score`, `#Bass Kick`, `#perf/take 2`. The ID is the text after the first `#`, so `##x` writes the ID `#x`: any non-empty string without control characters (U+0000 to U+001F), such as `score`, `Bass Kick`, `perf/take 2` or a URI, but the two strings a MatchClaim table writes for a sentinel in its event ID columns, `NOMATCH_SENTINEL` and `CHUNK_SENTINEL`, which no element takes as its ID; no other word is reserved. An ID is never parsed and never composed with another; the manifest states where it is unique (`Manifest`). An ID identifies; a name, where an element has one, is what is displayed."
    },
    "Facet": {
      "type": "string",
      "enum": [
        "markers",
        "conversion_maps",
        "children",
        "regions",
        "flow_control"
      ],
      "description": "One of the five facets every timeline has: its coordinate markers (the wedges of the timeline's named timestamps and their labels; a break, a section break or a barline is not a coordinate marker but an element of flow control), conversion maps, children, regions and flow control. A band draws one facet."
    },
    "Part": {
      "type": "string",
      "enum": [
        "start",
        "end",
        "name",
        "label",
        "card",
        "line",
        "id",
        "coordinate",
        "elision",
        "ellipsis",
        "symbol",
        "fork",
        "leader"
      ],
      "description": "A word naming a part of an element in an `Address`."
    },
    "Address": {
      "type": "object",
      "description": "The address of an element, as the drawing specification (`docs/drawing.md`) uses it: an object compared as a whole, never a string. `{}` addresses the bundle and `{\"part\": [\"name\"]}` the manifest's title. `{\"id\": X}` addresses the element whose ID is X: a timeline (its line and every ancestor line of it), a group (its frame), a MeasureMap, a conversion map, a region, a flow-control element, a named timestamp (its wedge) or an elision (its gap). `{\"id\": T, \"facet\": F}` addresses the band drawing the facet F of the timeline T, and `{\"id\": T, \"part\": [\"card\"]}` every card of T. Any other `part` addresses a part of the element X: `[\"start\"]` a segment's boundary, `[\"name\"]` and `[\"label\"]` the element's name or label (a named timestamp's and an elision's name label is `[\"name\"]`), `[\"id\"]` and `[\"coordinate\"]` the ID label and the coordinate label of a named timestamp or an elision, `[\"line\"]` a named timestamp's cross-section line, `[\"ellipsis\"]` an elision's ellipsis, `[\"symbol\"]` the symbol of a flow-control element, `[\"fork\"]` the volta fork of a jump, `[\"leader\"]` the leader lines of the labels of a region, a segment or a jump, and `[\"elision\"]` the gap of an elision the drawing derives on the timeline X, which has no ID, with its ellipsis `[\"elision\", \"ellipsis\"]` and its labels `[\"elision\", \"name\"]` and `[\"elision\", \"coordinate\"]`. `{\"id\": V, \"facet\": \"regions\", \"part\": [k]}` addresses the brace of the chunk at index k, from 0, of the FlowMap a virtual timeline V applies, or that a card of the timeline V is switched to, with its label `[k, \"label\"]`, its leader `[k, \"leader\"]` and the boundary at its start `[k, \"start\"]`. A `facet` needs an `id`, and stands with a `part` only where the part holds a chunk index. An address with a member it does not declare equals no element's address and matches nothing.",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id"
        },
        "facet": {
          "$ref": "#/$defs/Facet"
        },
        "part": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/Part"
              },
              {
                "type": "integer",
                "minimum": 0
              }
            ]
          },
          "minItems": 1
        }
      },
      "dependentRequired": {
        "facet": [
          "id"
        ]
      },
      "not": {
        "required": [
          "facet",
          "part"
        ],
        "properties": {
          "part": {
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "Name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Human-readable name, or null when none was given.",
      "default": null
    },
    "Meta": {
      "type": "object",
      "additionalProperties": true,
      "description": "Free-form metadata.",
      "default": {}
    },
    "MeasureMapRow": {
      "type": "object",
      "description": "One row of the Measure Map standard plus the TimeToShare extensions volta and offset_within_measure.",
      "properties": {
        "ID": {
          "type": "string",
          "description": "Any unique string to identify this Measure object. Unique, here, means that the string cannot be used as ID for another object that forms part of the same MeasureMap. The 'next' array may use these IDs to refer to other Measures. Additionally, IDs can prove useful in cross-relating between MeasureMaps relating to different editions of the same piece, e.g. by assigning identical IDs for measures that are identical across the two. The ID could be, for instance, human-readable form (e.g., the 'count' value converted to a string) or a random string (often the case in MEI scores)."
        },
        "count": {
          "type": "integer",
          "minimum": 1,
          "description": "Position of this Measure object in the MeasureMap, using natural numbers starting with 1. This serves primarily as an index, and does not attempt detailed musical conventions. In the simplest case (e.g., a score with no anacrusis or other irregularities) this count matches the (most musical) number field below."
        },
        "qstamp": {
          "$ref": "#/$defs/NumberNonnegative",
          "description": "The symbolic time to have elapsed since the beginning of the source, measured in quarter notes. Non-negative; TimeToShare additionally permits an exact Fraction pair."
        },
        "number": {
          "type": "integer",
          "minimum": 0,
          "description": "A number assigned to this measure based on a given set of rules or conventions. One wide-spread convention, for instance, is that a piece starts with measure number 0 if it has an anacrusis and with number 1 otherwise."
        },
        "name": {
          "type": "string",
          "description": "A label for the Measure. Typically used for distinguishing between Measures with the same number, e.g. for first and second endings (as in '16a', '16b') or split logical measures (as in '16-1', '16-2')."
        },
        "time_signature": {
          "type": "string",
          "description": "A label for the time signature. Typically this takes the form <int>/<int>, as in \u20183/8\u2019, but can be any text (e.g., \u2018C\u2019, \u2018common time\u2019, \u2018unmeasured\u2019 \u2018cadenza\u2019) as long as actual_length is specified."
        },
        "nominal_length": {
          "anyOf": [
            {
              "$ref": "#/$defs/NumberPositive"
            },
            {
              "type": "null"
            }
          ],
          "description": "The default duration that corresponds to the given 'time_signature', in quarter notes. Can be derived from 'time_signature' if it takes the form of an '<int>/<int>'-encoded fraction. Can take the value 'null' if the time signature has no corresponding duration (e.g. 'cadenza'). TimeToShare additionally permits an exact Fraction pair."
        },
        "actual_length": {
          "$ref": "#/$defs/NumberPositive",
          "description": "The actual duration of the measure, in quarter notes. Strictly positive; TimeToShare additionally permits an exact Fraction pair."
        },
        "start_repeat": {
          "type": [
            "boolean",
            "number"
          ],
          "description": "Typical usage is with the bool type, with 'true' indicating a start repeat at the beginning of the measure."
        },
        "end_repeat": {
          "type": [
            "boolean",
            "number"
          ],
          "description": "Typical usage is with the bool type, with 'true' indicating an end repeat at the end of the measure."
        },
        "next": {
          "type": "array",
          "items": {
            "type": [
              "string",
              "integer"
            ]
          },
          "description": "The 'ID' strings or 'count' integers that correspond to all measures that can follow this one. The corresponding field needs to be present in the MeasureMap."
        },
        "volta": {
          "type": [
            "integer",
            "array"
          ],
          "minimum": 1,
          "items": {
            "type": "integer",
            "minimum": 1
          },
          "minItems": 1,
          "uniqueItems": true,
          "description": "A TimeToShare extension: the volta bracket (ending) the measure lies under, as the number of the pass in which it is played, counted from 1, or as a list of distinct such numbers where the bracket stands for several passes (a bracket printed '1, 3' is [1, 3]). The value is kept as written: no reader turns 1 into [1] or [1] into 1. It carries no structural constraint."
        },
        "offset_within_measure": {
          "$ref": "#/$defs/NumberPositive",
          "description": "A TimeToShare extension: where this row begins inside its nominal measure, in quarter notes, when the row represents only part of that measure (an anacrusis, or one constituent of a split measure). Absent means 0; a row never states 0."
        }
      },
      "anyOf": [
        {
          "required": [
            "ID"
          ]
        },
        {
          "required": [
            "count"
          ]
        }
      ]
    },
    "MeasureMap": {
      "type": "object",
      "description": "A MeasureMap: the measures of a score as compressed rows of the Measure Map standard, identified by an ID that the measure views (MeasureRecordMap, MeasureNumberMap, FloatingMeasureMap, MeasureBeatMap) name. Its positions (a row's qstamp and lengths) are quarters by definition, so it fits every timeline: a timeline in ticks or whole notes reaches a view through a ChainMap whose first map is a LinearMap to quarters. It belongs to no timeline and is not drawn. The row holding a position x in quarters is the last row, in measure order once decompressed, whose qstamp is at or before x; a position before the first row is held by the first row.",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The MeasureMap ID."
        },
        "name": {
          "$ref": "#/$defs/Name"
        },
        "meta": {
          "$ref": "#/$defs/Meta"
        },
        "rows": {
          "$ref": "#/$defs/MeasureMapRows"
        }
      },
      "required": [
        "id",
        "rows"
      ]
    },
    "MeasureMapRows": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MeasureMapRow"
      },
      "minItems": 1,
      "description": "The rows of a MeasureMap: compressed rows of the Measure Map standard, in measure order. A row equal to its predecessor's default successor is omitted as a whole."
    },
    "NumberNonnegative": {
      "description": "A non-negative bare JSON number or a non-negative exact Fraction pair.",
      "oneOf": [
        {
          "type": "number",
          "minimum": 0
        },
        {
          "$ref": "#/$defs/FractionNonnegative"
        }
      ]
    },
    "NumberPositive": {
      "description": "A strictly positive bare JSON number or a strictly positive exact Fraction pair.",
      "oneOf": [
        {
          "type": "number",
          "exclusiveMinimum": 0
        },
        {
          "$ref": "#/$defs/FractionPositive"
        }
      ]
    },
    "FractionNonnegative": {
      "type": "array",
      "description": "A Fraction, read and written as Fraction says, whose numerator is non-negative.",
      "minItems": 2,
      "maxItems": 2,
      "prefixItems": [
        {
          "type": "integer",
          "minimum": 0,
          "description": "Numerator, non-negative integer"
        },
        {
          "type": "integer",
          "minimum": 1
        }
      ],
      "items": false
    },
    "FractionPositive": {
      "type": "array",
      "description": "A Fraction, read and written as Fraction says, whose numerator is strictly positive.",
      "minItems": 2,
      "maxItems": 2,
      "prefixItems": [
        {
          "type": "integer",
          "minimum": 1,
          "description": "Numerator, positive integer"
        },
        {
          "type": "integer",
          "minimum": 1
        }
      ],
      "items": false
    },
    "Region": {
      "type": "object",
      "description": "A region of a timeline, from start to end on the timeline's own axis. An atomic section of a timeline's flow is a region stating the class `https://timetoalign.github.io/timetoshare/ns#AtomicSection` in its `type` statement, written as a compact IRI under a prefix the context declares for that namespace (`tts:AtomicSection`), with its letter as `name` and a provenance entry of method `inferred` for that pair. The atomic sections are the intervals between consecutive boundaries of the timeline's flow control: 0, the timeline's length, the coordinates of its jumps, jump targets, breaks and section breaks, and the places of all destinations but those with `by` 0. They are lettered in the order of the axis. A timeline without flow control has none.",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The region ID."
        },
        "name": {
          "$ref": "#/$defs/Name"
        },
        "start": {
          "$ref": "#/$defs/Number"
        },
        "end": {
          "$ref": "#/$defs/Number"
        },
        "meta": {
          "$ref": "#/$defs/Meta"
        },
        "statements": {
          "$ref": "#/$defs/Statements",
          "description": "Property\u2013value pairs about the thing this region is the axis of: this recording, this edition, this encoding."
        },
        "provenance": {
          "$ref": "#/$defs/Provenance",
          "description": "The provenance of this element's pairs: of a stated pair, how it was stated and who believes it; of a pair held only here, a candidate never stated."
        }
      },
      "required": [
        "id",
        "start",
        "end"
      ]
    },
    "FlowControlElement": {
      "type": "object",
      "description": "One element of a timeline's flow control, at a coordinate on the timeline's own axis, from 0 to the timeline's length where that is known (checked after the schema). Its `role` names what it is. A `jump` is where the flow may leave for another place: it holds one or more destinations (`targets`), and when the flow plays up to its coordinate, a destination that holds is taken; where none holds, the flow goes on. Flow control holds across descendants: a root and all its descendants have at most one jump at a position on the root's axis, each coordinate carried to the root by adding the offsets of its ancestors (checked after the schema); several signs at one place, such as a repeat end and a dal segno on one barline, are destinations of that one jump. A `jump_target` is a place a destination names; nothing happens there. A `break` is where the flow never goes on: when the flow plays up to it, a destination that holds of the jump at the same coordinate is taken, otherwise the flow ends there. A break with `ends` is a break only while that condition holds, as a Fine ends the flow only after the da capo or dal segno it names; a break without `ends` always is one. A break stands between adjacent volta brackets, and a bracket is left only by a jump at its end whose destination holds. A `section_break` ends a section, a movement included, and the flow goes on across it: no atomic section spans it; a destination without a place lands at the nearest section break before its jump, else at the timeline's start; and a flow that has ended at a break begins again at the nearest section break at or after that break, where there is one before the timeline's end. A `barline` marks a position and has no effect on the flow. An element acts when the flow plays up to its coordinate, never when a destination lands on it. The earlier form of flow control, the key `type` with the values `jump_from`, `jump_to` and `flow_marker` and the key `target`, is refused.",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The element ID."
        },
        "role": {
          "type": "string",
          "enum": [
            "jump",
            "jump_target",
            "break",
            "section_break",
            "barline"
          ],
          "description": "What the element is: a jump, a jump target, a break, a section break or a barline. It decides which of `targets`, `manifestation` and `ends` the element may carry."
        },
        "coordinate": {
          "$ref": "#/$defs/Number",
          "description": "Where the element lies on the timeline's own axis."
        },
        "targets": {
          "type": "array",
          "description": "The destinations of a jump, one or more, at distinct places (checked after the schema): no two with the same `to`, the same `by`, or both without a place. They carry no order. Carried by a jump only.",
          "items": {
            "$ref": "#/$defs/JumpDestination"
          },
          "minItems": 1
        },
        "manifestation": {
          "type": "string",
          "description": "How the element is notated, a word of an open vocabulary: a jump target is a `repeat_start`, a `segno`, a `coda`, a `volta` or an `ossia`; a break a `fine` or a `volta`; a barline a `double_barline` or a `final_barline`; no word is defined for a section break. Another word is valid and kept, and the TimeToShare validators report it as unknown. The manifestation never decides the flow. A jump carries none: each of its destinations has its own."
        },
        "ends": {
          "$ref": "#/$defs/BreakCondition",
          "description": "The condition under which a break ends the flow; absent, the break always holds. Carried by a break only."
        },
        "name": {
          "$ref": "#/$defs/Name"
        },
        "label": {
          "type": [
            "string",
            "null"
          ],
          "description": "The text the element is drawn with, or null. On a jump it labels the jump once, never each of its arcs, which take the labels of their destinations.",
          "default": null
        },
        "meta": {
          "$ref": "#/$defs/Meta"
        },
        "provenance": {
          "type": "array",
          "items": {
            "$ref": "provenance.schema.json"
          },
          "minItems": 1,
          "description": "The provenance of this element: how it was made (`imported` by a loader, `manual` where a person added it, `inferred`) and who believes it. A repair adds elements and rejects elements, never deletes or changes one: an element some actor believes `false` is rejected, and a reader computing a flow leaves it out."
        }
      },
      "required": [
        "id",
        "role",
        "coordinate"
      ],
      "if": {
        "properties": {
          "role": {
            "const": "jump"
          }
        },
        "required": [
          "role"
        ]
      },
      "then": {
        "required": [
          "targets"
        ],
        "properties": {
          "manifestation": {
            "not": {}
          },
          "ends": {
            "not": {}
          }
        }
      },
      "else": {
        "properties": {
          "targets": {
            "not": {}
          }
        },
        "if": {
          "properties": {
            "role": {
              "const": "break"
            }
          },
          "required": [
            "role"
          ]
        },
        "else": {
          "properties": {
            "ends": {
              "not": {}
            }
          }
        }
      }
    },
    "JumpDestination": {
      "type": "object",
      "description": "One destination of a jump: a place and the conditions under which it is taken. Every key is optional. The place is `to`, `by` or neither, never both: without either, the destination lands at the start of the section its jump lies in, the nearest section break before the jump, else the timeline's start. The conditions are `passes`, `repeat_count`, `after` and `determined`; the destination holds when all that are present hold, and one without any condition is taken every time the flow plays up to its jump, so a repeat end, a da capo and a dal segno state `repeat_count` 1. Where several destinations of a jump hold at once, one with `by` 0 never competes; of the others, one lying before the jump that restores (`reset`) is taken first, then one lying before the jump that does not, then one lying ahead, the nearest of its kind in each case; two of one kind holding together are ambiguous, which a reader computing the flow reports. So a repeat end and a dal segno on one barline play the repeat first and the dal segno after it.",
      "properties": {
        "to": {
          "$ref": "#/$defs/Id",
          "description": "The place as an element: the ID of a jump target of the same timeline, of a region of it (its start), of a child timeline of it (its start on this axis) or of the timeline itself (its start); checked after the schema."
        },
        "by": {
          "$ref": "#/$defs/Number",
          "description": "The place as a signed distance from the jump's coordinate on the same axis, in the axis's number type; the place lies from 0 to the timeline's length (checked after the schema). A distance of 0 is going on and no jump: it is written where the source prints it, as the numbers of a first volta bracket, and is never taken."
        },
        "passes": {
          "$ref": "#/$defs/Passes",
          "description": "The passes on which the destination holds, the n-th arrival of the flow at the jump being pass n. Beyond the highest number any destination of the jump names in a list, the destination naming that number holds, as the last volta bracket does after a da capo without repeats; this holds for the destinations of a jump only, never for the `ends` of a break."
        },
        "repeat_count": {
          "type": "integer",
          "minimum": 1,
          "description": "How many times the destination is taken at most."
        },
        "after": {
          "$ref": "#/$defs/DestinationReference",
          "description": "A destination of another jump: this destination holds once that one has been taken, and the condition is used up when this one is taken, as a To Coda holds after its dal segno al coda."
        },
        "determined": {
          "type": "boolean",
          "description": "Whether the source decides when the destination is taken. `false` marks a choice nobody can check, such as an ossia, whose jump has the main text as its determined destination; a reader computing a flow never takes it.",
          "default": true
        },
        "reset": {
          "type": "boolean",
          "description": "Whether taking the destination, where it lies before its jump, restores every jump and break lying wholly inside the stretch gone back over (its coordinate and all its places from the destination's place up to, but not at, the jump's coordinate): their passes, the times their destinations were taken and their `after` conditions start again, as a repeat plays an inner repeat again. `false` on a da capo or a dal segno states that the repeats are not played again (senza repetizione). A repeat sign that closes a volta bracket other than the first is written with `false` too: taken with the default it would restore the jump before the brackets wherever all that jump's places lie before the sign, the passes of that jump would start again, and the later passes would never be reached.",
          "default": true
        },
        "manifestation": {
          "type": "string",
          "description": "How the destination is notated, a word of an open vocabulary: `repeat_end`, `da_capo`, `da_capo_al_fine`, `da_capo_al_coda`, `dal_segno`, `dal_segno_al_fine`, `dal_segno_al_coda`, `to_coda`, `volta` or `ossia`. Another word is valid and kept, and the TimeToShare validators report it as unknown. The manifestation never decides the flow."
        },
        "label": {
          "type": [
            "string",
            "null"
          ],
          "description": "The text the destination's arc is drawn with, or null: an arc without one has no label, never the destination's `manifestation`, which the drawing shows as a symbol, nor the label of its jump.",
          "default": null
        }
      },
      "not": {
        "required": [
          "to",
          "by"
        ]
      }
    },
    "Passes": {
      "description": "Passes, counted from 1: a list of distinct positive integers, or `{from: n}` for pass n and every later one.",
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 1
          },
          "minItems": 1,
          "uniqueItems": true
        },
        {
          "type": "object",
          "properties": {
            "from": {
              "type": "integer",
              "minimum": 1
            }
          },
          "required": [
            "from"
          ]
        }
      ]
    },
    "DestinationReference": {
      "type": "object",
      "description": "One destination of a jump of the same timeline, named without an ID of its own: the jump's ID and the destination's place, `to` or `by` as that destination writes it. Neither names the destination without a place, or the one destination of a jump that has no other. That it names exactly one destination of another jump is checked after the schema.",
      "properties": {
        "jump": {
          "$ref": "#/$defs/Id",
          "description": "The ID of the jump."
        },
        "to": {
          "$ref": "#/$defs/Id",
          "description": "The `to` of the destination meant."
        },
        "by": {
          "$ref": "#/$defs/Number",
          "description": "The `by` of the destination meant, compared by value."
        }
      },
      "required": [
        "jump"
      ],
      "not": {
        "required": [
          "to",
          "by"
        ]
      }
    },
    "BreakCondition": {
      "type": "object",
      "description": "The condition under which a break ends the flow: `passes`, the arrivals of the flow at the break, and `after`, a destination that has been taken; where both are present both must hold. At least one of the two is stated. The passes of a break mean exactly the arrivals listed, or with `from` that arrival and every later one: what holds for the destinations of a jump, that the one naming the highest number holds on every later pass too, does not hold for a break.",
      "properties": {
        "passes": {
          "$ref": "#/$defs/Passes",
          "description": "The arrivals of the flow at the break on which the break ends the flow, the n-th arrival being pass n: exactly those listed, or with `from` that arrival and every later one."
        },
        "after": {
          "$ref": "#/$defs/DestinationReference"
        }
      },
      "minProperties": 1,
      "anyOf": [
        {
          "required": [
            "passes"
          ]
        },
        {
          "required": [
            "after"
          ]
        }
      ]
    },
    "FlowMap": {
      "type": "object",
      "description": "A FlowMap: one order in which stretches of one root timeline are played, a concrete flow where flow control states what a source affords. It needs no flow control: a reading, an order of movements or a set list is a FlowMap written by hand. Applying it to its timeline gives a virtual timeline (`VirtualTimeline`) whose axis starts at 0 with the first chunk and is as long as its chunks and gaps together.",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The FlowMap ID."
        },
        "timeline": {
          "$ref": "#/$defs/Id",
          "description": "The ID of the one root timeline whose stretches the chunks are; checked after the schema."
        },
        "chunks": {
          "type": "array",
          "description": "The chunks in the order they are played, never reordered by a writer. Each is the ID of an element giving an interval inside the tree of `timeline` (a region or a child timeline at any depth, or a virtual timeline of a timeline of that tree; checked after the schema) or a gap, `{gap: length}`, a stretch of strictly positive length that nothing of the timeline fills, in the timeline's number type. An element may occur any number of times.",
          "items": {
            "oneOf": [
              {
                "$ref": "#/$defs/Id"
              },
              {
                "$ref": "#/$defs/Gap"
              }
            ]
          }
        },
        "convention": {
          "type": "string",
          "description": "Which flow of the timeline's flow control the FlowMap states, a word of an open vocabulary: `default`, every repeat and leap played as written; `single`, each stretch played once, without going back; `printed`, the atomic sections in the order of the axis. Another word is valid and kept, and the TimeToShare validators report it as unknown. Absent on a FlowMap that follows none, such as one written by hand."
        },
        "canonical": {
          "type": "boolean",
          "description": "Whether this is the canonical FlowMap of its timeline; at most one FlowMap of a timeline is (checked after the schema).",
          "default": false
        },
        "name": {
          "$ref": "#/$defs/Name"
        },
        "provenance": {
          "type": "array",
          "items": {
            "$ref": "provenance.schema.json"
          },
          "minItems": 1,
          "description": "The provenance of this FlowMap: how it was made and who believes it. A FlowMap computed from the flow control of its timeline, which states the `convention` it follows, carries an entry of method `inferred`, as the atomic sections it plays do; one written by hand an entry of method `manual`."
        }
      },
      "required": [
        "id",
        "timeline",
        "chunks"
      ]
    },
    "Gap": {
      "type": "object",
      "description": "A gap of a FlowMap: a stretch of the given strictly positive length that nothing of the timeline fills.",
      "properties": {
        "gap": {
          "$ref": "#/$defs/NumberPositive",
          "description": "The length of the gap on the timeline's axis."
        }
      },
      "required": [
        "gap"
      ]
    },
    "VirtualTimeline": {
      "type": "object",
      "description": "A virtual timeline: the statement that a map was applied to a timeline, giving a timeline with its own ID. Nothing else of it is written; positions on it and on the timeline it comes from convert through the map in both directions. It holds no children, flow control or offset. Its unit, number type and length are always stated, so that a reader evaluating no map can still use the axis.",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The virtual timeline's ID."
        },
        "map": {
          "$ref": "#/$defs/Id",
          "description": "The ID of the map applied: a FlowMap or a conversion map of the manifest; checked after the schema. A FlowMap is applied within the tree of its own root timeline: unless `through` is stated, the timeline this virtual timeline comes from lies in that tree (checked after the schema)."
        },
        "timeline": {
          "$ref": "#/$defs/Id",
          "description": "The ID of the timeline the map is applied to: a timeline of the manifest at any depth, or another virtual timeline; checked after the schema. Virtual timeline by virtual timeline, a virtual timeline comes from a timeline of the manifest: none comes from itself through others (checked after the schema)."
        },
        "unit": {
          "$ref": "#/$defs/TimeUnit"
        },
        "number_type": {
          "$ref": "#/$defs/NumberType",
          "description": "The number type of the virtual timeline's axis, admitted by its unit as a timeline's is."
        },
        "length": {
          "$ref": "#/$defs/NumberNonnegative",
          "description": "The end of the virtual timeline on its own axis, in its number type. Where `map` is a FlowMap and no `through` is stated, it is the sum of the FlowMap's chunks and gaps. The TimeToShare validators compare the two by exact value where every chunk has a known length on an axis of this unit and number type (a region on its timeline's axis, a child timeline and a virtual timeline on their own, a gap on the axis of the FlowMap's timeline), and never on a `float` axis, where a sum depends on the order of its additions."
        },
        "through": {
          "$ref": "#/$defs/Id",
          "description": "The ID of the group or conversion map that carries the map to `timeline`, where the map's own elements do not lie on that timeline. Where it is stated, no rule reads how the map reaches the timeline, nor the length."
        },
        "name": {
          "$ref": "#/$defs/Name"
        }
      },
      "required": [
        "id",
        "map",
        "timeline",
        "unit",
        "number_type",
        "length"
      ],
      "if": {
        "properties": {
          "unit": {
            "enum": [
              "ticks",
              "samples",
              "frames",
              "pixels"
            ]
          }
        },
        "required": [
          "unit"
        ]
      },
      "then": {
        "properties": {
          "number_type": {
            "const": "int"
          }
        }
      },
      "else": {
        "if": {
          "properties": {
            "unit": {
              "const": "number"
            }
          },
          "required": [
            "unit"
          ]
        },
        "else": {
          "properties": {
            "number_type": {
              "enum": [
                "float",
                "fraction"
              ]
            }
          }
        }
      }
    },
    "Order": {
      "type": "array",
      "description": "One order of `graphical.order`, top to bottom, never reordered by a writer: a group's display order, a permutation of its members' IDs (each written as every ID is, `#` followed by the ID), or a timeline's band order, `line` (the timeline's own line) and any of its five facets `markers`, `conversion_maps`, `children`, `regions` and `flow_control`, each drawn as a band. A band order lists `line`; a facet it leaves out keeps the side of `line` it has in the order the timeline follows without an entry (its parent's, for a root the default band order) and lies on that side beyond the listed facets, in that order's sequence.",
      "items": {
        "type": "string",
        "minLength": 1,
        "not": {
          "pattern": "[\\u0000-\\u001f]"
        }
      },
      "uniqueItems": true
    },
    "Rule": {
      "type": "object",
      "description": "One rule: the elements it selects and the properties it sets on them, as a declaration or as the name of a style.",
      "properties": {
        "select": {
          "$ref": "#/$defs/Selector"
        },
        "set": {
          "oneOf": [
            {
              "$ref": "#/$defs/Declaration"
            },
            {
              "type": "string",
              "description": "The name of a style of the same `graphical` object's `styles`."
            }
          ]
        }
      },
      "required": [
        "select",
        "set"
      ]
    },
    "Selector": {
      "type": "object",
      "description": "An element matches when it matches every member present. The empty selector matches every element.",
      "properties": {
        "element": {
          "$ref": "#/$defs/ElementType"
        },
        "addresses": {
          "type": "array",
          "description": "Addresses (`Address`); the element's address must equal one of them as a whole object, so every drawing of the element matches.",
          "items": {
            "$ref": "#/$defs/Address"
          },
          "minItems": 1,
          "uniqueItems": true
        },
        "domain": {
          "type": "string",
          "enum": [
            "graphical",
            "logical",
            "physical"
          ],
          "description": "The domain of the element: what its time measures (graphical space, musical time, physical time)."
        },
        "modality": {
          "type": "string",
          "enum": [
            "continuous",
            "discrete"
          ],
          "description": "Whether the element is continuous or discrete."
        },
        "class": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "ContinuousLogicalTimeline",
                "ContinuousPhysicalTimeline",
                "ContinuousGraphicalTimeline",
                "DiscreteLogicalTimeline",
                "DiscretePhysicalTimeline",
                "DiscreteGraphicalTimeline",
                "ChainMap",
                "CombinationMap",
                "ConstantMap",
                "FloatingMeasureMap",
                "LinearMap",
                "MeasureBeatMap",
                "MeasureNumberMap",
                "MeasureRecordMap",
                "PiecewiseMap",
                "TableMap"
              ]
            },
            {
              "$ref": "#/$defs/Iri"
            }
          ],
          "description": "The class of the element: the timeline class its unit decides, or a conversion map's type; or the IRI of a class, compact or full, which matches a region whose `type` statement names that class and no other element. The two are compared expanded: in a selector the prefix `tts` stands for the format's namespace `https://timetoalign.github.io/timetoshare/ns#`, another compact IRI is expanded by the manifest's `@context`, whose prefix the validators check after the schema (`iri`), a full IRI is itself. So `tts:AtomicSection` selects the atomic sections."
        },
        "facet": {
          "$ref": "#/$defs/Facet",
          "description": "A facet: the element must be the band drawing that facet."
        },
        "within": {
          "$ref": "#/$defs/Id",
          "description": "A timeline ID: the element must belong to that timeline or to one of its descendants."
        },
        "inside": {
          "$ref": "#/$defs/ElementType",
          "description": "An element type: the element must be held, at any depth, by an element of that type in the drawing's element tree."
        },
        "coordinates": {
          "type": "string",
          "enum": [
            "primary",
            "secondary"
          ],
          "description": "Coordinates of a stamp: the element must belong to a stamp's primary coordinate (`primary`) or to one of its secondary coordinates (`secondary`). An element that belongs to no coordinate of a stamp matches neither."
        }
      }
    },
    "ElementType": {
      "type": "string",
      "description": "The type of an element of the drawing. Four types are the boxes, the containers of the drawing, each drawing a semantic container: the `block`, the whole drawing, draws the bundle; a `frame` draws a group; a `card` draws a timeline, one card per group that has the timeline as a member and one for an ungrouped root or a placed virtual timeline that is a member of no group, and an `ancestor_card` is the card of the root of a member that is a child timeline, drawn whole behind the frame of that member's group at the proportions of the root's own axis, shown unless a rule hides it; a `band` draws one facet of a timeline and holds what the timeline has of that facet, drawing nothing of its own; a root's flow control band lays out the flow control of the root's whole tree. The others are content and keep their semantic names: a root timeline's line (`timeline`, a group member's or an ungrouped root's, a virtual timeline's included), a child timeline's line at any depth (`child`), a conversion map (`map`), a region (`region`, also the brace of a chunk of a virtual timeline or of a switched card), a break, a section break and a barline (`break`, `section_break`, `barline`, each a vertical line at its coordinate), a jump (`jump`, its arcs: one arc per destination whose place is not `by` 0, from the jump's coordinate to that place, hidden by default, and none for a destination whose manifestation is `volta`, which its fork shows; an arc is labelled with its destination's `label` alone, and the jump's own `name`, ID and `label` label the jump once, never each of its arcs, as its `label-display` lists them; no arc is drawn to a place that a `to` names where the element named is rejected, as a destination of a rejected jump may name one), the symbol of a flow-control element (`symbol`, the music-font glyphs of its manifestation or of its destinations' manifestations on the flow row; a jump target draws its symbol alone), a volta fork (`fork`, one per jump with destinations whose manifestation is `volta`, a stem splitting into one arrow per such destination, the first straight on and each further one bent further away from the line, each with its passes as text), a leader line (`leader`, the thin line joining a label moved to a further tier to its element), a wedge (a coordinate marker of a named timestamp of any timeline), a name in the name column (or the title of a group or of the manifest), any other text label, a segment's boundary tick on its segment line, or the tick where a chunk of a virtual timeline or of a switched card starts (`boundary`), a cross-section line (`cross_section`), the vertical line of a named timestamp across its timeline's line, children band and conversion-maps band and, for a member that is a child timeline, its ancestor lines, the line of an alignment anchor of a named MatchStamp (`alignment_anchor`, the shortest line between the cross-section lines of its two timestamps), an ancestor line of a member that is a child timeline (`ancestor`), the gap of an elision (`elision`), held by the line of the timeline the elision lies on, or by a group's frame where that timeline lies in the group, and the ellipsis of an elision, one centred in each drawing of its gap (`ellipsis`); an elision's ellipsis and labels are held by its gap, its labels as `label` elements.",
      "enum": [
        "block",
        "timeline",
        "child",
        "band",
        "map",
        "region",
        "break",
        "section_break",
        "barline",
        "jump",
        "wedge",
        "name",
        "label",
        "boundary",
        "ancestor",
        "frame",
        "card",
        "cross_section",
        "alignment_anchor",
        "ancestor_card",
        "elision",
        "ellipsis",
        "symbol",
        "fork",
        "leader"
      ]
    },
    "Paint": {
      "type": "string",
      "description": "A colour as #RRGGBB with upper-case hexadecimal digits, or none.",
      "pattern": "^(#[0-9A-F]{6}|none)$",
      "not": {
        "pattern": "[\\u0000-\\u001f]"
      }
    },
    "Declaration": {
      "type": "object",
      "description": "Presentation properties. Where SVG has the property, it carries SVG's name; content, max-width, rotation, shadow, label-display, flow and the four elision properties are TimeToShare's own. An element reads only the properties its type reads; the others are ignored.",
      "properties": {
        "stroke": {
          "$ref": "#/$defs/Paint"
        },
        "stroke-width": {
          "type": "number",
          "minimum": 0
        },
        "stroke-dasharray": {
          "type": "string",
          "description": "none, or non-negative decimal numbers separated by single spaces.",
          "pattern": "^(none|(0|[1-9][0-9]*)(\\.[0-9]+)?( (0|[1-9][0-9]*)(\\.[0-9]+)?)*)$",
          "not": {
            "pattern": "[\\u0000-\\u001f]"
          }
        },
        "fill": {
          "$ref": "#/$defs/Paint"
        },
        "opacity": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "font-size": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "rx": {
          "type": "number",
          "minimum": 0
        },
        "display": {
          "type": "string",
          "enum": [
            "inline",
            "none"
          ]
        },
        "content": {
          "type": "string"
        },
        "max-width": {
          "oneOf": [
            {
              "type": "number",
              "exclusiveMinimum": 0
            },
            {
              "const": "none"
            }
          ]
        },
        "rotation": {
          "type": "integer",
          "minimum": -180,
          "maximum": 180,
          "description": "Degrees a wedge is turned about its tip, from the outward direction to the direction of its base; a negative rotation turns its base to the left and a positive one to the right, whichever side of the line its band lies on."
        },
        "shadow": {
          "$ref": "#/$defs/Paint"
        },
        "elision-mode": {
          "type": "string",
          "enum": [
            "auto",
            "full",
            "proportional",
            "custom"
          ],
          "description": "Which elisions the cards of a root draw (read by a card and an ancestor card; a frame reads it too, for the elisions drawn across it): `full` none, `proportional` the elisions the drawing derives, `custom` the stored ones, and `auto` the stored ones where the root has any, else the derived ones."
        },
        "elision-proportion": {
          "oneOf": [
            {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 1
            },
            {
              "const": "auto"
            }
          ],
          "description": "The proportion at which the derived elisions are drawn, greater than 0 and at most 1, or `auto` for the one the drawing computes from its view."
        },
        "elision-depths": {
          "type": "string",
          "description": "`auto`, or the depths below the root whose timelines the derived elisions lie on, as positive integers separated by single spaces (the root's depth is 1); the order and a repeated depth carry no meaning.",
          "pattern": "^(auto|[1-9][0-9]*( [1-9][0-9]*)*)$",
          "not": {
            "pattern": "[\\u0000-\\u001f]"
          }
        },
        "elision-display": {
          "type": "string",
          "description": "What the derived elisions draw besides their gaps: `none`, or the words of an elision's `display` separated by single spaces; the order and a repeated word carry no meaning.",
          "pattern": "^(none|(ellipsis|name|id|coordinate|continuation)( (ellipsis|name|id|coordinate|continuation))*)$",
          "not": {
            "pattern": "[\\u0000-\\u001f]"
          }
        },
        "flow": {
          "$ref": "#/$defs/Id",
          "description": "The flow a card of a timeline is drawn in: the ID of a FlowMap of that timeline, or of a virtual timeline applying such a FlowMap to that timeline without `through`; the card is then drawn on the FlowMap's played axis, and a frame holding it with every member carried through the group. Absent, the card is drawn as written. Read by a card alone, and only from a rule of the manifest's own `rules` whose selector names `addresses` alone, each the address of a timeline's cards; a style never sets it. Checked after the schema."
        },
        "label-display": {
          "type": "string",
          "description": "Which labels a flow-control element draws (read by a break, a section break, a barline and a jump): `none`, or words from `name` (its name), `id` (its ID) and `label` (its own label, and on a jump also the labels of its arcs, each its destination's label) separated by single spaces; the order and a repeated word carry no meaning. Initially `name label`.",
          "pattern": "^(none|(name|id|label)( (name|id|label))*)$",
          "not": {
            "pattern": "[\\u0000-\\u001f]"
          }
        }
      }
    },
    "MapBase": {
      "type": "object",
      "description": "What every conversion map carries: its type, its ID, its name, and the units of the axes it converts from and to, either null where that side is not a time axis. Each map type adds its own members.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The map type, which each map definition fixes."
        },
        "id": {
          "$ref": "#/$defs/Id",
          "description": "The map ID."
        },
        "name": {
          "$ref": "#/$defs/Name"
        },
        "source_unit": {
          "anyOf": [
            {
              "$ref": "#/$defs/TimeUnit"
            },
            {
              "type": "null"
            }
          ],
          "description": "The unit of the axis the map converts from, or null. Where stated, it is the unit of the timeline the map is attached to, or the source unit of the map holding it, as `ConversionMap` states."
        },
        "target_unit": {
          "anyOf": [
            {
              "$ref": "#/$defs/TimeUnit"
            },
            {
              "type": "null"
            }
          ],
          "description": "The unit of the axis the map converts to, or null."
        }
      },
      "required": [
        "type",
        "id",
        "source_unit",
        "target_unit"
      ]
    },
    "LinearMap": {
      "type": "object",
      "description": "Maps x to scalar \u00b7 x + offset. Scaling, shifting and every conversion between two units of fixed ratio (quarters to ticks at a resolution, samples to seconds at a sample rate) are linear maps.",
      "allOf": [
        {
          "$ref": "#/$defs/MapBase"
        }
      ],
      "properties": {
        "type": {
          "const": "LinearMap"
        },
        "scalar": {
          "$ref": "#/$defs/Number",
          "description": "The factor x is multiplied by.",
          "default": 1
        },
        "offset": {
          "$ref": "#/$defs/Number",
          "description": "What is added to the product.",
          "default": 0
        }
      },
      "required": [
        "type"
      ]
    },
    "TableMap": {
      "type": "object",
      "description": "Maps x by interpolating between anchor pairs (x_values[i], y_values[i]). The two arrays have equal length, at least two, and x_values increase strictly; both are checked after the schema.",
      "allOf": [
        {
          "$ref": "#/$defs/MapBase"
        }
      ],
      "properties": {
        "type": {
          "const": "TableMap"
        },
        "x_values": {
          "type": "array",
          "description": "The anchor positions, strictly increasing.",
          "items": {
            "$ref": "#/$defs/Number"
          },
          "minItems": 2
        },
        "y_values": {
          "type": "array",
          "description": "The value at each anchor, one per x value.",
          "items": {
            "$ref": "#/$defs/Number"
          },
          "minItems": 2
        },
        "kind": {
          "type": "string",
          "enum": [
            "linear",
            "previous"
          ],
          "description": "How a position between two anchors reads: linear interpolates between their values, previous takes the value of the last anchor at or before x.",
          "default": "linear"
        },
        "extrapolate": {
          "type": "string",
          "enum": [
            "none",
            "constant",
            "linear"
          ],
          "description": "How a position outside the anchors reads: none leaves it undefined, constant takes the value of the nearest anchor, linear continues the first or the last segment between two anchors.",
          "default": "none"
        }
      },
      "required": [
        "type",
        "x_values",
        "y_values"
      ]
    },
    "ConstantMap": {
      "type": "object",
      "description": "Maps every x to one value, a Number or a string such as a label or a file name.",
      "allOf": [
        {
          "$ref": "#/$defs/MapBase"
        }
      ],
      "properties": {
        "type": {
          "const": "ConstantMap"
        },
        "value": {
          "description": "The value of every input.",
          "anyOf": [
            {
              "$ref": "#/$defs/Number"
            },
            {
              "type": "string"
            }
          ]
        }
      },
      "required": [
        "type",
        "value"
      ]
    },
    "PiecewiseMap": {
      "type": "object",
      "description": "Maps x by the map of the interval holding it: maps[i] reads every x in [breaks[i], breaks[i+1]), and a position outside [breaks[0], the last break) is undefined. There is one map fewer than breaks, and the breaks increase strictly; both are checked after the schema.",
      "allOf": [
        {
          "$ref": "#/$defs/MapBase"
        }
      ],
      "properties": {
        "type": {
          "const": "PiecewiseMap"
        },
        "breaks": {
          "type": "array",
          "description": "The interval bounds, strictly increasing.",
          "items": {
            "$ref": "#/$defs/Number"
          },
          "minItems": 2
        },
        "maps": {
          "type": "array",
          "description": "One map per interval, in the order of the intervals.",
          "items": {
            "$ref": "#/$defs/ConversionMap"
          }
        }
      },
      "required": [
        "type",
        "breaks",
        "maps"
      ]
    },
    "ChainMap": {
      "type": "object",
      "description": "Maps x through its maps in turn, the first applied first: each map reads the value the one before it gives.",
      "allOf": [
        {
          "$ref": "#/$defs/MapBase"
        }
      ],
      "properties": {
        "type": {
          "const": "ChainMap"
        },
        "maps": {
          "type": "array",
          "description": "The maps in the order they apply.",
          "items": {
            "$ref": "#/$defs/ConversionMap"
          },
          "minItems": 1
        }
      },
      "required": [
        "type",
        "maps"
      ]
    },
    "CombinationMap": {
      "type": "object",
      "description": "Maps x to several named outputs at once, each the value one map gives for x: a measure number with its beat, or a pixel position with the file name of its image. The outputs carry no order.",
      "allOf": [
        {
          "$ref": "#/$defs/MapBase"
        }
      ],
      "properties": {
        "type": {
          "const": "CombinationMap"
        },
        "maps": {
          "type": "object",
          "description": "The map of each output, keyed by the output's name.",
          "additionalProperties": {
            "$ref": "#/$defs/ConversionMap"
          }
        }
      },
      "required": [
        "type",
        "maps"
      ]
    },
    "MeasureView": {
      "type": "object",
      "description": "What every measure view carries beside the map base: its source unit, quarters, and the ID of the MeasureMap it reads. Each view adds its type, its target unit and its function.",
      "allOf": [
        {
          "$ref": "#/$defs/MapBase"
        }
      ],
      "properties": {
        "source_unit": {
          "const": "quarters",
          "description": "Quarters, the unit of every MeasureMap position."
        },
        "measure_map": {
          "$ref": "#/$defs/Id",
          "description": "The ID of the MeasureMap the view reads, an entry of the manifest's `measure_maps`; checked after the schema."
        }
      },
      "required": [
        "measure_map"
      ]
    },
    "MeasureRecordMap": {
      "type": "object",
      "description": "Maps a position x in quarters to the record of the measure holding it: the row of the MeasureMap that holds x, with every member its decompressed form carries.",
      "allOf": [
        {
          "$ref": "#/$defs/MeasureView"
        }
      ],
      "properties": {
        "type": {
          "const": "MeasureRecordMap"
        },
        "target_unit": {
          "const": null,
          "description": "Null: the output is not a position on a time axis."
        }
      },
      "required": [
        "type"
      ]
    },
    "MeasureNumberMap": {
      "type": "object",
      "description": "Maps a position x in quarters to the number of the measure holding it: the `number` of the row of the MeasureMap that holds x, or the row's `count` where the row states no number.",
      "allOf": [
        {
          "$ref": "#/$defs/MeasureView"
        }
      ],
      "properties": {
        "type": {
          "const": "MeasureNumberMap"
        },
        "target_unit": {
          "const": null,
          "description": "Null: the output is not a position on a time axis."
        }
      },
      "required": [
        "type"
      ]
    },
    "FloatingMeasureMap": {
      "type": "object",
      "description": "Maps a position x in quarters to floating measures, a measure ordinal followed by how far into that bar x lies (12.5 is the middle of the twelfth bar). A floating measure is a run of adjacent rows of the MeasureMap that make one notated bar; a single row is a run of one. A row joins the run before it when the two do not state different voltas and either it has the same number as the run's last row, its next, its nominal_length and its offset_within_measure playing no part; or both rows have a number, it has the last row's nominal_length, and it completes the bar the run leaves incomplete: the run's end (its first row's offset_within_measure plus its rows' actual_length) lies below that nominal_length, the row's offset_within_measure equals the end, and the end plus the row's actual_length equals the nominal_length (a split bar whose two parts carry two numbers). The rows of a split bar thus read as that one bar, also where its metre changes inside the bar and where its first part ends a repeat and jumps back; rows without a number never join, and the endings under different volta brackets, which by convention carry one number (16a and 16b), count through as separate floating measures. The MeasureMap gives the knots: one per floating measure, at the nominal downbeat of its first row, that row's qstamp minus its offset_within_measure, so the content of an incomplete bar sits where it is notated (a pickup of one eighth in 9/8 begins at 0.888); and a last knot at the end of the last row, its qstamp plus its actual_length. A knot carries the ordinal of its floating measure, the last knot the ordinal after the last one's. Ordinals count floating measures, never measure numbers: the first is 0 when it is an anacrusis (its first row has an offset_within_measure above 0, and its rows' actual_length together lie below that row's nominal_length) and 1 otherwise, and every following floating measure adds one, through voltas and without reset. Between two knots the map is linear, so the reading of a floating measure of several rows spreads over all of them, and beyond the first and the last knot it continues the first and the last segment. A reading is truncated, never rounded, to three decimals, the resolution of floating measures. A MeasureMap whose knots do not strictly increase (rows that cannot join sharing a nominal downbeat) has no floating measures. Rows that do not add up to their bars (a run longer than its nominal_length, an incomplete bar inside the piece) are read as they are stated; warning about them is a matter of the implementation, not of the format.",
      "allOf": [
        {
          "$ref": "#/$defs/MeasureView"
        }
      ],
      "properties": {
        "type": {
          "const": "FloatingMeasureMap"
        },
        "target_unit": {
          "const": "floating_measures",
          "description": "Floating measures."
        }
      },
      "required": [
        "type"
      ]
    },
    "MeasureBeatMap": {
      "type": "object",
      "description": "Maps a position x in quarters to the pair of the measure number and the beat: the `number` of the row of the MeasureMap that holds x, or the row's `count` where the row states no number, and 1 plus the distance in quarters from that row's qstamp to x. Beats are 1-indexed and counted in quarters: beat 1 is the row's start, and a position halfway through its second quarter is beat 5/2.",
      "allOf": [
        {
          "$ref": "#/$defs/MeasureView"
        }
      ],
      "properties": {
        "type": {
          "const": "MeasureBeatMap"
        },
        "target_unit": {
          "const": null,
          "description": "Null: the output is not a position on a time axis."
        }
      },
      "required": [
        "type"
      ]
    },
    "Context": {
      "type": "object",
      "description": "The inline JSON-LD 1.1 context that makes the manifest a YAML-LD document: the format's terms, each exactly as given here, and the prefixes the manifest's statements and provenance use, each an absolute IRI ending in `/` or `#`. Nothing is fetched.",
      "properties": {
        "@version": {
          "const": 1.1
        },
        "id": {
          "const": "@id"
        },
        "type": {
          "const": "@type"
        },
        "statements": {
          "const": "@nest"
        },
        "list": {
          "const": "@list"
        },
        "timelines": {
          "const": "@included"
        },
        "children": {
          "const": "@included"
        },
        "regions": {
          "const": "@included"
        },
        "groups": {
          "const": "@included"
        },
        "label": {
          "const": "http://www.w3.org/2000/01/rdf-schema#label"
        },
        "provenance": {
          "const": {
            "@reverse": "http://www.w3.org/1999/02/22-rdf-syntax-ns#subject"
          }
        },
        "property": {
          "const": {
            "@id": "http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate",
            "@type": "@vocab"
          }
        },
        "value": {
          "const": "http://www.w3.org/1999/02/22-rdf-syntax-ns#object"
        },
        "stated_by": {
          "const": {
            "@id": "http://www.w3.org/ns/prov#wasAttributedTo",
            "@type": "@id"
          }
        },
        "date": {
          "const": {
            "@id": "http://purl.org/dc/terms/date",
            "@type": "http://www.w3.org/2001/XMLSchema#date"
          }
        },
        "method": {
          "const": {
            "@id": "https://timetoalign.github.io/timetoshare/ns#method",
            "@type": "@vocab"
          }
        },
        "service": {
          "const": {
            "@id": "https://timetoalign.github.io/timetoshare/ns#service",
            "@type": "@id"
          }
        },
        "basis": {
          "const": {
            "@id": "http://www.w3.org/ns/prov#hadPrimarySource",
            "@type": "@id"
          }
        },
        "match": {
          "const": {
            "@id": "https://timetoalign.github.io/timetoshare/ns#match",
            "@type": "@vocab"
          }
        },
        "note": {
          "const": "http://www.w3.org/2000/01/rdf-schema#comment"
        },
        "beliefs": {
          "const": "https://timetoalign.github.io/timetoshare/ns#beliefs"
        },
        "actor": {
          "const": {
            "@id": "https://timetoalign.github.io/timetoshare/ns#actor",
            "@type": "@id"
          }
        },
        "belief": {
          "const": {
            "@id": "https://timetoalign.github.io/timetoshare/ns#belief",
            "@type": "@vocab"
          }
        },
        "manual": {
          "const": "https://timetoalign.github.io/timetoshare/ns#Manual"
        },
        "reconciled": {
          "const": "https://timetoalign.github.io/timetoshare/ns#Reconciled"
        },
        "imported": {
          "const": "https://timetoalign.github.io/timetoshare/ns#Imported"
        },
        "inferred": {
          "const": "https://timetoalign.github.io/timetoshare/ns#Inferred"
        },
        "true": {
          "const": "https://timetoalign.github.io/timetoshare/ns#True"
        },
        "false": {
          "const": "https://timetoalign.github.io/timetoshare/ns#False"
        },
        "unlikely": {
          "const": "https://timetoalign.github.io/timetoshare/ns#Unlikely"
        },
        "exact": {
          "const": "http://www.w3.org/2004/02/skos/core#exactMatch"
        },
        "close": {
          "const": "http://www.w3.org/2004/02/skos/core#closeMatch"
        },
        "broad": {
          "const": "http://www.w3.org/2004/02/skos/core#broadMatch"
        },
        "narrow": {
          "const": "http://www.w3.org/2004/02/skos/core#narrowMatch"
        },
        "related": {
          "const": "http://www.w3.org/2004/02/skos/core#relatedMatch"
        }
      },
      "required": [
        "@version",
        "id",
        "type",
        "statements",
        "list",
        "timelines",
        "children",
        "regions",
        "groups",
        "label",
        "provenance",
        "property",
        "value",
        "stated_by",
        "date",
        "method",
        "service",
        "basis",
        "match",
        "note",
        "beliefs",
        "actor",
        "belief",
        "manual",
        "reconciled",
        "imported",
        "inferred",
        "true",
        "false",
        "unlikely",
        "exact",
        "close",
        "broad",
        "narrow",
        "related"
      ],
      "propertyNames": {
        "anyOf": [
          {
            "enum": [
              "@version",
              "id",
              "type",
              "statements",
              "list",
              "timelines",
              "children",
              "regions",
              "groups",
              "label",
              "provenance",
              "property",
              "value",
              "stated_by",
              "date",
              "method",
              "service",
              "basis",
              "match",
              "note",
              "beliefs",
              "actor",
              "belief",
              "manual",
              "reconciled",
              "imported",
              "inferred",
              "true",
              "false",
              "unlikely",
              "exact",
              "close",
              "broad",
              "narrow",
              "related"
            ]
          },
          {
            "$ref": "#/$defs/PrefixName"
          }
        ]
      },
      "additionalProperties": {
        "$ref": "#/$defs/PrefixIri"
      }
    },
    "PrefixName": {
      "type": "string",
      "description": "The name of a prefix of the context: a letter, then letters, digits, `_` or `-`; never a key of the manifest's elements and never a URI scheme the format reads as such.",
      "pattern": "^[A-Za-z]",
      "not": {
        "anyOf": [
          {
            "pattern": "[^A-Za-z0-9_-]"
          },
          {
            "enum": [
              "conversion_maps",
              "end",
              "flow_control",
              "flow_maps",
              "graphical",
              "http",
              "https",
              "info",
              "is_segment_line",
              "length",
              "locked",
              "mailto",
              "measure_maps",
              "members",
              "meta",
              "name",
              "number_type",
              "offset",
              "resources",
              "start",
              "tag",
              "timetoshare",
              "unit",
              "urn",
              "virtual_timelines"
            ]
          }
        ]
      }
    },
    "PrefixIri": {
      "type": "string",
      "description": "The namespace a prefix stands for: an absolute IRI ending in `/` or `#`.",
      "pattern": "^[A-Za-z][A-Za-z0-9+.-]*:.*[/#](?!.)",
      "not": {
        "pattern": "[\\u0000-\\u0020\\u007f-\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]"
      }
    },
    "Iri": {
      "type": "string",
      "description": "A compact IRI (`prefix:suffix`, the prefix declared in `@context`) or an absolute IRI. Whether the prefix is declared is checked after the schema.",
      "pattern": "^[A-Za-z][A-Za-z0-9_+.-]*:.",
      "not": {
        "pattern": "[\\u0000-\\u0020\\u007f-\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]"
      }
    },
    "IriReference": {
      "type": "string",
      "description": "An `Iri` or a relative reference, resolved against the manifest's address: `#clt_1` names an element of this manifest, `other.yaml#clt_1` one of another.",
      "minLength": 1,
      "not": {
        "anyOf": [
          {
            "pattern": "[\\u0000-\\u0020\\u007f-\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]"
          },
          {
            "pattern": "^_:"
          },
          {
            "pattern": "^@"
          }
        ]
      }
    },
    "LanguageTag": {
      "type": "string",
      "pattern": "^[A-Za-z]{1,8}(?:-[A-Za-z0-9]{1,8})*(?![A-Za-z0-9-])",
      "not": {
        "pattern": "[^A-Za-z0-9-]"
      }
    },
    "Statements": {
      "type": "object",
      "description": "Property\u2013value pairs about the thing an element stands for. Each key is `type` (\"is a\", its values class IRIs) or a property IRI; each value is the non-empty list of that property's values, in the order given.",
      "properties": {
        "type": {
          "$ref": "#/$defs/Types"
        }
      },
      "propertyNames": {
        "anyOf": [
          {
            "const": "type"
          },
          {
            "$ref": "#/$defs/Iri"
          }
        ]
      },
      "additionalProperties": {
        "$ref": "#/$defs/Values"
      },
      "minProperties": 1
    },
    "Types": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Iri"
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "Values": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/StatementValue"
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "StatementValue": {
      "description": "One value of a pair: a single value, or an ordered list of them.",
      "anyOf": [
        {
          "$ref": "#/$defs/SingleValue"
        },
        {
          "$ref": "#/$defs/OrderedValues"
        }
      ]
    },
    "SingleValue": {
      "description": "A literal (a string, an integer or a boolean, never a float), a value object, or a node. A string is never read as an IRI: a thing is a node with an `id`.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        },
        {
          "type": "boolean"
        },
        {
          "if": {
            "required": [
              "@value"
            ]
          },
          "then": {
            "$ref": "#/$defs/ValueObject"
          },
          "else": {
            "$ref": "#/$defs/ValueNode"
          }
        }
      ]
    },
    "OrderedValues": {
      "type": "object",
      "description": "Values in order (an RDF list).",
      "properties": {
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SingleValue"
          },
          "minItems": 1
        }
      },
      "required": [
        "list"
      ],
      "propertyNames": {
        "const": "list"
      }
    },
    "ValueObject": {
      "type": "object",
      "description": "A literal with a language (`@language`) or a datatype (`@type`).",
      "properties": {
        "@value": {
          "type": "string"
        },
        "@language": {
          "$ref": "#/$defs/LanguageTag"
        },
        "@type": {
          "$ref": "#/$defs/Iri"
        }
      },
      "required": [
        "@value"
      ],
      "propertyNames": {
        "enum": [
          "@value",
          "@language",
          "@type"
        ]
      },
      "oneOf": [
        {
          "required": [
            "@language"
          ]
        },
        {
          "required": [
            "@type"
          ]
        }
      ]
    },
    "ValueNode": {
      "type": "object",
      "description": "A thing: its `id` where it has one (a node without `id` is a blank node, such as a name not yet reconciled), its classes, a label kept as a cache, its own pairs as property-IRI keys and the annotations of those pairs. A node whose `id` names an element of this manifest holds that `id` alone.",
      "properties": {
        "id": {
          "$ref": "#/$defs/IriReference"
        },
        "type": {
          "$ref": "#/$defs/Types"
        },
        "label": {
          "type": "string"
        },
        "provenance": {
          "$ref": "#/$defs/Provenance"
        }
      },
      "propertyNames": {
        "anyOf": [
          {
            "enum": [
              "id",
              "type",
              "label",
              "provenance"
            ]
          },
          {
            "$ref": "#/$defs/Iri"
          }
        ]
      },
      "additionalProperties": {
        "$ref": "#/$defs/Values"
      },
      "minProperties": 1
    },
    "Provenance": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProvenanceEntry"
      },
      "minItems": 1
    },
    "ProvenanceEntry": {
      "type": "object",
      "description": "The provenance of one pair of the holding element or node (the entry of `provenance.schema.json`) with the pair it is about. An entry whose pair the holder states annotates that pair; an entry whose pair the holder does not state is a candidate, never stated. The pair `type` X is written `property: rdf:type`, `value: {id: X}`.",
      "allOf": [
        {
          "$ref": "provenance.schema.json"
        }
      ],
      "properties": {
        "property": {
          "$ref": "#/$defs/Iri"
        },
        "value": {
          "$ref": "#/$defs/EntryValue"
        }
      },
      "required": [
        "property",
        "value"
      ]
    },
    "EntryValue": {
      "description": "The value of an annotated pair: a literal, a value object, a thing by its `id` alone, or a node without `id` compared as a whole.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        },
        {
          "type": "boolean"
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/$defs/IriReference"
            }
          },
          "required": [
            "id"
          ],
          "propertyNames": {
            "const": "id"
          }
        },
        {
          "if": {
            "required": [
              "@value"
            ]
          },
          "then": {
            "$ref": "#/$defs/ValueObject"
          },
          "else": {
            "$ref": "#/$defs/ValueNode",
            "not": {
              "required": [
                "id"
              ]
            }
          }
        }
      ]
    }
  }
}