63 lines
2.6 KiB
JSON
63 lines
2.6 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://micarrsim.local/schemas/array.schema.json",
|
|
"title": "micarrsim microphone array",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["schemaVersion", "kind", "id", "name", "units", "coordinateSystem", "aperture", "microphones"],
|
|
"properties": {
|
|
"schemaVersion": { "const": "1.0.0" },
|
|
"kind": { "const": "micarrsim.array" },
|
|
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]*$" },
|
|
"name": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
"description": { "type": "string", "maxLength": 1000 },
|
|
"units": { "const": "m" },
|
|
"coordinateSystem": { "$ref": "#/$defs/coordinateSystem" },
|
|
"aperture": {
|
|
"type": "object", "additionalProperties": false, "required": ["width", "height"],
|
|
"properties": {
|
|
"width": { "type": "number", "exclusiveMinimum": 0, "maximum": 20 },
|
|
"height": { "type": "number", "exclusiveMinimum": 0, "maximum": 20 }
|
|
}
|
|
},
|
|
"microphones": { "type": "array", "minItems": 1, "maxItems": 1024, "items": { "$ref": "#/$defs/microphone" } }
|
|
},
|
|
"$defs": {
|
|
"coordinateSystem": {
|
|
"type": "object", "additionalProperties": false,
|
|
"required": ["handedness", "xAxis", "yAxis", "zAxis"],
|
|
"properties": {
|
|
"handedness": { "const": "right" }, "xAxis": { "const": "right" },
|
|
"yAxis": { "const": "up" }, "zAxis": { "const": "toward-scene" }
|
|
}
|
|
},
|
|
"position": {
|
|
"type": "array",
|
|
"prefixItems": [{ "type": "number" }, { "type": "number" }, { "type": "number" }],
|
|
"items": false, "minItems": 3, "maxItems": 3
|
|
},
|
|
"microphone": {
|
|
"type": "object", "additionalProperties": false, "required": ["id", "position"],
|
|
"properties": {
|
|
"id": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
"position": { "$ref": "#/$defs/position" },
|
|
"sensitivityDb": { "type": "number", "minimum": -120, "maximum": 120 },
|
|
"phaseOffsetDeg": { "type": "number", "minimum": -180, "maximum": 180 },
|
|
"frequencyResponse": {
|
|
"type": "array", "minItems": 2, "maxItems": 64,
|
|
"items": { "$ref": "#/$defs/frequencyResponsePoint" }
|
|
}
|
|
}
|
|
},
|
|
"frequencyResponsePoint": {
|
|
"type": "object", "additionalProperties": false,
|
|
"required": ["frequencyHz", "gainDb"],
|
|
"properties": {
|
|
"frequencyHz": { "type": "number", "minimum": 0, "maximum": 1000000 },
|
|
"gainDb": { "type": "number", "minimum": -120, "maximum": 120 },
|
|
"phaseDeg": { "type": "number", "minimum": -180, "maximum": 180 }
|
|
}
|
|
}
|
|
}
|
|
}
|