{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Miafy instrumental score",
  "type": "object",
  "properties": {
    "format": {
      "const": "mia-score-1"
    },
    "bpm": {
      "type": "integer",
      "minimum": 40,
      "maximum": 200
    },
    "instrument": {
      "type": "string",
      "enum": [
        "sine",
        "triangle"
      ]
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "pitch": {
            "type": "integer",
            "minimum": 36,
            "maximum": 96
          },
          "start": {
            "type": "number",
            "minimum": 0,
            "maximum": 128
          },
          "duration": {
            "type": "number",
            "minimum": 0.1,
            "maximum": 8
          },
          "velocity": {
            "type": "number",
            "minimum": 0.05,
            "maximum": 0.7
          }
        },
        "required": [
          "pitch",
          "start",
          "duration",
          "velocity"
        ],
        "additionalProperties": false
      },
      "minItems": 4,
      "maxItems": 256
    }
  },
  "required": [
    "format",
    "bpm",
    "instrument",
    "notes"
  ],
  "additionalProperties": false,
  "description": "The server additionally validates maximum 60 seconds and eight simultaneous notes. Use the portable validator for these musical constraints."
}
