Schemas / Music

rig.music.midi_output

v0.31.0 · draft 3 fields 0 required

Fields

FieldTypeMeaning
portName string optional Platform port name as reported by the host
portIndex uint optional Host API port index
open bool optional Optional. Port open; absent = true

MIDI sink identity. Format when present.

Ship whichever identifier the host API exposes - portName when it names ports, portIndex when it numbers them; at least one must be present. Both are machine-local: moving a document between machines will not find the same port, and a host should fail visibly rather than silently bind to the wrong one.

Pending byte queues stay in the host - do not serialize. Flush in a code pack.

JSON Schema

Resolves at https://rig.works/schemas/rig.music.midi_output.schema.jsonraw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.music.midi_output.schema.json",
  "title": "rig.music.midi_output",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "portName": {
      "$ref": "./_defs.schema.json#/$defs/string"
    },
    "portIndex": {
      "$ref": "./_defs.schema.json#/$defs/uint"
    },
    "open": {
      "$ref": "./_defs.schema.json#/$defs/bool"
    }
  },
  "allOf": [
    {
      "anyOf": [
        {
          "required": [
            "portName"
          ]
        },
        {
          "required": [
            "portIndex"
          ]
        }
      ]
    }
  ]
}