at.atmosynth.patch
Schema Diff
+13 -5
Compatibility Analysis
Backward Compatible
Backward compatible. 2 non-breaking changes.
Non-Breaking Changes (2)
- AddedVertex AddedVertex { vertex_id: "at.atmosynth.patch#noteEvent.velocity" }
- AddedEdge AddedEdge { src: "at.atmosynth.patch#noteEvent", tgt: "at.atmosynth.patch#noteEvent.velocity", kind: "prop", name: Some("velocity") }
Migration Guidance
Added Elements
AddedVertex { vertex_id: "at.atmosynth.patch#noteEvent.velocity" }
Additional Notes
- Non-breaking: AddedEdge { src: "at.atmosynth.patch#noteEvent", tgt: "at.atmosynth.patch#noteEvent.velocity", kind: "prop", name: Some("velocity") }
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
-
"description": "Which module instances receive MIDI input."
85
+
"description": "The note plane: which note inputs receive note events, and from which note source — a sequencer, or the player's keys and MIDI devices. \"MIDI\" is the historical name; what travels here is notes, whatever produced them."
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
"glide": {
104
104
"type": "object",
105
105
"properties": {
106
106
"ms": {
107
107
"type": "integer",
108
108
"maximum": 5000,
109
109
"minimum": 1,
110
110
"description": "How long a note takes to reach the next, in milliseconds."
111
111
},
112
112
"rate": {
113
113
"type": "string",
114
114
"description": "Or: how long, as a note value at the tempo. The same vocabulary the grid is written in.",
115
115
"knownValues": [
116
116
"bar",
117
117
"1/2",
118
118
"1/4",
119
119
"1/8",
120
120
"1/16",
121
121
"1/32",
122
122
"1/64",
123
123
"1/128"
124
124
]
125
125
},
126
126
"fromLast": {
127
127
"type": "boolean",
128
128
"description": "Whether a note struck after a rest slides in from the note before it. Absent is yes, so every note of the loop slides; false is fingered portamento, where only a note held over the next one slides into it and a note after a rest starts where it means to."
129
129
}
130
130
},
131
131
"description": "How one sequencer's notes slide into one another. Its presence is the switch: an instance carrying it slides, and one carrying nothing does not. The speed is written one of two ways, and which field is present says which — a duration, or a note value at the player's tempo, so a slide that is a sixteenth long stays a sixteenth when the song is played faster. A slide moves one note to the next, so a loop with a glide plays one note at a time."
132
132
},
133
133
"lineage": {
134
134
"type": "object",
135
135
"required": [
136
136
"uri",
137
137
"creatorDid"
138
138
],
139
139
"properties": {
140
140
"uri": {
141
141
"type": "string",
142
142
"format": "at-uri"
143
143
},
144
144
"patchId": {
145
145
"type": "string",
146
146
"maxLength": 128
147
147
},
148
148
"creatorDid": {
149
149
"type": "string",
150
150
"format": "did"
151
151
}
152
152
},
153
153
"description": "The patch this one was forked from, and its creator. Preserved even when the source is later deleted."
154
154
},
155
155
"inputRef": {
156
156
"type": "object",
157
157
"required": [
158
158
"instanceId",
159
159
"audioInput"
160
160
],
161
161
"properties": {
162
162
"audioInput": {
163
163
"type": "string",
164
164
"maxLength": 64,
165
165
"minLength": 1
166
166
},
167
167
"instanceId": {
168
168
"type": "string",
169
169
"maxLength": 64,
170
170
"minLength": 1
171
171
}
172
172
}
173
173
},
174
174
"position": {
175
175
"type": "object",
176
176
"required": [
177
177
"x",
178
178
"y"
179
179
],
180
180
"properties": {
181
181
"x": {
182
182
"type": "integer"
183
183
},
184
184
"y": {
185
185
"type": "integer"
186
186
}
187
187
}
188
188
},
189
189
"midiRoute": {
190
190
"type": "object",
191
191
"required": [
192
192
"instanceId",
193
193
"midiInput"
194
194
],
195
195
"properties": {
196
196
"from": {
197
197
"ref": "#noteOutputRef",
198
198
"type": "ref",
199
199
"description": "The note output these notes leave. Absent where they come from the player."
200
200
},
201
201
"midiInput": {
202
202
"type": "string",
203
203
"maxLength": 64,
204
-
"minLength": 1
204
+
"minLength": 1,
205
+
"description": "The note input, one of the module's `midiInputs`, these notes arrive at. It receives note events from any note source; \"MIDI\" is the historical name."
205
206
},
206
207
"instanceId": {
207
208
"type": "string",
208
209
"maxLength": 64,
209
210
"minLength": 1
210
211
}
211
212
},
212
-
"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."
213
+
"description": "Where one instance's notes come from. `instanceId` and `midiInput` name the note input they arrive at; `from` names the note output they leave. \"MIDI\" in these names is historical: a route carries note events from any note source, a sequencer as much as a MIDI device. **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."
213
214
},
214
215
"moduleRef": {
215
216
"type": "object",
216
217
"required": [
217
218
"moduleId",
218
219
"versionKey",
219
220
"authorDid"
220
221
],
221
222
"properties": {
222
223
"moduleId": {
223
224
"type": "string",
224
225
"maxLength": 128,
225
226
"minLength": 1
226
227
},
227
228
"authorDid": {
228
229
"type": "string",
229
230
"format": "did"
230
231
},
231
232
"versionKey": {
232
233
"type": "string",
233
234
"maxLength": 128,
234
-
"minLength": 1
235
+
"minLength": 1,
236
+
"description": "The pinned version's record key, which is also the `versionKey` that version carries. A reader fetches the module record at this key."
235
237
}
236
238
},
237
239
"description": "A pin to one exact published version of a module. Resolving it fetches that record, whoever authored it."
238
240
},
239
241
"noteEvent": {
240
242
"type": "object",
241
243
"required": [
242
244
"note"
243
245
],
244
246
"properties": {
245
247
"at": {
246
248
"type": "integer",
247
249
"minimum": 0,
248
250
"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."
249
251
},
250
252
"hold": {
251
253
"type": "integer",
252
254
"minimum": 1,
253
255
"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."
254
256
},
255
257
"note": {
256
258
"type": "integer",
257
259
"maximum": 127,
258
260
"minimum": 0,
259
261
"description": "The MIDI note number. 60 is middle C."
260
262
},
261
263
"step": {
262
264
"type": "integer",
263
265
"minimum": 0,
264
266
"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."
265
267
},
266
268
"length": {
267
269
"type": "integer",
268
270
"minimum": 1,
269
271
"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."
272
+
},
273
+
"velocity": {
274
+
"type": "integer",
275
+
"maximum": 127,
276
+
"minimum": 1,
277
+
"description": "How hard this note is struck, on the MIDI scale. It is part of what is played rather than how it is listened to — a phrase is written with its accents in it, and a loop where every note lands identically is a loop nobody wrote. Optional permanently: a note that says nothing is struck at 100, which is what every pattern written before a note could say says, and a note struck at 100 writes no field. Nought is not offered, since a note that could never be heard is a note taken off the loop rather than one written onto it."
270
278
}
271
279
},
272
-
"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."
280
+
"description": "One note struck at one moment of the loop, held from it, and struck as hard as it says. 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."
273
281
},
274
282
"outputRef": {
275
283
"type": "object",
276
284
"required": [
277
285
"instanceId",
278
286
"audioOutput"
279
287
],
280
288
"properties": {
281
289
"instanceId": {
282
290
"type": "string",
283
291
"maxLength": 64,
284
292
"minLength": 1
285
293
},
286
294
"audioOutput": {
287
295
"type": "string",
288
296
"maxLength": 64,
289
297
"minLength": 1
290
298
}
291
299
}
292
300
},
293
301
"connection": {
294
302
"type": "object",
295
303
"required": [
296
304
"from",
297
305
"to"
298
306
],
299
307
"properties": {
300
308
"to": {
301
309
"ref": "#inputRef",
302
310
"type": "ref"
303
311
},
304
312
"from": {
305
313
"ref": "#outputRef",
306
314
"type": "ref"
307
315
}
308
316
},
309
317
"description": "An audio connection between two module instances, naming the declared ports at each end."
310
318
},
311
319
"resolution": {
312
320
"type": "object",
313
321
"required": [
314
322
"value"
315
323
],
316
324
"properties": {
317
325
"unit": {
318
326
"type": "string",
319
327
"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.",
320
328
"knownValues": [
321
329
"normal",
322
330
"triplet"
323
331
]
324
332
},
325
333
"value": {
326
334
"type": "string",
327
335
"description": "The note value one step is worth. A bar is four beats.",
328
336
"knownValues": [
329
337
"bar",
330
338
"1/2",
331
339
"1/4",
332
340
"1/8",
333
341
"1/16",
334
342
"1/32",
335
343
"1/64",
336
344
"1/128"
337
345
]
338
346
}
339
347
},
340
348
"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."
341
349
},
342
350
"midiControl": {
343
351
"type": "object",
344
352
"required": [
345
353
"parameter",
346
354
"controller"
347
355
],
348
356
"properties": {
349
357
"parameter": {
350
358
"type": "string",
351
359
"maxLength": 64,
352
360
"minLength": 1,
353
361
"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."
354
362
},
355
363
"controller": {
356
364
"type": "integer",
357
365
"maximum": 127,
358
366
"minimum": 0,
359
367
"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."
360
368
}
361
369
},
362
370
"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."
363
371
},
364
372
"notePattern": {
365
373
"type": "object",
366
374
"required": [
367
375
"bars",
368
376
"resolution"
369
377
],
370
378
"properties": {
371
379
"bars": {
372
380
"type": "integer",
373
381
"maximum": 8,
374
382
"minimum": 1,
375
383
"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."
376
384
},
377
385
"active": {
378
386
"type": "integer",
379
387
"minimum": 0,
380
388
"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."
381
389
},
382
390
"events": {
383
391
"type": "array",
384
392
"items": {
385
393
"ref": "#noteEvent",
386
394
"type": "ref"
387
395
},
388
396
"maxLength": 2048,
389
397
"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."
390
398
},
391
399
"alternates": {
392
400
"type": "array",
393
401
"items": {
394
402
"ref": "#alternatePattern",
395
403
"type": "ref"
396
404
},
397
405
"maxLength": 7,
398
406
"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."
399
407
},
400
408
"resolution": {
401
409
"ref": "#resolution",
402
410
"type": "ref",
403
411
"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."
404
412
}
405
413
},
406
414
"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."
407
415
},
408
416
"noteOutputRef": {
409
417
"type": "object",
410
418
"required": [
411
419
"instanceId",
412
420
"noteOutput"
413
421
],
414
422
"properties": {
415
423
"instanceId": {
416
424
"type": "string",
417
425
"maxLength": 64,
418
426
"minLength": 1
419
427
},
420
428
"noteOutput": {
421
429
"type": "string",
422
430
"maxLength": 64,
423
431
"minLength": 1
424
432
}
425
433
}
426
434
},
427
435
"moduleInstance": {
428
436
"type": "object",
429
437
"required": [
430
438
"instanceId",
431
439
"module",
432
440
"voiceScope"
433
441
],
434
442
"properties": {
435
443
"glide": {
436
444
"ref": "#glide",
437
445
"type": "ref",
438
446
"description": "Whether the notes this instance plays slide into one another, and how. It lives here, in the patch, beside the unison and for the unison's reason: how a line slides is a decision about this use of the module, and forks with the patch. The player's own glide is a setting of their browser and says nothing about this one, so a loop written to slide slides for everyone who opens the patch, and a loop that does not is never made monophonic by the player's. Optional permanently: an instance that says nothing has no glide, which is what every record written before this field existed says."
439
447
},
440
448
"module": {
441
449
"ref": "#moduleRef",
442
450
"type": "ref"
443
451
},
444
452
"unison": {
445
453
"type": "integer",
446
454
"maximum": 6,
447
455
"minimum": 1,
448
456
"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."
449
457
},
450
458
"enabled": {
451
459
"type": "boolean",
452
460
"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."
453
461
},
454
462
"position": {
455
463
"ref": "#position",
456
464
"type": "ref",
457
465
"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."
458
466
},
459
467
"instanceId": {
460
468
"type": "string",
461
469
"maxLength": 64,
462
470
"minLength": 1
463
471
},
464
472
"voiceScope": {
465
473
"enum": [
466
474
"perNote",
467
475
"perPatch"
468
476
],
469
477
"type": "string",
470
478
"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."
471
479
},
472
480
"notePattern": {
473
481
"ref": "#notePattern",
474
482
"type": "ref",
475
483
"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."
476
484
},
477
485
"midiControls": {
478
486
"type": "array",
479
487
"items": {
480
488
"ref": "#midiControl",
481
489
"type": "ref"
482
490
},
483
491
"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."
484
492
},
485
493
"parameterValues": {
486
494
"type": "array",
487
495
"items": {
488
496
"ref": "#parameterValue",
489
497
"type": "ref"
490
498
}
491
499
},
492
500
"sampleSlotFills": {
493
501
"type": "array",
494
502
"items": {
495
503
"ref": "#sampleSlotFill",
496
504
"type": "ref"
497
505
},
498
506
"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."
499
507
}
500
508
},
501
509
"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."
502
510
},
503
511
"parameterValue": {
504
512
"type": "object",
505
513
"required": [
506
514
"id"
507
515
],
508
516
"properties": {
509
517
"id": {
510
518
"type": "string",
511
519
"maxLength": 64,
512
520
"minLength": 1
513
521
},
514
522
"value": {
515
523
"type": "string",
516
524
"maxLength": 200,
517
525
"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."
518
526
},
519
527
"useDefault": {
520
528
"type": "boolean",
521
529
"description": "Set where the patch explicitly defers to the module's default rather than recording a value."
522
530
}
523
531
},
524
532
"description": "A value for one of the module's exposed parameters, or an explicit fall-back to the module's declared default."
525
533
},
526
534
"sampleSlotFill": {
527
535
"type": "object",
528
536
"required": [
529
537
"slotId",
530
538
"blob",
531
539
"ownerDid"
532
540
],
533
541
"properties": {
534
542
"blob": {
535
543
"type": "blob",
536
544
"accept": [
537
545
"audio/wav"
538
546
],
539
547
"maxSize": 2097152
540
548
},
541
549
"slotId": {
542
550
"type": "string",
543
551
"maxLength": 64,
544
552
"minLength": 1
545
553
},
546
554
"ownerDid": {
547
555
"type": "string",
548
556
"format": "did"
549
557
}
550
558
}
551
559
},
552
560
"alternatePattern": {
553
561
"type": "object",
554
562
"required": [
555
563
"bars"
556
564
],
557
565
"properties": {
558
566
"bars": {
559
567
"type": "integer",
560
568
"maximum": 8,
561
569
"minimum": 1,
562
570
"description": "How long this loop is, in bars of four beats."
563
571
},
564
572
"events": {
565
573
"type": "array",
566
574
"items": {
567
575
"ref": "#noteEvent",
568
576
"type": "ref"
569
577
},
570
578
"maxLength": 2048,
571
579
"description": "The notes in this loop."
572
580
}
573
581
},
574
582
"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."
575
583
}
576
584
},
577
585
"$type": "com.atproto.lexicon.schema",
578
586
"lexicon": 1,
579
587
"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."
580
588
}