Skip to content

JSON_multimeasure_rests_example

Adrian Holovaty edited this page Feb 16, 2023 · 2 revisions

Proposed JSON encoding of our Multimeasure rests example document:

{
  "global": {
    "measures": [
      {
        "time": {"signature": "4/4"}
      },
      {},
      {},
      {},
      {},
      {},
      {}
    ]
  },
  "parts": {
    "PartA": {
      "measures": [
        {
          "content": [
            {"type": "clef", "sign": "G", "line": 2},
            {
              "type": "sequence",
              "content": [
                {
                  "type": "event",
                  "value": "/4",
                  "notes": [
                    {"pitch": "C5"}
                  ]
                },
                {
                  "type": "event",
                  "value": "/4",
                  "notes": [
                    {"pitch": "E5"}
                  ]
                },
                {
                  "type": "event",
                  "value": "/2",
                  "notes": [
                    {"pitch": "G5"}
                  ]
                }
              ]
            }
          ]
        },
        {
          "content": [
            {
              "type": "sequence",
              "content": [
                {
                  "type": "event",
                  "value": "/4",
                  "notes": [
                    {"pitch": "C5"}
                  ]
                },
                {
                  "type": "event",
                  "value": "/4",
                  "notes": [
                    {"pitch": "E5"}
                  ]
                },
                {
                  "type": "event",
                  "value": "/2",
                  "notes": [
                    {"pitch": "G5"}
                  ]
                }
              ]
            }
          ]
        },
        {
          "content": [
            {
              "type": "sequence",
              "content": [
                {"type": "event", "value": "/1", "rest": true}
              ]
            }
          ]
        },
        {
          "content": [
            {
              "type": "sequence",
              "content": [
                {"type": "event", "value": "/1", "rest": true}
              ]
            }
          ]
        },
        {
          "content": [
            {
              "type": "sequence",
              "content": [
                {
                  "type": "event",
                  "value": "/4",
                  "notes": [
                    {"pitch": "C5"}
                  ]
                },
                {
                  "type": "event",
                  "value": "/4",
                  "notes": [
                    {"pitch": "E5"}
                  ]
                },
                {
                  "type": "event",
                  "value": "/2",
                  "notes": [
                    {"pitch": "G5"}
                  ]
                }
              ]
            }
          ]
        },
        {
          "content": [
            {
              "type": "sequence",
              "content": [
                {
                  "type": "event",
                  "value": "/4",
                  "notes": [
                    {"pitch": "C5"}
                  ]
                },
                {
                  "type": "event",
                  "value": "/4",
                  "notes": [
                    {"pitch": "E5"}
                  ]
                },
                {
                  "type": "event",
                  "value": "/2",
                  "notes": [
                    {"pitch": "G5"}
                  ]
                }
              ]
            }
          ]
        },
        {
          "content": [
            {
              "type": "sequence",
              "content": [
                {
                  "type": "event",
                  "value": "/1",
                  "notes": [
                    {"pitch": "E5"}
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    "PartB": {
      "measures": [
        {
          "content": [
            {"type": "clef", "sign": "G", "line": 2},
            {
              "type": "sequence",
              "content": [
                {"type": "event", "value": "/1", "rest": true}
              ]
            }
          ]
        },
        {
          "content": [
            {
              "type": "sequence",
              "content": [
                {"type": "event", "value": "/1", "rest": true}
              ]
            }
          ]
        },
        {
          "content": [
            {
              "type": "sequence",
              "content": [
                {
                  "type": "event",
                  "value": "/4",
                  "notes": [
                    {"pitch": "E5"}
                  ]
                },
                {
                  "type": "event",
                  "value": "/4",
                  "notes": [
                    {"pitch": "D5"}
                  ]
                },
                {
                  "type": "event",
                  "value": "/2",
                  "notes": [
                    {"pitch": "C5"}
                  ]
                }
              ]
            }
          ]
        },
        {
          "content": [
            {
              "type": "sequence",
              "content": [
                {
                  "type": "event",
                  "value": "/4",
                  "notes": [
                    {"pitch": "E5"}
                  ]
                },
                {
                  "type": "event",
                  "value": "/4",
                  "notes": [
                    {"pitch": "D5"}
                  ]
                },
                {
                  "type": "event",
                  "value": "/2",
                  "notes": [
                    {"pitch": "C5"}
                  ]
                }
              ]
            }
          ]
        },
        {
          "content": [
            {
              "type": "sequence",
              "content": [
                {"type": "event", "value": "/1", "rest": true}
              ]
            }
          ]
        },
        {
          "content": [
            {
              "type": "sequence",
              "content": [
                {"type": "event", "value": "/1", "rest": true}
              ]
            }
          ]
        },
        {
          "content": [
            {
              "type": "sequence",
              "content": [
                {
                  "type": "event",
                  "value": "/1",
                  "notes": [
                    {"pitch": "C5"}
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  },
  "layouts": {
    "PartAAlone": {
      "staffs": [
        {"type": "part", "part": "PartA"}
      ]
    },
    "PartBAlone": {
      "staffs": [
        {"type": "part", "part": "PartB"}
      ]
    }
  },
  "scores": [
    {
      "name": "Full score",
      "pages": [
        {
          "systems": [
            {"measure": 1},
            {"measure": 5}
          ]
        }
      ]
    },
    {
      "name": "Part A",
      "layout": "PartAAlone",
      "multimeasure-rests": [
        {"start": 3, "duration": 2}
      ]
    },
    {
      "name": "Part B",
      "layout": "PartBAlone",
      "multimeasure-rests": [
        {"start": 1, "duration": 2},
        {"start": 5, "duration": 2}
      ]
    }
  ]
}
Clone this wiki locally