at.atmosynth.patch
Schema Diff
+3 -2
Compatibility Analysis
Breaking Changes Detected
2 breaking changes, 0 non-breaking changes.
Breaking Changes (2)
- KindChanged KindChanged { vertex_id: "at.atmosynth.patch#parameterValue.value", old_kind: "unknown", new_kind: "string" }
- ConstraintAdded ConstraintAdded { vertex_id: "at.atmosynth.patch#parameterValue.value", sort: "maxLength", value: "200" }
Migration Guidance
Constraint Changes
- ConstraintAdded ConstraintAdded { vertex_id: "at.atmosynth.patch#parameterValue.value", sort: "maxLength", value: "200" }
Additional Notes
- Breaking: KindChanged { vertex_id: "at.atmosynth.patch#parameterValue.value", old_kind: "unknown", new_kind: "string" }
1
1
{
2
2
"id": "at.atmosynth.patch",
3
3
"defs": {
4
4
"main": {
5
5
"key": "tid",
6
6
"type": "record",
7
7
"record": {
8
8
"type": "object",
9
9
"required": [
10
10
"descriptionVersion",
11
11
"name",
12
12
"description",
13
13
"moduleInstances",
14
14
"createdAt"
15
15
],
16
16
"properties": {
17
17
"name": {
18
18
"type": "string",
19
19
"maxLength": 200,
20
20
"minLength": 1
21
21
},
22
22
"tags": {
23
23
"type": "array",
24
24
"items": {
25
25
"type": "string",
26
26
"maxLength": 128
27
27
},
28
28
"description": "Freely created tags, lower-cased on write so one hashtag matches one set of patches."
29
29
},
30
30
"tempo": {
31
31
"type": "integer",
32
32
"maximum": 300,
33
33
"minimum": 20,
34
34
"description": "The tempo this patch was written at, in beats per minute. It is what a sequenced patch counts its bars against, so a patch that plays itself arrives at the speed its creator meant. It seeds the player's own tempo rather than replacing it: how fast a visitor plays is still theirs, and moving it moves everything counting against it. Optional permanently — a patch that says nothing is played at whatever tempo the player already had."
35
35
},
36
36
"types": {
37
37
"type": "array",
38
38
"items": {
39
39
"type": "string",
40
40
"knownValues": [
41
41
"Lead",
42
42
"Pad",
43
43
"Bass",
44
44
"Plucked",
45
45
"Percussion",
46
46
"Keys",
47
47
"Brass",
48
48
"Strings",
49
49
"Vocal",
50
50
"SFX"
51
51
]
52
52
},
53
53
"description": "Zero or more of the ten fixed types. A patch may carry several."
54
54
},
55
55
"output": {
56
56
"ref": "#outputRef",
57
57
"type": "ref",
58
58
"description": "Which instance reaches the audio output."
59
59
},
60
60
"createdAt": {
61
61
"type": "string",
62
62
"format": "datetime"
63
63
},
64
64
"forkedFrom": {
65
65
"ref": "#lineage",
66
66
"type": "ref"
67
67
},
68
68
"connections": {
69
69
"type": "array",
70
70
"items": {
71
71
"ref": "#connection",
72
72
"type": "ref"
73
73
}
74
74
},
75
75
"description": {
76
76
"type": "string",
77
77
"maxLength": 3000
78
78
},
79
79
"midiRouting": {
80
80
"type": "array",
81
81
"items": {
82
82
"ref": "#midiRoute",
83
83
"type": "ref"
84
84
},
85
85
"description": "Which module instances receive MIDI input."
86
86
},
87
87
"moduleInstances": {
88
88
"type": "array",
89
89
"items": {
90
90
"ref": "#moduleInstance",
91
91
"type": "ref"
92
92
}
93
93
},
94
94
"descriptionVersion": {
95
95
"type": "integer",
96
96
"minimum": 1,
97
97
"description": "Version of the patch description this record follows."
98
98
}
99
99
}
100
100
},
101
101
"description": "A patch, held in its creator's own repository."
102
102
},
103
103
"lineage": {
104
104
"type": "object",
105
105
"required": [
106
106
"uri",
107
107
"creatorDid"
108
108
],
109
109
"properties": {
110
110
"uri": {
111
111
"type": "string",
112
112
"format": "at-uri"
113
113
},
114
114
"patchId": {
115
115
"type": "string",
116
116
"maxLength": 128
117
117
},
118
118
"creatorDid": {
119
119
"type": "string",
120
120
"format": "did"
121
121
}
122
122
},
123
123
"description": "The patch this one was forked from, and its creator. Preserved even when the source is later deleted."
124
124
},
125
125
"inputRef": {
126
126
"type": "object",
127
127
"required": [
128
128
"instanceId",
129
129
"audioInput"
130
130
],
131
131
"properties": {
132
132
"audioInput": {
133
133
"type": "string",
134
134
"maxLength": 64,
135
135
"minLength": 1
136
136
},
137
137
"instanceId": {
138
138
"type": "string",
139
139
"maxLength": 64,
140
140
"minLength": 1
141
141
}
142
142
}
143
143
},
144
144
"position": {
145
145
"type": "object",
146
146
"required": [
147
147
"x",
148
148
"y"
149
149
],
150
150
"properties": {
151
151
"x": {
152
152
"type": "integer"
153
153
},
154
154
"y": {
155
155
"type": "integer"
156
156
}
157
157
}
158
158
},
159
159
"midiRoute": {
160
160
"type": "object",
161
161
"required": [
162
162
"instanceId",
163
163
"midiInput"
164
164
],
165
165
"properties": {
166
166
"from": {
167
167
"ref": "#noteOutputRef",
168
168
"type": "ref",
169
169
"description": "The note output these notes leave. Absent where they come from the player."
170
170
},
171
171
"midiInput": {
172
172
"type": "string",
173
173
"maxLength": 64,
174
174
"minLength": 1
175
175
},
176
176
"instanceId": {
177
177
"type": "string",
178
178
"maxLength": 64,
179
179
"minLength": 1
180
180
}
181
181
},
182
182
"description": "Where one instance's notes come from. `instanceId` and `midiInput` name the MIDI input they arrive at; `from` names the note output they leave. **A route with no `from` comes from the player** — the on-screen keys, the computer keyboard and every MIDI device at once — which is what every route written before note sources existed says, and what it goes on saying."
183
183
},
184
184
"moduleRef": {
185
185
"type": "object",
186
186
"required": [
187
187
"moduleId",
188
188
"versionKey",
189
189
"authorDid"
190
190
],
191
191
"properties": {
192
192
"moduleId": {
193
193
"type": "string",
194
194
"maxLength": 128,
195
195
"minLength": 1
196
196
},
197
197
"authorDid": {
198
198
"type": "string",
199
199
"format": "did"
200
200
},
201
201
"versionKey": {
202
202
"type": "string",
203
203
"maxLength": 128,
204
204
"minLength": 1
205
205
}
206
206
},
207
207
"description": "A pin to one exact published version of a module. Resolving it fetches that record, whoever authored it."
208
208
},
209
209
"noteEvent": {
210
210
"type": "object",
211
211
"required": [
212
212
"note"
213
213
],
214
214
"properties": {
215
215
"at": {
216
216
"type": "integer",
217
217
"minimum": 0,
218
218
"description": "The tick of the loop this note is struck at, counted from its start at 96 ticks to the beat. Ticks rather than steps of the grid, because a note is at a moment and the grid is a guide over it: 96 is divided exactly by every grid this description offers, so a note keeps its moment however the grid is changed."
219
219
},
220
220
"hold": {
221
221
"type": "integer",
222
222
"minimum": 1,
223
223
"description": "How many ticks this note is held for. Counted in ticks rather than in seconds for the reason the start is: a phrase written at 90 is the same phrase, held notes and all, at 140. A note is cut off by the loop's end and by the next note of its own pitch, since the same pitch overlapping itself is one voice rather than two."
224
224
},
225
225
"note": {
226
226
"type": "integer",
227
227
"maximum": 127,
228
228
"minimum": 0,
229
229
"description": "The MIDI note number. 60 is middle C."
230
230
},
231
231
"step": {
232
232
"type": "integer",
233
233
"minimum": 0,
234
234
"description": "Which step of the grid this note is on, counted from the start of the loop. The older way of saying where a note is, read from every pattern published before a note carried a tick and written by none."
235
235
},
236
236
"length": {
237
237
"type": "integer",
238
238
"minimum": 1,
239
239
"description": "How many steps of the grid this note is held for, where its start is written as a step. Absent is one, which is what every pattern written before notes had a length says."
240
240
}
241
241
},
242
242
"description": "One note struck at one moment of the loop and held from it, at one fixed strength — a pattern is what is played and not how hard. It is written one of two ways: a note written now says the tick it is at and how many ticks it is held for, and a note written while the grid was part of what a note was says the step of that grid and how many of those steps it was held for. Both are read; the first is written."
243
243
},
244
244
"outputRef": {
245
245
"type": "object",
246
246
"required": [
247
247
"instanceId",
248
248
"audioOutput"
249
249
],
250
250
"properties": {
251
251
"instanceId": {
252
252
"type": "string",
253
253
"maxLength": 64,
254
254
"minLength": 1
255
255
},
256
256
"audioOutput": {
257
257
"type": "string",
258
258
"maxLength": 64,
259
259
"minLength": 1
260
260
}
261
261
}
262
262
},
263
263
"connection": {
264
264
"type": "object",
265
265
"required": [
266
266
"from",
267
267
"to"
268
268
],
269
269
"properties": {
270
270
"to": {
271
271
"ref": "#inputRef",
272
272
"type": "ref"
273
273
},
274
274
"from": {
275
275
"ref": "#outputRef",
276
276
"type": "ref"
277
277
}
278
278
},
279
279
"description": "An audio connection between two module instances, naming the declared ports at each end."
280
280
},
281
281
"resolution": {
282
282
"type": "object",
283
283
"required": [
284
284
"value"
285
285
],
286
286
"properties": {
287
287
"unit": {
288
288
"type": "string",
289
289
"description": "Three of them into the time of two, or not. Absent is normal. A dotted grid is not offered: it does not divide a bar evenly, so it would leave a pattern whose steps do not line up with its own loop.",
290
290
"knownValues": [
291
291
"normal",
292
292
"triplet"
293
293
]
294
294
},
295
295
"value": {
296
296
"type": "string",
297
297
"description": "The note value one step is worth. A bar is four beats.",
298
298
"knownValues": [
299
299
"bar",
300
300
"1/2",
301
301
"1/4",
302
302
"1/8",
303
303
"1/16",
304
304
"1/32",
305
305
"1/64",
306
306
"1/128"
307
307
]
308
308
}
309
309
},
310
310
"description": "One note value, as a length and what that length is multiplied by. The same vocabulary the player's own musical time is counted in."
311
311
},
312
312
"midiControl": {
313
313
"type": "object",
314
314
"required": [
315
315
"parameter",
316
316
"controller"
317
317
],
318
318
"properties": {
319
319
"parameter": {
320
320
"type": "string",
321
321
"maxLength": 64,
322
322
"minLength": 1,
323
323
"description": "The id of the exposed parameter this control moves. One parameter is moved by at most one controller; one controller may move several parameters."
324
324
},
325
325
"controller": {
326
326
"type": "integer",
327
327
"maximum": 127,
328
328
"minimum": 0,
329
329
"description": "The control change number. Five are spoken for by MIDI itself and cannot be bound: 64, the sustain pedal, and 6, 38, 100 and 101, which carry registered-parameter traffic."
330
330
}
331
331
},
332
332
"description": "One MIDI control change bound to one of the module's exposed parameters. The controller's 0 to 127 sweeps the parameter across the range the module declares, or, where the module declares a closed value set instead, across those values in order. A control is read from every input on every channel, like every other MIDI message here: there is nothing to configure."
333
333
},
334
334
"notePattern": {
335
335
"type": "object",
336
336
"required": [
337
337
"bars",
338
338
"resolution"
339
339
],
340
340
"properties": {
341
341
"bars": {
342
342
"type": "integer",
343
343
"maximum": 8,
344
344
"minimum": 1,
345
345
"description": "How long the first loop is, in bars of four beats. There is no time signature anywhere here, and 4/4 is what a bar means to everyone who has not been told otherwise. Each loop keeps its own length: one may be four bars and the next five."
346
346
},
347
347
"active": {
348
348
"type": "integer",
349
349
"minimum": 0,
350
350
"description": "Which loop is played, counting the one written here as zero. Absent is the first. It is in the record because it is what a visitor opening the patch hears — unlike stopping a loop, which is how a browser is listening and is written nowhere. Every loop counts from the same downbeat and wraps at its own length whether or not it is the one being heard, so switching between them reveals where the other had got to rather than starting it."
351
351
},
352
352
"events": {
353
353
"type": "array",
354
354
"items": {
355
355
"ref": "#noteEvent",
356
356
"type": "ref"
357
357
},
358
358
"maxLength": 2048,
359
359
"description": "The notes in the first loop. A moment carrying no note is a rest; a note starting outside the loop's length is not played."
360
360
},
361
361
"alternates": {
362
362
"type": "array",
363
363
"items": {
364
364
"ref": "#alternatePattern",
365
365
"type": "ref"
366
366
},
367
367
"maxLength": 7,
368
368
"description": "The loops after the first. Absent while the sequencer holds a single pattern, which is what every sequencer written before there could be more than one says."
369
369
},
370
370
"resolution": {
371
371
"ref": "#resolution",
372
372
"type": "ref",
373
373
"description": "The grid every loop on this sequencer is drawn and snapped to. It is a guide and not a part of what is played: it decides where a note being put down lands, and changing it moves nothing already written, so a loop may hold a note no line of the current grid passes through."
374
374
}
375
375
},
376
376
"description": "The loops one sequencer holds, and the grid they are written on. A loop is a whole number of bars and the notes in it are counted in ticks of the beat, so a pattern means the same thing at any tempo — what a tick is worth in seconds is the player's tempo's business and not the pattern's. The first loop is written here, where a pattern has always been written; any after it are alternates."
377
377
},
378
378
"noteOutputRef": {
379
379
"type": "object",
380
380
"required": [
381
381
"instanceId",
382
382
"noteOutput"
383
383
],
384
384
"properties": {
385
385
"instanceId": {
386
386
"type": "string",
387
387
"maxLength": 64,
388
388
"minLength": 1
389
389
},
390
390
"noteOutput": {
391
391
"type": "string",
392
392
"maxLength": 64,
393
393
"minLength": 1
394
394
}
395
395
}
396
396
},
397
397
"moduleInstance": {
398
398
"type": "object",
399
399
"required": [
400
400
"instanceId",
401
401
"module",
402
402
"voiceScope"
403
403
],
404
404
"properties": {
405
405
"module": {
406
406
"ref": "#moduleRef",
407
407
"type": "ref"
408
408
},
409
409
"unison": {
410
410
"type": "integer",
411
411
"maximum": 6,
412
412
"minimum": 1,
413
413
"description": "How many voices each note this instance plays is sounded by, detuned narrowly against each other and centred on the note. It lives here, in the patch, for the reason the pattern above it does: how a loop is voiced is a decision about this use of the module. The player's own unison is a setting of their browser and says nothing about this one, so a loop written thick stays thick for everyone who opens the patch. Optional permanently: an instance that says nothing plays one voice per note, which is what every record written before this field existed says."
414
414
},
415
415
"enabled": {
416
416
"type": "boolean",
417
417
"description": "Whether this instance does its work. An instance that is switched off makes no sound of its own, and anything reaching its audio inputs leaves its audio outputs unaltered. Optional permanently: an instance that says nothing is on, which is what every record written before this field existed says."
418
418
},
419
419
"position": {
420
420
"ref": "#position",
421
421
"type": "ref",
422
422
"description": "Where the creator placed this instance in the patch's arrangement, so the arrangement travels with the patch and a fork inherits it. Optional permanently, and the only field in either description that exists for presentation."
423
423
},
424
424
"instanceId": {
425
425
"type": "string",
426
426
"maxLength": 64,
427
427
"minLength": 1
428
428
},
429
429
"voiceScope": {
430
430
"enum": [
431
431
"perNote",
432
432
"perPatch"
433
433
],
434
434
"type": "string",
435
435
"description": "Whether this instance is built once for each sounding note or once for the whole patch. One of the two, always: the choice is made when the module is added, from what the module is, and is the creator's to move afterwards. There is no third value and no leaving it out — an instance that said nothing left the answer to be worked out afresh every time the patch was played, which is a decision nobody could see and nobody could change."
436
436
},
437
437
"notePattern": {
438
438
"ref": "#notePattern",
439
439
"type": "ref",
440
440
"description": "The pattern this instance loops, where its module is a sequencer. It lives here, in the patch, for the reason a sample slot fill and a control binding do: what is played is a decision about this use of the module, and writing one never touches the module's record. Absent on every instance whose module is not a note source."
441
441
},
442
442
"midiControls": {
443
443
"type": "array",
444
444
"items": {
445
445
"ref": "#midiControl",
446
446
"type": "ref"
447
447
},
448
448
"description": "Which MIDI control changes move this instance's parameters while it is played. A binding lives here, in the patch, because which knob moves what is a decision about this use of the module and not about the module."
449
449
},
450
450
"parameterValues": {
451
451
"type": "array",
452
452
"items": {
453
453
"ref": "#parameterValue",
454
454
"type": "ref"
455
455
}
456
456
},
457
457
"sampleSlotFills": {
458
458
"type": "array",
459
459
"items": {
460
460
"ref": "#sampleSlotFill",
461
461
"type": "ref"
462
462
},
463
463
"description": "Samples this instance supplies for the module's declared slots. A fill lives here, in the patch, so writing one never touches the module."
464
464
}
465
465
},
466
466
"description": "One use of one module version. A patch may use the same module more than once; each instance is separately addressable and carries its own parameter values and slot fills."
467
467
},
468
468
"parameterValue": {
469
469
"type": "object",
470
470
"required": [
471
471
"id"
472
472
],
473
473
"properties": {
474
474
"id": {
475
475
"type": "string",
476
476
"maxLength": 64,
477
477
"minLength": 1
478
478
},
479
479
"value": {
480
-
"type": "unknown",
481
-
"description": "The value this patch sets the parameter to. A number that is not a whole number is carried as its decimal string — \"0.5\", not 0.5 — because the ATproto data model has no floating-point type and a PDS refuses one. A whole number is an ordinary integer, and a reader turns such a string back into a number. Where the module declares a closed set of values instead, this is one of those strings, and a label that looks like a number stays the label it is."
480
+
"type": "string",
481
+
"maxLength": 200,
482
+
"description": "The value this patch sets the parameter to, always as text. A number is its decimal form — \"0.5\", and \"2\" for a whole one — because the ATproto data model has no floating-point type and a string is the only type that carries both a number and a word. Where the module declares a closed set of values instead, this is one of those strings, and a label that looks like a number stays the label it is: the module's own description says which of the two this parameter is."
482
483
},
483
484
"useDefault": {
484
485
"type": "boolean",
485
486
"description": "Set where the patch explicitly defers to the module's default rather than recording a value."
486
487
}
487
488
},
488
489
"description": "A value for one of the module's exposed parameters, or an explicit fall-back to the module's declared default."
489
490
},
490
491
"sampleSlotFill": {
491
492
"type": "object",
492
493
"required": [
493
494
"slotId",
494
495
"blob",
495
496
"ownerDid"
496
497
],
497
498
"properties": {
498
499
"blob": {
499
500
"type": "blob",
500
501
"accept": [
501
502
"audio/wav"
502
503
],
503
504
"maxSize": 2097152
504
505
},
505
506
"slotId": {
506
507
"type": "string",
507
508
"maxLength": 64,
508
509
"minLength": 1
509
510
},
510
511
"ownerDid": {
511
512
"type": "string",
512
513
"format": "did"
513
514
}
514
515
}
515
516
},
516
517
"alternatePattern": {
517
518
"type": "object",
518
519
"required": [
519
520
"bars"
520
521
],
521
522
"properties": {
522
523
"bars": {
523
524
"type": "integer",
524
525
"maximum": 8,
525
526
"minimum": 1,
526
527
"description": "How long this loop is, in bars of four beats."
527
528
},
528
529
"events": {
529
530
"type": "array",
530
531
"items": {
531
532
"ref": "#noteEvent",
532
533
"type": "ref"
533
534
},
534
535
"maxLength": 2048,
535
536
"description": "The notes in this loop."
536
537
}
537
538
},
538
539
"description": "One of the loops after the first on a sequencer. It has its own length and its own notes, and shares the grid written beside the first."
539
540
}
540
541
},
541
542
"$type": "com.atproto.lexicon.schema",
542
543
"lexicon": 1,
543
544
"description": "A synth patch: which modules it uses, how they are wired, what their parameters are set to, and how it is played. A patch plus the module records it pins is everything needed to reproduce it."
544
545
}