playrig 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/AGENTS.md +106 -0
  2. package/LICENSE +37 -0
  3. package/README.md +77 -2
  4. package/bin/playrig.js +4 -0
  5. package/editions/ae/README.md +144 -0
  6. package/editions/ae/client/aeb.js +9 -0
  7. package/editions/ae/examples/hello.jsx +3 -0
  8. package/editions/ae/examples/inspect.jsx +7 -0
  9. package/editions/ae/examples/snap.jsx +15 -0
  10. package/editions/ae/lib/actions.json +159 -0
  11. package/editions/ae/lib/bridge-api.jsxinc +474 -0
  12. package/editions/ae/lib/dev.jsxinc +21 -0
  13. package/editions/ae/lib/icons/README.md +4 -0
  14. package/editions/ae/lib/icons/dot-error.svg +3 -0
  15. package/editions/ae/lib/icons/dot-idle.svg +3 -0
  16. package/editions/ae/lib/icons/dot-running.svg +3 -0
  17. package/editions/ae/lib/icons/make-png.js +25 -0
  18. package/editions/ae/lib/icons/png/dot-error.png +0 -0
  19. package/editions/ae/lib/icons/png/dot-error@2x.png +0 -0
  20. package/editions/ae/lib/icons/png/dot-idle.png +0 -0
  21. package/editions/ae/lib/icons/png/dot-idle@2x.png +0 -0
  22. package/editions/ae/lib/icons/png/dot-running.png +0 -0
  23. package/editions/ae/lib/icons/png/dot-running@2x.png +0 -0
  24. package/editions/ae/lib/icons/png/power-off.png +0 -0
  25. package/editions/ae/lib/icons/png/power-off@2x.png +0 -0
  26. package/editions/ae/lib/icons/png/power-on.png +0 -0
  27. package/editions/ae/lib/icons/png/power-on@2x.png +0 -0
  28. package/editions/ae/lib/icons/png/settings.png +0 -0
  29. package/editions/ae/lib/icons/png/settings@2x.png +0 -0
  30. package/editions/ae/lib/icons/png/status-error.png +0 -0
  31. package/editions/ae/lib/icons/png/status-error@2x.png +0 -0
  32. package/editions/ae/lib/icons/png/status-ok.png +0 -0
  33. package/editions/ae/lib/icons/png/status-ok@2x.png +0 -0
  34. package/editions/ae/lib/icons/png/status-rejected.png +0 -0
  35. package/editions/ae/lib/icons/png/status-rejected@2x.png +0 -0
  36. package/editions/ae/lib/icons/png/status-timeout.png +0 -0
  37. package/editions/ae/lib/icons/png/status-timeout@2x.png +0 -0
  38. package/editions/ae/lib/icons/png/status-unknown.png +0 -0
  39. package/editions/ae/lib/icons/png/status-unknown@2x.png +0 -0
  40. package/editions/ae/lib/icons/power-off.svg +4 -0
  41. package/editions/ae/lib/icons/power-on.svg +4 -0
  42. package/editions/ae/lib/icons/settings.svg +4 -0
  43. package/editions/ae/lib/icons/status-error.svg +4 -0
  44. package/editions/ae/lib/icons/status-ok.svg +4 -0
  45. package/editions/ae/lib/icons/status-rejected.svg +4 -0
  46. package/editions/ae/lib/icons/status-timeout.svg +4 -0
  47. package/editions/ae/lib/icons/status-unknown.svg +5 -0
  48. package/editions/ae/lib/panel-core.jsxinc +249 -0
  49. package/editions/ae/lib/update-key.pem +11 -0
  50. package/editions/ae/lib/updater.jsxinc +148 -0
  51. package/editions/ae/library-starter/INDEX.md +5 -0
  52. package/editions/ae/library-starter/README.md +161 -0
  53. package/editions/ae/library-starter/_common.jsx +187 -0
  54. package/editions/ae/library-starter/categories.json +9 -0
  55. package/editions/ae/library-starter/recipes/.gitkeep +0 -0
  56. package/editions/ae/package.json +7 -0
  57. package/editions/ae/panel/Playrig.jsx +39 -0
  58. package/editions/ae/panel/core.jsx +1026 -0
  59. package/editions/ae/skills/create-ae-recipe/SKILL.md +85 -0
  60. package/editions/ae/skills/create-ae-recipe/references/ae-patterns.md +88 -0
  61. package/editions/ae/skills/create-ae-recipe/references/video-analysis.md +72 -0
  62. package/editions/ae/skills/create-ae-recipe/scripts/media +5 -0
  63. package/editions/ae/skills/create-ae-recipe/scripts/media.py +253 -0
  64. package/editions/ae/skills/create-ae-recipe/scripts/setup.sh +17 -0
  65. package/editions/ae/skills/create-ae-video/SKILL.md +88 -0
  66. package/editions/ae/skills/create-ae-video/references/templates.md +90 -0
  67. package/editions/ae/skills/create-ae-video/scripts/preflight.js +99 -0
  68. package/editions/ae/skills/use-ae-recipes/SKILL.md +99 -0
  69. package/editions/ae/skills/use-ae-recipes/scripts/contact-sheet.jsx +10 -0
  70. package/editions/ae/skills/use-ae-recipes/scripts/edit-text.jsx +12 -0
  71. package/editions/ae/skills/use-ae-recipes/scripts/remove-comp.jsx +18 -0
  72. package/editions/pr/README.md +60 -0
  73. package/editions/pr/SCORE_PROCESS.md +41 -0
  74. package/editions/pr/client/aeb.js +9 -0
  75. package/editions/pr/examples/frame.js +6 -0
  76. package/editions/pr/examples/hello.js +4 -0
  77. package/editions/pr/organize.default.json +245 -0
  78. package/editions/pr/package.json +7 -0
  79. package/editions/pr/plugin/actions.js +79 -0
  80. package/editions/pr/plugin/dev.js +19 -0
  81. package/editions/pr/plugin/icons/README.md +4 -0
  82. package/editions/pr/plugin/icons/file-code.svg +6 -0
  83. package/editions/pr/plugin/icons/folder.svg +3 -0
  84. package/editions/pr/plugin/icons/power-off.svg +4 -0
  85. package/editions/pr/plugin/icons/power-on.svg +4 -0
  86. package/editions/pr/plugin/icons/settings.svg +4 -0
  87. package/editions/pr/plugin/icons/status-error.svg +4 -0
  88. package/editions/pr/plugin/icons/status-ok.svg +4 -0
  89. package/editions/pr/plugin/icons/status-rejected.svg +4 -0
  90. package/editions/pr/plugin/icons/status-timeout.svg +4 -0
  91. package/editions/pr/plugin/icons/status-unknown.svg +5 -0
  92. package/editions/pr/plugin/incremental.js +212 -0
  93. package/editions/pr/plugin/index.html +195 -0
  94. package/editions/pr/plugin/index.js +710 -0
  95. package/editions/pr/plugin/manifest.json +45 -0
  96. package/editions/pr/plugin/organize.js +223 -0
  97. package/editions/pr/skills/score-video/SKILL.md +69 -0
  98. package/editions/pr/skills/score-video/scripts/mix.py +112 -0
  99. package/editions/pr/skills/score-video/scripts/place.js +63 -0
  100. package/lib/ae.js +754 -0
  101. package/lib/common.js +132 -0
  102. package/lib/install.js +149 -0
  103. package/lib/main.js +107 -0
  104. package/lib/payload.js +84 -0
  105. package/lib/pr.js +239 -0
  106. package/lib/update.js +119 -0
  107. package/package.json +35 -4
  108. package/skills/create-video/SKILL.md +72 -0
  109. package/skills/create-video/references/lessons.md +31 -0
  110. package/skills/create-video/references/project-conventions.md +46 -0
  111. package/skills/create-video/scripts/ae/list-project.jsx +8 -0
  112. package/skills/create-video/scripts/ae/move-chips.jsx +14 -0
  113. package/skills/create-video/scripts/ae/organize-project.jsx +25 -0
  114. package/skills/create-video/scripts/ae/quadrant-chips.jsx +143 -0
  115. package/skills/create-video/scripts/ae/render-comps.jsx +16 -0
  116. package/skills/create-video/scripts/premiere/export-sequences.js +22 -0
  117. package/skills/create-video/scripts/premiere/make-sequences.js +24 -0
  118. package/skills/create-video/scripts/premiere/swap-media.js +43 -0
@@ -0,0 +1,45 @@
1
+ {
2
+ "manifestVersion": 5,
3
+ "id": "playrig.premiere",
4
+ "name": "Playrig",
5
+ "version": "0.1.1",
6
+ "main": "index.html",
7
+ "host": {
8
+ "app": "premierepro",
9
+ "minVersion": "25.6.0"
10
+ },
11
+ "entrypoints": [
12
+ {
13
+ "type": "panel",
14
+ "id": "playrig",
15
+ "label": {
16
+ "default": "Playrig"
17
+ },
18
+ "minimumSize": {
19
+ "width": 240,
20
+ "height": 200
21
+ },
22
+ "preferredDockedSize": {
23
+ "width": 300,
24
+ "height": 320
25
+ }
26
+ }
27
+ ],
28
+ "requiredPermissions": {
29
+ "localFileSystem": "fullAccess",
30
+ "network": {
31
+ "domains": [
32
+ "https://raw.githubusercontent.com"
33
+ ]
34
+ },
35
+ "launchProcess": {
36
+ "schemes": [
37
+ "https"
38
+ ],
39
+ "extensions": [
40
+ ".json",
41
+ ""
42
+ ]
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,223 @@
1
+ // Project organizer. Keeps the Premiere project panel in a bin structure that is DATA, not code:
2
+ // the effective structure is a JSON file (bins + what they mean + the rules that decide where an item goes).
3
+ //
4
+ // Where the structure comes from (first that exists wins):
5
+ // 1. <project folder>/EDIT_LOGS/organize.json per project; travels with the project
6
+ // 2. <bridge root>/organize.json your personal default for every project
7
+ // 3. the built-in default below (Dan Mace's scheme: "How to master the art of filmmaking")
8
+ // Any key missing from a file falls back to the built-in default. The panel's "Edit structure" button writes the effective
9
+ // structure to (1) so there is a file to edit.
10
+ //
11
+ // Used by the panel (Organize button, auto-filing after jobs) and available to jobs as PLAYRIG.organizeProject(...), PLAYRIG.fileStrays(...).
12
+ // Also usable as plain code inside a job: makeOrganizer(ppro, PLAYRIG.project, BRIDGE).
13
+
14
+ const ORGANIZE_DEFAULT = {
15
+ version: 1,
16
+ name: "Dan Mace scheme",
17
+ help: [
18
+ "bins: the structure. 'path' uses / for sub-bins. 'meaning' is documentation for people. 'create: true' = the Organize button creates it when missing.",
19
+ "archive: bin for things added but not used. Items are only moved there on request, never deleted.",
20
+ "protect: bins whose contents are never moved by organizing (the archive is a deliberate decision).",
21
+ "rules: checked in order, the first match wins. 'when' can have: kind (sequence | media | generated), name (regex on the item name),",
22
+ " path (regex on the media file path, case-insensitive), ext (list of file extensions without the dot). 'bin' = destination, 'skip: true' = leave alone.",
23
+ " Items no rule matches are reported as 'needs a decision' and not moved.",
24
+ "auto-filing (after every job) only files NEW loose items at the project root; the Organize button also corrects items in the wrong scheme bin."
25
+ ],
26
+ archive: "99_ARCHIVE",
27
+ protect: ["99_ARCHIVE"],
28
+ bins: [
29
+ { path: "1_MASTER", create: true, meaning: "The deliverables (what gets exported). Several allowed, one per format. Name them 'MASTER - Title (Format)'." },
30
+ { path: "2_FOOTAGE/IMAGES", create: true, meaning: "Stills to insert somewhere." },
31
+ { path: "2_FOOTAGE/RAW", create: true, meaning: "Camera recordings and other raw source video." },
32
+ { path: "2_FOOTAGE/RENDERS", create: true, meaning: "Video rendered elsewhere (e.g. After Effects renders) and used as source." },
33
+ { path: "2_FOOTAGE/GRADED", create: true, meaning: "Graded versions of the raw footage." },
34
+ { path: "3_SELECTS", create: true, meaning: "Sequences that are scenes / parts of the video, later merged into the master. Name them 'SEL nn - <scene>'." },
35
+ { path: "4_INTERVIEW", create: false, meaning: "Only for podcast / interview projects. Set create to true to use it." },
36
+ { path: "5_SOUND", create: true, meaning: "Voiceovers, recorded audio, sound effects." },
37
+ { path: "6_MUSIC", create: true, meaning: "Music (non-diegetic)." },
38
+ { path: "7_LAYERS", create: true, meaning: "Adjustment layers, mattes and other generated layers." },
39
+ { path: "99_ARCHIVE", create: true, meaning: "Things added but not used in the project." }
40
+ ],
41
+ rules: [
42
+ { when: { kind: "sequence", name: " Copy( \\d+)?$" }, skip: true, note: "scratch clones" },
43
+ { when: { kind: "sequence", name: "^Sequence Template$" }, skip: true, note: "the template for new sequences" },
44
+ { when: { kind: "sequence", name: "^MASTER\\b" }, bin: "1_MASTER" },
45
+ { when: { kind: "sequence", name: "^SEL\\b" }, bin: "3_SELECTS" },
46
+ { when: { kind: "generated" }, bin: "7_LAYERS", note: "items with no media file: adjustment layers, mattes, bars" },
47
+ { when: { kind: "media", ext: ["mp4", "mov", "mxf", "m4v", "avi", "mkv", "r3d", "braw", "webm", "mts"], path: "/graded/" }, bin: "2_FOOTAGE/GRADED" },
48
+ { when: { kind: "media", ext: ["mp4", "mov", "mxf", "m4v", "avi", "mkv", "r3d", "braw", "webm", "mts"], name: "^V\\d+-\\d+_" }, bin: "2_FOOTAGE/GRADED", note: "DaVinci Resolve render names" },
49
+ { when: { kind: "media", ext: ["mp4", "mov", "mxf", "m4v", "avi", "mkv", "r3d", "braw", "webm", "mts"], path: "/(ae_motion|renders?|ae_renders?)/" }, bin: "2_FOOTAGE/RENDERS" },
50
+ { when: { kind: "media", ext: ["mp4", "mov", "mxf", "m4v", "avi", "mkv", "r3d", "braw", "webm", "mts"] }, bin: "2_FOOTAGE/RAW" },
51
+ { when: { kind: "media", ext: ["png", "jpg", "jpeg", "tif", "tiff", "psd", "ai", "gif", "bmp", "exr", "dpx", "heic", "webp", "svg"] }, bin: "2_FOOTAGE/IMAGES" },
52
+ { when: { kind: "media", ext: ["wav", "mp3", "aif", "aiff", "m4a", "flac", "aac", "ogg"], path: "/(\\d+_)?music/" }, bin: "6_MUSIC", note: "audio from a music folder" },
53
+ { when: { kind: "media", ext: ["wav", "mp3", "aif", "aiff", "m4a", "flac", "aac", "ogg"] }, bin: "5_SOUND" }
54
+ ]
55
+ };
56
+
57
+ function makeOrganizer(ppro, project, B) {
58
+ const cast = (it) => { try { return ppro.FolderItem.cast(it); } catch (e) { return null; } };
59
+ const projectDir = () => String(project.path || "").replace(/\\/g, "/").replace(/\/[^/]*$/, "");
60
+ const projectFile = () => projectDir() + "/EDIT_LOGS/organize.json";
61
+ const globalFile = () => String(B.root || "").replace(/\\/g, "/") + "/organize.json";
62
+ const fsx = () => require("fs");
63
+
64
+ // ---- structure (data) ----
65
+ async function readJson(f) { try { return JSON.parse(await fsx().readFile(f, { encoding: "utf-8" })); } catch (e) { return e && /no such file|ENOENT/i.test(e.message || "") ? null : { __error: e.message }; } }
66
+
67
+ function validate(s) {
68
+ const problems = [];
69
+ if (!Array.isArray(s.bins)) problems.push("'bins' must be a list");
70
+ if (!Array.isArray(s.rules)) problems.push("'rules' must be a list");
71
+ (s.rules || []).forEach((r, i) => {
72
+ if (!r || typeof r !== "object") { problems.push("rules[" + i + "] is not an object"); return; }
73
+ if (!r.skip && typeof r.bin !== "string") problems.push("rules[" + i + "] needs a 'bin' (or skip: true)");
74
+ for (const k of ["name", "path"]) if (r.when && r.when[k]) { try { new RegExp(r.when[k], "i"); } catch (e) { problems.push("rules[" + i + "].when." + k + " is not a valid regex: " + e.message); } }
75
+ if (r.when && r.when.ext && !Array.isArray(r.when.ext)) problems.push("rules[" + i + "].when.ext must be a list");
76
+ if (r.when && r.when.kind && !["sequence", "media", "generated"].includes(r.when.kind)) problems.push("rules[" + i + "].when.kind must be sequence, media or generated");
77
+ if (r.bin && Array.isArray(s.bins) && !s.bins.some((b) => b.path === r.bin)) problems.push("rules[" + i + "].bin '" + r.bin + "' is not listed in 'bins' (it will still be created when needed)");
78
+ });
79
+ return problems;
80
+ }
81
+
82
+ // -> { structure, source: "project file" | "bridge folder file" | "built-in default", file, warnings }
83
+ async function loadStructure() {
84
+ for (const [label, f] of [["project file", projectFile()], ["bridge folder file", globalFile()]]) {
85
+ const j = await readJson(f);
86
+ if (j && j.__error) return { structure: ORGANIZE_DEFAULT, source: "built-in default", file: f, warnings: ["could not read " + f + ": " + j.__error + " (using the built-in default)"] };
87
+ if (j) {
88
+ const s = Object.assign({}, ORGANIZE_DEFAULT, j), problems = validate(s).filter((p) => !/is not listed in 'bins'/.test(p));
89
+ if (problems.length) return { structure: ORGANIZE_DEFAULT, source: "built-in default", file: f, warnings: [f + " is invalid, using the built-in default: " + problems.join("; ")] };
90
+ return { structure: s, source: label, file: f, warnings: [] };
91
+ }
92
+ }
93
+ return { structure: ORGANIZE_DEFAULT, source: "built-in default", file: null, warnings: [] };
94
+ }
95
+
96
+ // Write the effective structure to the project's EDIT_LOGS/organize.json (only if there is none), so people have a file to edit.
97
+ async function writeStructure(opts) {
98
+ const f = projectFile(), fs = fsx();
99
+ if (!(opts && opts.overwrite)) { try { await fs.lstat(f); return { file: f, created: false }; } catch (e) { } }
100
+ const { structure } = await loadStructure();
101
+ await fs.writeFile(f, JSON.stringify(structure, null, 2) + "\n", { encoding: "utf-8" });
102
+ return { file: f, created: true };
103
+ }
104
+
105
+ // ---- scan + classify ----
106
+ async function scan() {
107
+ const seqIds = new Set();
108
+ for (const s of await project.getSequences()) { try { seqIds.add(String(await (await s.getProjectItem()).getId())); } catch (e) { } }
109
+ const rows = [], root = await project.getRootItem();
110
+ async function walk(folder, path) {
111
+ for (const it of await folder.getItems()) {
112
+ const bin = cast(it), id = String(await it.getId());
113
+ const row = { item: it, id, name: it.name, path, isBin: !!bin, parent: folder, file: "", isSeq: seqIds.has(id) };
114
+ if (!bin) { try { row.file = (await ppro.ClipProjectItem.cast(it).getMediaFilePath()) || ""; } catch (e) { } }
115
+ rows.push(row);
116
+ if (bin) await walk(bin, path ? path + "/" + it.name : it.name);
117
+ }
118
+ }
119
+ await walk(root, "");
120
+ return { root, rows };
121
+ }
122
+
123
+ function kindOf(row) {
124
+ if (row.isSeq) return "sequence";
125
+ const f = String(row.file || "");
126
+ return (!f || !/[/.]/.test(f) || /^\d+$/.test(f)) ? "generated" : "media";
127
+ }
128
+
129
+ // { bin } | { skip, note } | { decision }
130
+ function classify(row, structure) {
131
+ const kind = kindOf(row), file = String(row.file || "").replace(/\\/g, "/"), base = file.replace(/^.*\//, "");
132
+ const ext = (/\.([A-Za-z0-9]+)$/.exec(base) || [])[1] || "";
133
+ for (const r of structure.rules) {
134
+ const w = r.when || (r.path ? { path: r.path } : {}); // also accepts the short form { path, bin }
135
+ if (w.kind && w.kind !== kind) continue;
136
+ if (w.name && !new RegExp(w.name, "i").test(row.name)) continue;
137
+ if (w.path && !new RegExp(w.path, "i").test(file)) continue;
138
+ if (w.ext && !w.ext.map((e) => String(e).toLowerCase()).includes(ext.toLowerCase())) continue;
139
+ return r.skip ? { skip: r.note || "rule says skip" } : { bin: r.bin };
140
+ }
141
+ return { decision: kind === "sequence" ? "sequence with no role: name it 'MASTER - ...' (deliverable) or 'SEL nn - ...' (scene), or add a rule" : "no rule matches " + (ext ? "." + ext + " files" : "this item") };
142
+ }
143
+
144
+ // ---- bins ----
145
+ async function findBin(root, path) {
146
+ let cur = root;
147
+ for (const seg of path.split("/").filter(Boolean)) {
148
+ let next = null;
149
+ for (const it of await cur.getItems()) { const b = cast(it); if (b && it.name === seg) { next = b; break; } }
150
+ if (!next) return null;
151
+ cur = next;
152
+ }
153
+ return cur;
154
+ }
155
+
156
+ async function ensureBin(path) {
157
+ const root = await project.getRootItem();
158
+ let cur = root, built = "";
159
+ for (const seg of path.split("/").filter(Boolean)) {
160
+ built = built ? built + "/" + seg : seg;
161
+ let next = await findBin(root, built);
162
+ if (!next) {
163
+ const parent = cur;
164
+ await B.transact("Playrig: create bin " + built, (ca) => { ca.addAction(parent.createBinAction(seg, false)); });
165
+ next = await findBin(root, built);
166
+ if (!next) throw new Error("organize: could not create bin " + built);
167
+ }
168
+ cur = next;
169
+ }
170
+ return cur;
171
+ }
172
+
173
+ async function moveItem(row, binPath) {
174
+ const target = await ensureBin(binPath);
175
+ await B.transact("Playrig: file " + row.name + " -> " + binPath, (ca) => { ca.addAction(row.parent.createMoveItemAction(row.item, target)); });
176
+ }
177
+
178
+ // ---- plan / apply ----
179
+ // opts.fix: also correct items sitting in the wrong bin of the scheme (the Organize button). Default: only loose root items (auto-filing).
180
+ // Never touches: bins, protected bins (archive), items in bins that are not part of the scheme (your own bins), skipped items, unclassifiable items.
181
+ async function plan(opts) {
182
+ opts = opts || {};
183
+ const { structure, source, file, warnings } = await loadStructure();
184
+ const { rows } = await scan();
185
+ const schemePaths = new Set(); structure.bins.forEach((b) => { const seg = b.path.split("/"); for (let i = 1; i <= seg.length; i++) schemePaths.add(seg.slice(0, i).join("/")); });
186
+ const protectedBins = (structure.protect || []).concat(structure.archive ? [structure.archive] : []);
187
+ const inProtected = (p) => protectedBins.some((b) => p === b || p.startsWith(b + "/"));
188
+ const out = { moves: [], decisions: [], source, file, warnings, structure };
189
+ for (const r of rows) {
190
+ if (r.isBin) continue;
191
+ const loose = r.path === "";
192
+ if (!loose) { if (!opts.fix || inProtected(r.path) || !schemePaths.has(r.path)) continue; }
193
+ const c = classify(r, structure);
194
+ if (c.skip) continue;
195
+ if (c.decision) { if (loose) out.decisions.push({ name: r.name, why: c.decision }); continue; }
196
+ if (c.bin === r.path) continue;
197
+ out.moves.push({ row: r, name: r.name, from: r.path || "(root)", to: c.bin });
198
+ }
199
+ return out;
200
+ }
201
+
202
+ // Applies a plan's moves in ONE transaction (one undo step). opts.scheme: also create every scheme bin marked create:true.
203
+ async function organizeProject(opts) {
204
+ opts = opts || {};
205
+ const p = await plan(opts), created = [];
206
+ if (opts.dryRun) return { wouldMove: p.moves.map((m) => m.name + ": " + m.from + " -> " + m.to), decisions: p.decisions, source: p.source, warnings: p.warnings };
207
+ if (opts.scheme) for (const b of p.structure.bins) if (b.create && !(await findBin(await project.getRootItem(), b.path))) { await ensureBin(b.path); created.push(b.path); }
208
+ const targets = {};
209
+ for (const m of p.moves) if (!targets[m.to]) targets[m.to] = await ensureBin(m.to);
210
+ if (p.moves.length) await B.transact("Playrig: organize " + p.moves.length + " item(s)", (ca) => { for (const m of p.moves) ca.addAction(m.row.parent.createMoveItemAction(m.row.item, targets[m.to])); });
211
+ return { moved: p.moves.map((m) => m.name + ": " + m.from + " -> " + m.to), createdBins: created, decisions: p.decisions, source: p.source, warnings: p.warnings };
212
+ }
213
+ // Auto-filing after jobs: loose root items only.
214
+ const fileStrays = (opts) => organizeProject(Object.assign({}, opts, { fix: false, scheme: false }));
215
+
216
+ // Import files straight into a bin (created if missing) instead of the project root.
217
+ async function importInto(paths, binPath) {
218
+ const bin = await ensureBin(binPath);
219
+ return project.importFiles(paths, true, bin);
220
+ }
221
+
222
+ return { organizeScan: scan, organizePlan: plan, organizeProject, fileStrays, ensureBin, moveItem, importInto, classify, loadStructure, writeStructure, organizeStructureFile: projectFile };
223
+ }
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: score-video
3
+ description: Add a music score plus sound effects to a finished video in Premiere Pro, using Epidemic Sound and the playrig-pr. Derives a music brief from the video's own timeline (mood, BPM from the motion cadence), finds and length-fits a track, picks SFX for the key moments, builds a typewriter bed, ducks the music under the effects with a measured sidechain, and lays everything on separate audio tracks as one undo step. Use when the user asks for a music bed, score, soundtrack, sound design, SFX, or "make it sound good" for a video or sequence, especially motion graphics made in After Effects.
4
+ ---
5
+
6
+ # score-video
7
+
8
+ You turn a finished (or nearly finished) picture into a scored one: music bed + sound effects, mixed so the music never fights the effects, placed in the user's open Premiere project. Process proven on a 7 s motion piece in two formats; the written-up lessons are in `premiere-bridge/SCORE_PROCESS.md`.
9
+
10
+ **Ground rules:** work in the user's open Premiere project; add audio only, never touch picture; **never save the project**; every Premiere job is one undo step; downloads go in the project's own music/sound folders; say what you could not verify (you cannot listen: only measure).
11
+
12
+ ## 0. Preflight (before asking anything)
13
+ - playrig-pr answering: `playrig pr run "$(playrig where pr)/examples/hello.js" --id pre-$RANDOM`. If not, ask the user to start the panel (Window > Extensions > Playrig, then Start).
14
+ - Epidemic Sound tools available (`mcp__epidemic-sound__*`, load via ToolSearch: SearchRecordings, EditRecording, PollEditRecordingJob, DownloadRecordingEdit, SearchSoundEffects, DownloadSoundEffect). If missing, say so and stop; do not substitute other sources.
15
+ - `ffmpeg`, `ffprobe` and `python3` on PATH.
16
+ - Find the project folder from the job log (`project:` line) and look for its music/sound folders (e.g. `3_MUSIC`, `2_SOUND`). Use them; create `2_SOUND/SFX` if needed.
17
+
18
+ ## 1. Read the timeline, then write the brief
19
+ Ask at most 3 questions, only what changes the result: which sequences, music-only or music + SFX, and a mood word if the picture does not make it obvious. Otherwise infer and state assumptions.
20
+
21
+ From the sequences get length, and from the source (AE script, storyboard or `--snap` frames) the **event list**: when does something visibly happen (reveals, pops, wipes, text typing)? Then write a 4-line brief:
22
+ - **Mood/genre** from the look (dark + technical -> minimal electronic; light + friendly -> warm acoustic/pop).
23
+ - **BPM from the cadence**: beat = 60 / BPM. Events every 0.6 s -> 100 BPM. Search a +-2 BPM window so hits can sit on beats. No regular cadence: ignore BPM.
24
+ - **Instrumental** (`vocals: false`) unless the user wants vocals.
25
+ - **SFX map**: each event type -> a sound (reveal/draw -> soft whoosh; pop -> UI pop; typing -> key ticks). One sound per event type, restraint over wall-to-wall.
26
+
27
+ ## 2. Music: search, fit, download
28
+ 1. `SearchRecordings` with `term` (mood words), `filter {bpm:{min,max}, vocals:false}`, `first: 8`, sort RELEVANCE. Results skew pop; choose by tags (mood, genre), say why in one line. Offer 2 alternatives; you cannot audition, so the user's ear is the judge (previews are the `lqmp3Url` links).
29
+ 2. `EditRecording` on the chosen id: `targetDurationMs` = sequence length in ms, `forceDuration: true`, `downloadAudioFormat: WAV`, `maxResults: 1`, `skipStems: true`. Max 5 min; for longer, fade instead. Poll `PollEditRecordingJob` until COMPLETED, then `DownloadRecordingEdit` (`jobId` + `editId`).
30
+ 3. `curl -L` the signed URL straight away into `<project>/3_MUSIC/` (it expires; copy the URL exactly, a mangled signature gives 401). `ffprobe` the duration must equal the sequence length; `ffmpeg -af ebur128` for loudness.
31
+ 4. Beat-matching is **not** reliable on syncopated tracks (band-by-band onset phase disagreed). Do not claim the beats land on the events; make the music work with the SFX by ducking (step 4).
32
+
33
+ ## 3. SFX: search, inspect, download
34
+ 1. `SearchSoundEffects` per event type with a `duration` filter (pop <= 1 s, key <= 1.5 s, whoosh 0.8-2.5 s). Pick by title/tags; WAV via `DownloadSoundEffect`; `curl` into `<project>/2_SOUND/SFX/`.
35
+ 2. **Inspect each file before using it**: print a ~20 ms peak profile. A "single key press" file had its loud strike at 0.40 s, not 0; trimming the first 0.1 s gave a near-silent tick. Use `trim` in the spec around the real transient.
36
+ 3. Sounds that should feel like a stream (typing) become a **tick bed**: one tick per 2 visible characters at 24 fps from each label's start time, alternate two gains. `mix.py` builds it from `tick_bed`.
37
+
38
+ ## 4. Mix with `scripts/mix.py` (levels + ducking, measured)
39
+ Write a spec (format in the script's docstring) and run `python3 .claude/skills/score-video/scripts/mix.py spec.json`. It:
40
+ - bakes gain into `<name>_lv.wav` copies (starting points: pops peak about -7 dBFS, whoosh about -11, ticks about -22),
41
+ - builds `typewriter_bed.wav` and a sidechain key of all SFX at their times,
42
+ - writes the ducked score (music -3 dB, `sidechaincompress threshold 0.02 ratio 3 attack 8 release 300 level_sc 0.25`) padded/trimmed to **exactly** the sequence length (the filter drops the tail otherwise),
43
+ - prints peaks, duck depth per event (100 ms RMS vs the plain music) and the final length/LUFS.
44
+
45
+ Target: about -6 dB under pops, -1 to -2 dB under whoosh/ticks, 0 dB between events, no dip deeper than about -9 dB (the first try at -17 dB pumped). Tune `threshold`/`level_sc`/`ratio`, rerun, re-read the report. New music file name each time you regenerate while Premiere has the old one imported.
46
+
47
+ ## 5. Place in Premiere with `scripts/place.js`
48
+ Copy it, fill `CONFIG` from the report (sequence names, ducked score, `{file,time[,len]}` for every SFX placement, plus the typing bed at 0), run:
49
+ `playrig pr run <file>.js --id place-$RANDOM`.
50
+ - Layout: **A1 score at 0**, SFX on A2/A3 (lane picked so an Overwrite never cuts the previous clip's tail; one-shots 0.66 s on a 0.6 s cadence would otherwise clip).
51
+ - It imports to the project root, runs one `executeTransaction`, and prints every audio track. **Read that listing**: names, start/end, and that A1 ends at the sequence end with no remnant of an earlier score.
52
+ - Premiere snaps clips to frames (2.6 s -> 2.58 s at 24 fps): fine, say nothing unless the user asks.
53
+ - Remove superseded intermediates from the bin and disk (`root.createRemoveItemAction(item)` inside `executeTransaction`; only items nothing uses).
54
+
55
+ ## 6. Hand over
56
+ Report: track (title, artist, BPM) and why; SFX list and what each is tied to; track layout; measured levels/duck; files and where they are; that the project is **unsaved** and the mix is **measured, not heard**. Offer: swap the track, change pop loudness or duck depth, add a final hit/riser, a version for another sequence. Then update `premiere-bridge/SCORE_PROCESS.md` if you learned a new gotcha.
57
+
58
+ ## Rules of thumb
59
+ - Index first: do not re-read what is already in context; one search per sound, not a catalogue crawl.
60
+ - Never overwrite a file Premiere has imported; write a new name.
61
+ - Verify by data: duration equals sequence length, peaks, duck report, track listing. Do not claim how it sounds.
62
+ - Not for dialogue mixing or voiceover (Epidemic has `GenerateVoiceover`; that is a different workflow: duck the music under speech, same `mix.py` idea with the voice as the key).
63
+
64
+ ## Sync lessons (learned the hard way: check these before you hand over)
65
+ - **Time SFX from the picture, not from the script.** Extract frames from the rendered video and find the first frame each event is visible (typed glyphs: pixel jump in the label region; chips: brightness change in the chip box). Typewriter glyph k shows on frame `ceil(start*fps + k*framesPerChar)`. Use `tick_bed.mode = "glyph"` in `mix.py`; verify tick onsets land within a few ms of those frame times.
66
+ - **Inspect the SFX file's envelope before choosing which part is "the sound".** A "pop" file was a small click at 0 s and the real loud pop at 0.596 s; placing the whole file made every pop land ~0.6 s late. Trim to the event you want (`trim` in the spec).
67
+ - **Do not use `atrim` after `amix`/`apad` (ffmpeg 9).** It dropped leading silence and shifted the typing bed ~1 s early. Cut with `-t` on the output (fixed in `mix.py`). Always measure the first loud sample of every generated bed/key/music file.
68
+ - **Premiere `createRemoveItemsAction` does not work through Playrig** ("script object is no longer valid" for every argument form tried; `TrackItemSelection` is only valid inside the `createEmptySelection(callback)`). Replace clips in place instead: overwrite each old clip at its exact start with a same-length file that has the new sound at the right offset inside (pad with `adelay` + `apad`), so no remnants and no stray clips.
69
+ - Playrig auto-files imports into your bins; walk bins with `ppro.FolderItem.cast(item)`, and import only files not already in the project (a second import creates duplicates).
@@ -0,0 +1,112 @@
1
+ #!/usr/bin/env python3
2
+ """Build a ducked music bed + levelled SFX for a short video. Needs only ffmpeg/ffprobe and the stdlib.
3
+
4
+ Usage: mix.py spec.json
5
+ Spec (all paths absolute; times in seconds on the video timeline):
6
+ {
7
+ "length": 7.0, # video length
8
+ "out_dir": ".../2_SOUND/SFX", # levelled SFX, tick bed, key
9
+ "music": ".../3_MUSIC/track_7s.wav", # music already cut to `length`
10
+ "music_out": ".../3_MUSIC/track_score_ducked.wav",
11
+ "music_gain_db": -3, "fade_in": 0.12,
12
+ "duck": {"threshold": 0.02, "ratio": 3, "attack": 8, "release": 300, "level_sc": 0.25},
13
+ "sfx": [ # one-shots: each gets its gain baked into <out_dir>/<name>_lv.wav
14
+ {"name": "pop", "file": "...", "gain_db": 7, "times": [2.6, 3.2]},
15
+ {"name": "whoosh", "file": "...", "gain_db": 3, "fade_out": [1.3, 0.26], "times": [0]}
16
+ ],
17
+ "tick_bed": { # optional typewriter bed built from one key-strike file
18
+ "file": "...", "strike": [0.40, 0.48], # window around the key's transient (inspect the file first)
19
+ "mode": "glyph", "fps": 24, "frames_per_char": 1, "length": 2.2, # frame-exact: one tick per frame a glyph appears
20
+ "gain_db": [-8, -10], "name": "typewriter_bed_sync",
21
+ "labels": [[0.9, 14], [1.0, 15]] # [layer start_s, visible chars excluding spaces]
22
+ }
23
+ }
24
+ Prints a JSON report: placements for Premiere, levels, and the measured duck depth.
25
+ """
26
+ import json, math, os, struct, subprocess, sys
27
+
28
+ def run(args):
29
+ subprocess.check_call(["ffmpeg", "-v", "error", "-y"] + args)
30
+
31
+ def peak_db(path):
32
+ out = subprocess.run(["ffmpeg", "-hide_banner", "-i", path, "-af", "astats", "-f", "null", "-"], capture_output=True, text=True).stderr
33
+ for line in out.splitlines():
34
+ if "Peak level dB" in line:
35
+ return float(line.split(":")[-1])
36
+ return None
37
+
38
+ def rms_series(path, win=0.1):
39
+ d = subprocess.check_output(["ffmpeg", "-v", "error", "-i", path, "-ac", "1", "-ar", "8000", "-f", "s16le", "-"])
40
+ s = struct.unpack("<%dh" % (len(d) // 2), d); w = int(8000 * win)
41
+ return [20 * math.log10(max(1e-6, math.sqrt(sum(x * x for x in s[i:i + w]) / w) / 32768)) for i in range(0, len(s) - w, w)]
42
+
43
+ def main(spec_path):
44
+ sp = json.load(open(spec_path)); L = float(sp["length"]); out = sp["out_dir"]; os.makedirs(out, exist_ok=True)
45
+ rep = {"placements": [], "files": {}}
46
+ keyparts, keyins = [], []
47
+
48
+ # 1) levelled one-shots
49
+ for s in sp.get("sfx", []):
50
+ af = []
51
+ if s.get("trim"): af.append("atrim=%s:%s,asetpts=PTS-STARTPTS" % tuple(s["trim"]))
52
+ af.append("volume=%sdB" % s.get("gain_db", 0))
53
+ if s.get("fade_out"): af.append("afade=t=out:st=%s:d=%s" % tuple(s["fade_out"]))
54
+ lv = os.path.join(out, s["name"] + "_lv.wav"); run(["-i", s["file"], "-af", ",".join(af), lv])
55
+ rep["files"][s["name"]] = {"file": lv, "peak_db": peak_db(lv)}
56
+ for t in s["times"]:
57
+ rep["placements"].append({"name": s["name"], "file": lv, "time": t})
58
+ keyins.append((lv, t))
59
+
60
+ # 2) typewriter tick bed
61
+ tb = sp.get("tick_bed")
62
+ if tb:
63
+ fps = tb.get("fps", 24)
64
+ if tb.get("mode") == "glyph":
65
+ # Frame-exact: label starting at `st` with a one-glyph-per-`frames_per_char` reveal shows glyph k on the first frame
66
+ # at or after st + k*frames_per_char/fps (AE: visible when timeToFrames(t - inPoint) >= textIndex*N). One tick per
67
+ # frame; frames where several labels reveal a glyph at once get a little louder instead of stacking ticks.
68
+ fpc = tb.get("frames_per_char", 1); per_frame = {}
69
+ for st, n in tb["labels"]:
70
+ for k in range(1, n + 1):
71
+ fr = int(math.ceil(st * fps + k * fpc - 1e-6)); per_frame[fr] = per_frame.get(fr, 0) + 1
72
+ ticks = [(fr / float(fps), cnt) for fr, cnt in sorted(per_frame.items())]
73
+ else: # legacy: every `every`-th glyph from the label start time (not frame-exact)
74
+ ticks = [(st + c / float(fps), 1) for st, n in tb["labels"] for c in range(0, n, tb.get("every", 2))]; ticks.sort()
75
+ g = tb.get("gain_db", [-8, -10]); a, b = tb["strike"]; flt = []
76
+ for i, (t, cnt) in enumerate(ticks):
77
+ ms = int(round(t * 1000)); vol = g[i % 2] + min(3.0, 1.5 * (cnt - 1))
78
+ flt.append("[0:a]atrim=%s:%s,asetpts=PTS-STARTPTS,afade=t=out:st=%s:d=0.03,volume=%sdB,adelay=%d|%d[t%d]" % (a, b, round(b - a - 0.03, 3), vol, ms, ms, i))
79
+ blen = tb.get("length") or round(ticks[-1][0] + 0.3, 2)
80
+ fc = ";".join(flt) + ";" + "".join("[t%d]" % i for i in range(len(ticks))) + "amix=inputs=%d:normalize=0,apad=whole_dur=%s[o]" % (len(ticks), blen)
81
+ bed = os.path.join(out, tb.get("name", "typewriter_bed") + ".wav"); run(["-i", tb["file"], "-filter_complex", fc, "-map", "[o]", "-t", str(blen), bed])
82
+ rep["files"]["typewriter_bed"] = {"file": bed, "ticks": len(ticks), "length": blen, "peak_db": peak_db(bed), "first_tick_s": round(ticks[0][0], 3), "last_tick_s": round(ticks[-1][0], 3)}
83
+ rep["placements"].append({"name": "typewriter_bed", "file": bed, "time": 0})
84
+ keyins.append((bed, 0))
85
+
86
+ # 3) sidechain key: every SFX at its timeline position
87
+ ins, parts, mix = [], [], []
88
+ for i, (f, t) in enumerate(keyins):
89
+ ins += ["-i", f]; ms = int(t * 1000); parts.append("[%d:a]adelay=%d|%d[k%d]" % (i, ms, ms, i)); mix.append("[k%d]" % i)
90
+ key = os.path.join(out, "sfx_sidechain_key.wav")
91
+ run(ins + ["-filter_complex", ";".join(parts) + ";" + "".join(mix) + "amix=inputs=%d:normalize=0,apad=whole_dur=%s[o]" % (len(mix), L), "-map", "[o]", "-t", str(L), key])
92
+
93
+ # 4) ducked music (sidechaincompress drops the tail, so pad, then cut to exact length with -t on the OUTPUT.
94
+ # Do NOT use atrim after amix/apad: in ffmpeg 9 it drops leading silence / shortens the stream and misplaces everything.)
95
+ d = sp.get("duck", {}); fi = sp.get("fade_in", 0.12)
96
+ fc = ("[0:a]volume=%sdB,afade=t=in:st=0:d=%s[m];[m][1:a]sidechaincompress=threshold=%s:ratio=%s:attack=%s:release=%s:level_sc=%s:makeup=1,"
97
+ "apad=whole_dur=%s[o]") % (sp.get("music_gain_db", -3), fi, d.get("threshold", 0.02), d.get("ratio", 3), d.get("attack", 8), d.get("release", 300), d.get("level_sc", 0.25), L)
98
+ run(["-i", sp["music"], "-i", key, "-filter_complex", fc, "-map", "[o]", "-t", str(L), sp["music_out"]])
99
+
100
+ # 5) measure the duck: ducked vs plain music at the same gain, 100 ms windows
101
+ o = rms_series(sp["music"]); dk = rms_series(sp["music_out"]); g = sp.get("music_gain_db", -3)
102
+ red = [dk[i] - (o[i] + g) for i in range(min(len(o), len(dk)))]
103
+ probe = lambda t: round(min(red[max(0, int(t * 10)):int(t * 10) + 3] or [0]), 1)
104
+ rep["duck_db_at_events"] = {"%s@%.2f" % (p["name"], p["time"]): probe(p["time"]) for p in rep["placements"] if p["name"] != "typewriter_bed"}
105
+ rep["max_dip_db"] = round(min(red), 1)
106
+ dur = float(subprocess.check_output(["ffprobe", "-v", "error", "-show_entries", "format=duration", "-of", "csv=p=0", sp["music_out"]]))
107
+ lufs = subprocess.run(["ffmpeg", "-hide_banner", "-i", sp["music_out"], "-af", "ebur128=peak=true", "-f", "null", "-"], capture_output=True, text=True).stderr
108
+ rep["music_out"] = {"file": sp["music_out"], "duration": round(dur, 3), "lufs": next((l.split()[1] for l in reversed(lufs.splitlines()) if l.strip().startswith("I:")), None)}
109
+ print(json.dumps(rep, indent=2))
110
+
111
+ if __name__ == "__main__":
112
+ main(sys.argv[1])
@@ -0,0 +1,63 @@
1
+ // playrig-pr job: lay the score + SFX on one or more sequences as ONE undo step.
2
+ // Run: playrig pr run .claude/skills/score-video/scripts/place.js --id place-<rand>
3
+ // Edit CONFIG first (copy the placements from mix.py's JSON report). Modern JS, `await` works. Never saves the project.
4
+ const CONFIG = {
5
+ sequences: ["Sequence A", "Sequence B"], // exact names
6
+ music: "/abs/path/track_score_ducked.wav", // goes on A1 at 0 (overwrites whatever is there)
7
+ sfx: [ // {file, time} from the report; lane is chosen automatically
8
+ // { file: "/abs/pop_lv.wav", time: 2.6 }, // add len: <seconds> for effects longer than 0.7 s
9
+ // { file: "/abs/whoosh_lv.wav", time: 0, len: 1.6 },
10
+ ],
11
+ lanes: [1, 2], // audio track indexes for SFX (0-based: 1 = A2, 2 = A3)
12
+ };
13
+
14
+ const p = await ppro.Project.getActiveProject();
15
+ const root = await p.getRootItem();
16
+ const base = f => f.split("/").pop();
17
+ const unique = [...new Set([CONFIG.music, ...CONFIG.sfx.map(s => s.file)])];
18
+ // Import into the project's bins when Playrig has the organizer (music -> 6_MUSIC, effects -> 5_SOUND); Playrig also files
19
+ // any loose item after each job. Items are looked up anywhere in the project, because they may already sit in a bin.
20
+ if (typeof PLAYRIG.importInto === "function") {
21
+ await PLAYRIG.importInto([CONFIG.music], "6_MUSIC");
22
+ const fx = unique.filter(f => f !== CONFIG.music); if (fx.length) await PLAYRIG.importInto(fx, "5_SOUND");
23
+ } else await p.importFiles(unique, true, root, false);
24
+ const items = [];
25
+ const collect = async (folder) => { for (const it of await folder.getItems()) { let b = null; try { b = ppro.FolderItem.cast(it); } catch (e) { } if (b) await collect(b); else items.push(it); } };
26
+ await collect(root);
27
+ const item = f => { const it = items.find(i => i.name === base(f)); if (!it) throw new Error("not imported: " + base(f)); return it; };
28
+ const seqs = (await p.getSequences()).filter(s => CONFIG.sequences.includes(s.name));
29
+ if (seqs.length !== CONFIG.sequences.length) throw new Error("sequence(s) not found: " + CONFIG.sequences.join(", "));
30
+ const T = s => ppro.TickTime.createWithSeconds(s);
31
+
32
+ // A clip placed with Overwrite cuts the tail of an earlier clip on the same track, so give each SFX a lane
33
+ // where the previous clip has already ended.
34
+ const SFX_LEN = s => s.len || 0.7; // seconds; set `len` on longer effects (e.g. whoosh 1.6) so the lane logic knows when they end
35
+ const laneEnd = CONFIG.lanes.map(() => -1);
36
+ const plan = [...CONFIG.sfx].sort((a, b) => a.time - b.time).map(s => {
37
+ let lane = laneEnd.findIndex(end => end <= s.time + 1e-6);
38
+ if (lane < 0) lane = laneEnd.indexOf(Math.min(...laneEnd));
39
+ laneEnd[lane] = s.time + SFX_LEN(s);
40
+ return { ...s, track: CONFIG.lanes[lane] };
41
+ });
42
+
43
+ p.lockedAccess(() => {
44
+ p.executeTransaction(ca => {
45
+ for (const s of seqs) {
46
+ const ed = ppro.SequenceEditor.getEditor(s);
47
+ ca.addAction(ed.createOverwriteItemAction(item(CONFIG.music), T(0), 0, 0));
48
+ for (const x of plan) ca.addAction(ed.createOverwriteItemAction(item(x.file), T(x.time), 0, x.track));
49
+ }
50
+ }, "Add score + sound effects");
51
+ });
52
+
53
+ // verify: print every audio track so a leftover remnant or a cut tail is visible
54
+ for (const s of seqs) {
55
+ const n = await s.getAudioTrackCount();
56
+ for (let a = 0; a < n; a++) {
57
+ const its = await (await s.getAudioTrack(a)).getTrackItems(1, false);
58
+ if (!its.length) continue;
59
+ const rows = []; for (const it of its) rows.push((await it.getName()).replace(/\.wav$/, "") + "@" + (await it.getStartTime()).seconds.toFixed(2) + "-" + (await it.getEndTime()).seconds.toFixed(2));
60
+ PLAYRIG.log(s.name + " A" + (a + 1) + ": " + rows.join(" | "));
61
+ }
62
+ PLAYRIG.log(s.name + " end " + (await s.getEndTime()).seconds + "s");
63
+ }