{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.music.pattern.schema.json",
  "title": "rig.music.pattern",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "steps": {
      "type": "array",
      "items": {
        "$ref": "./rig.music.step.schema.json"
      }
    },
    "rootNote": {
      "type": "integer",
      "minimum": 0,
      "maximum": 127
    },
    "scale": {
      "type": "string",
      "enum": [
        "chromatic",
        "major",
        "minor",
        "dorian",
        "pentatonic"
      ]
    },
    "lane": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "stepsPerBeat": {
      "type": "number",
      "exclusiveMinimum": 0
    },
    "loopStartStep": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "loopEndStep": {
      "$ref": "./_defs.schema.json#/$defs/int"
    }
  },
  "required": [
    "steps"
  ]
}
