Schemas / Music
rig.music.arrangement
v0.31.0 · draft 5 fields 1 required
Fields
| Field | Type | Meaning | |
|---|---|---|---|
frames |
array<object> | required | Ordered frames |
currentFrame |
int | optional | Optional. Playhead index into frames; absent = 0 |
loop |
bool | optional | Optional. Loop; absent = false |
loopStartFrame |
int | optional | Optional. First frame of the loop region; absent = 0 |
loopEndFrame |
int | optional | Optional. Frame after the last looped frame; absent = frames.length |
Ordered playback frames - a tracker's order list / a sequencer song chain. Format when present.
An arrangement has frames. A frame has patterns. A pattern has steps.
Frame
Omit a lane from patterns to leave that channel silent for the frame - no placeholder pattern needed.
Arrangement
Running state comes from transport (playing). No onFrame callbacks.
Each pattern advances at its own stepsPerBeat; the arrangement only orders which patterns play in which frame, not their internal timing. A frame's duration is however long its longest active pattern takes to loop once - the Contract does not add a separate frame-length field.
JSON Schema
Resolves at https://rig.works/schemas/rig.music.arrangement.schema.json —
raw file.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://rig.works/schemas/rig.music.arrangement.schema.json",
"title": "rig.music.arrangement",
"type": "object",
"additionalProperties": false,
"properties": {
"frames": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"patterns"
],
"properties": {
"patterns": {
"type": "array",
"items": {
"$ref": "./_defs.schema.json#/$defs/entity"
}
}
}
}
},
"currentFrame": {
"$ref": "./_defs.schema.json#/$defs/int"
},
"loop": {
"$ref": "./_defs.schema.json#/$defs/bool"
},
"loopStartFrame": {
"$ref": "./_defs.schema.json#/$defs/int"
},
"loopEndFrame": {
"$ref": "./_defs.schema.json#/$defs/int"
}
},
"required": [
"frames"
]
}