agentcut 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 (248) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -2
  3. package/dist/bridge.d.ts +45 -0
  4. package/dist/bridge.js +691 -0
  5. package/dist/bridge.js.map +1 -0
  6. package/dist/config.d.ts +13 -0
  7. package/dist/config.js +50 -0
  8. package/dist/config.js.map +1 -0
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.js +35 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/log.d.ts +1 -0
  13. package/dist/log.js +14 -0
  14. package/dist/log.js.map +1 -0
  15. package/dist/studio/agents/claude.d.ts +7 -0
  16. package/dist/studio/agents/claude.js +155 -0
  17. package/dist/studio/agents/claude.js.map +1 -0
  18. package/dist/studio/agents/codex.d.ts +4 -0
  19. package/dist/studio/agents/codex.js +169 -0
  20. package/dist/studio/agents/codex.js.map +1 -0
  21. package/dist/studio/agents/index.d.ts +8 -0
  22. package/dist/studio/agents/index.js +50 -0
  23. package/dist/studio/agents/index.js.map +1 -0
  24. package/dist/studio/agents/types.d.ts +131 -0
  25. package/dist/studio/agents/types.js +11 -0
  26. package/dist/studio/agents/types.js.map +1 -0
  27. package/dist/studio/bundler.d.ts +29 -0
  28. package/dist/studio/bundler.js +136 -0
  29. package/dist/studio/bundler.js.map +1 -0
  30. package/dist/studio/chat.d.ts +147 -0
  31. package/dist/studio/chat.js +681 -0
  32. package/dist/studio/chat.js.map +1 -0
  33. package/dist/studio/cli.d.ts +2 -0
  34. package/dist/studio/cli.js +194 -0
  35. package/dist/studio/cli.js.map +1 -0
  36. package/dist/studio/components.d.ts +4 -0
  37. package/dist/studio/components.js +36 -0
  38. package/dist/studio/components.js.map +1 -0
  39. package/dist/studio/host.d.ts +105 -0
  40. package/dist/studio/host.js +634 -0
  41. package/dist/studio/host.js.map +1 -0
  42. package/dist/studio/http.d.ts +21 -0
  43. package/dist/studio/http.js +240 -0
  44. package/dist/studio/http.js.map +1 -0
  45. package/dist/studio/music.d.ts +35 -0
  46. package/dist/studio/music.js +130 -0
  47. package/dist/studio/music.js.map +1 -0
  48. package/dist/studio/proc.d.ts +11 -0
  49. package/dist/studio/proc.js +69 -0
  50. package/dist/studio/proc.js.map +1 -0
  51. package/dist/studio/projects.d.ts +84 -0
  52. package/dist/studio/projects.js +369 -0
  53. package/dist/studio/projects.js.map +1 -0
  54. package/dist/studio/render.d.ts +24 -0
  55. package/dist/studio/render.js +197 -0
  56. package/dist/studio/render.js.map +1 -0
  57. package/dist/studio/reveal.d.ts +7 -0
  58. package/dist/studio/reveal.js +49 -0
  59. package/dist/studio/reveal.js.map +1 -0
  60. package/dist/studio/schema.d.ts +4152 -0
  61. package/dist/studio/schema.js +358 -0
  62. package/dist/studio/schema.js.map +1 -0
  63. package/dist/studio/tools.d.ts +2 -0
  64. package/dist/studio/tools.js +165 -0
  65. package/dist/studio/tools.js.map +1 -0
  66. package/dist/studio/voice.d.ts +150 -0
  67. package/dist/studio/voice.js +434 -0
  68. package/dist/studio/voice.js.map +1 -0
  69. package/dist/studio/workspace.d.ts +31 -0
  70. package/dist/studio/workspace.js +187 -0
  71. package/dist/studio/workspace.js.map +1 -0
  72. package/package.json +50 -4
  73. package/template/AGENTS.md +13 -0
  74. package/template/components/CATALOG.md +1306 -0
  75. package/template/components/README.md +61 -0
  76. package/template/components/STYLES.md +246 -0
  77. package/template/components/arcade-title/ArcadeTitle.tsx +860 -0
  78. package/template/components/arcade-title/meta.json +28 -0
  79. package/template/components/aurora/Aurora.tsx +63 -0
  80. package/template/components/aurora/meta.json +28 -0
  81. package/template/components/bar-wipe-title/BarWipeTitle.tsx +94 -0
  82. package/template/components/bar-wipe-title/meta.json +29 -0
  83. package/template/components/before-after/BeforeAfter.tsx +89 -0
  84. package/template/components/before-after/meta.json +233 -0
  85. package/template/components/bento-grid/BentoGrid.tsx +202 -0
  86. package/template/components/bento-grid/meta.json +25 -0
  87. package/template/components/blur-in-title/BlurInTitle.tsx +121 -0
  88. package/template/components/blur-in-title/meta.json +32 -0
  89. package/template/components/catalog.json +8730 -0
  90. package/template/components/catalog.ts +103 -0
  91. package/template/components/chat-thread/ChatThread.tsx +128 -0
  92. package/template/components/chat-thread/meta.json +24 -0
  93. package/template/components/checklist/Checklist.tsx +129 -0
  94. package/template/components/checklist/meta.json +25 -0
  95. package/template/components/confetti/Confetti.tsx +109 -0
  96. package/template/components/confetti/meta.json +28 -0
  97. package/template/components/countdown/Countdown.tsx +166 -0
  98. package/template/components/countdown/meta.json +28 -0
  99. package/template/components/cut-and-paste/CutAndPaste.tsx +654 -0
  100. package/template/components/cut-and-paste/meta.json +29 -0
  101. package/template/components/decode-text/DecodeText.tsx +97 -0
  102. package/template/components/decode-text/meta.json +29 -0
  103. package/template/components/editorial-quote/EditorialQuote.tsx +122 -0
  104. package/template/components/editorial-quote/meta.json +28 -0
  105. package/template/components/glitch-title/GlitchTitle.tsx +171 -0
  106. package/template/components/glitch-title/meta.json +32 -0
  107. package/template/components/halftone-wave/HalftoneWave.tsx +106 -0
  108. package/template/components/halftone-wave/meta.json +28 -0
  109. package/template/components/highlighter/Highlighter.tsx +142 -0
  110. package/template/components/highlighter/meta.json +28 -0
  111. package/template/components/hook-card/HookCard.tsx +552 -0
  112. package/template/components/hook-card/meta.json +304 -0
  113. package/template/components/index.ts +149 -0
  114. package/template/components/iris-wipe/IrisWipe.tsx +76 -0
  115. package/template/components/iris-wipe/meta.json +24 -0
  116. package/template/components/kinetic-poster/KineticPoster.tsx +437 -0
  117. package/template/components/kinetic-poster/meta.json +31 -0
  118. package/template/components/kinetic-punch/KineticPunch.tsx +80 -0
  119. package/template/components/kinetic-punch/meta.json +30 -0
  120. package/template/components/lava-lamp/LavaLamp.tsx +92 -0
  121. package/template/components/lava-lamp/meta.json +28 -0
  122. package/template/components/letter-cascade/LetterCascade.tsx +102 -0
  123. package/template/components/letter-cascade/meta.json +29 -0
  124. package/template/components/lib.ts +179 -0
  125. package/template/components/light-leak/LightLeakTransition.tsx +43 -0
  126. package/template/components/light-leak/meta.json +74 -0
  127. package/template/components/line-diagram/LineDiagram.tsx +205 -0
  128. package/template/components/line-diagram/meta.json +217 -0
  129. package/template/components/list-card/ListCard.tsx +104 -0
  130. package/template/components/list-card/meta.json +232 -0
  131. package/template/components/logo-sting/LogoSting.tsx +129 -0
  132. package/template/components/logo-sting/meta.json +29 -0
  133. package/template/components/looks.tsx +1447 -0
  134. package/template/components/lower-third/LowerThird.tsx +100 -0
  135. package/template/components/lower-third/meta.json +24 -0
  136. package/template/components/marquee/Marquee.tsx +100 -0
  137. package/template/components/marquee/meta.json +30 -0
  138. package/template/components/notification/Notification.tsx +115 -0
  139. package/template/components/notification/meta.json +27 -0
  140. package/template/components/outline-fill/OutlineFill.tsx +106 -0
  141. package/template/components/outline-fill/meta.json +28 -0
  142. package/template/components/panel-sweep/PanelSweep.tsx +86 -0
  143. package/template/components/panel-sweep/meta.json +25 -0
  144. package/template/components/prompt-box/PromptBox.tsx +131 -0
  145. package/template/components/prompt-box/meta.json +24 -0
  146. package/template/components/props.ts +73 -0
  147. package/template/components/quote-card/QuoteCard.tsx +71 -0
  148. package/template/components/quote-card/meta.json +216 -0
  149. package/template/components/shape-shift/ShapeShift.tsx +420 -0
  150. package/template/components/shape-shift/meta.json +31 -0
  151. package/template/components/slide-zoom-message/SlideZoomMessage.tsx +179 -0
  152. package/template/components/slide-zoom-message/meta.json +199 -0
  153. package/template/components/social-post/SocialPost.tsx +185 -0
  154. package/template/components/social-post/meta.json +30 -0
  155. package/template/components/split-flap/SplitFlap.tsx +191 -0
  156. package/template/components/split-flap/meta.json +29 -0
  157. package/template/components/spotlight-grid/SpotlightGrid.tsx +84 -0
  158. package/template/components/spotlight-grid/meta.json +25 -0
  159. package/template/components/stat-counter/StatCounter.tsx +117 -0
  160. package/template/components/stat-counter/meta.json +27 -0
  161. package/template/components/sticker-badge/StickerBadge.tsx +46 -0
  162. package/template/components/sticker-badge/meta.json +220 -0
  163. package/template/components/sticker-slam/StickerSlam.tsx +941 -0
  164. package/template/components/sticker-slam/meta.json +34 -0
  165. package/template/components/style-layer.tsx +233 -0
  166. package/template/components/styles.json +762 -0
  167. package/template/components/styles.ts +113 -0
  168. package/template/components/target-lock/TargetLock.tsx +662 -0
  169. package/template/components/target-lock/meta.json +32 -0
  170. package/template/components/text-reveal/TextReveal.tsx +99 -0
  171. package/template/components/text-reveal/meta.json +28 -0
  172. package/template/components/tile-wipe/TileWipe.tsx +75 -0
  173. package/template/components/tile-wipe/meta.json +24 -0
  174. package/template/components/type-zoom/TypeZoom.tsx +103 -0
  175. package/template/components/type-zoom/meta.json +27 -0
  176. package/template/components/types.ts +66 -0
  177. package/template/components/typewriter/Typewriter.tsx +112 -0
  178. package/template/components/typewriter/meta.json +29 -0
  179. package/template/components/word-pop/WordPop.tsx +59 -0
  180. package/template/components/word-pop/meta.json +237 -0
  181. package/template/components/word-stack/WordStack.tsx +122 -0
  182. package/template/components/word-stack/meta.json +27 -0
  183. package/template/components/word-swap/WordSwap.tsx +127 -0
  184. package/template/components/word-swap/meta.json +30 -0
  185. package/template/presets/charcoal-sketch/PROMPT.md +48 -0
  186. package/template/presets/charcoal-sketch/assets/paper/grain-0.png +0 -0
  187. package/template/presets/charcoal-sketch/assets/paper/grain-1.png +0 -0
  188. package/template/presets/charcoal-sketch/assets/paper/grain-2.png +0 -0
  189. package/template/presets/charcoal-sketch/assets/paper/sketch-paper.jpg +0 -0
  190. package/template/presets/charcoal-sketch/assets/paper/smudge.png +0 -0
  191. package/template/presets/charcoal-sketch/poster.jpg +0 -0
  192. package/template/presets/charcoal-sketch/preset.json +17 -0
  193. package/template/presets/charcoal-sketch/preview.mp4 +0 -0
  194. package/template/presets/charcoal-sketch/scenes/Grain.tsx +23 -0
  195. package/template/presets/charcoal-sketch/scenes/Paper.tsx +17 -0
  196. package/template/presets/charcoal-sketch/scenes/examples/Agents.tsx +100 -0
  197. package/template/presets/charcoal-sketch/scenes/examples/Approvals.tsx +110 -0
  198. package/template/presets/charcoal-sketch/scenes/examples/Blog.tsx +105 -0
  199. package/template/presets/charcoal-sketch/scenes/examples/EndCard.tsx +41 -0
  200. package/template/presets/charcoal-sketch/scenes/examples/Hook.tsx +130 -0
  201. package/template/presets/charcoal-sketch/scenes/examples/Ideas.tsx +92 -0
  202. package/template/presets/charcoal-sketch/scenes/examples/Posting.tsx +128 -0
  203. package/template/presets/charcoal-sketch/scenes/lib/painfix.tsx +119 -0
  204. package/template/presets/charcoal-sketch/scenes/lib/sketch.tsx +291 -0
  205. package/template/presets/charcoal-sketch/scripts/build_layers.example.py +193 -0
  206. package/template/presets/charcoal-sketch/scripts/duck_music.py +34 -0
  207. package/template/presets/charcoal-sketch/scripts/make_textures.py +93 -0
  208. package/template/presets/punk-cut-paper/PROMPT.md +37 -0
  209. package/template/presets/punk-cut-paper/assets/paper/desk-cream.jpg +0 -0
  210. package/template/presets/punk-cut-paper/assets/paper/grain-overlay.png +0 -0
  211. package/template/presets/punk-cut-paper/assets/paper/halftone-black.png +0 -0
  212. package/template/presets/punk-cut-paper/assets/paper/halftone-red.png +0 -0
  213. package/template/presets/punk-cut-paper/assets/paper/halftone-yellow.png +0 -0
  214. package/template/presets/punk-cut-paper/assets/paper/kraft.jpg +0 -0
  215. package/template/presets/punk-cut-paper/assets/paper/newsprint.jpg +0 -0
  216. package/template/presets/punk-cut-paper/assets/paper/paper-cream.jpg +0 -0
  217. package/template/presets/punk-cut-paper/assets/paper/paper-white.jpg +0 -0
  218. package/template/presets/punk-cut-paper/assets/paper/tape.png +0 -0
  219. package/template/presets/punk-cut-paper/build_layers.example.py +150 -0
  220. package/template/presets/punk-cut-paper/poster.jpg +0 -0
  221. package/template/presets/punk-cut-paper/preset.json +15 -0
  222. package/template/presets/punk-cut-paper/preview.mp4 +0 -0
  223. package/template/presets/punk-cut-paper/scenes/Backdrop.tsx +76 -0
  224. package/template/presets/punk-cut-paper/scenes/Motif.tsx +376 -0
  225. package/template/presets/punk-cut-paper/scenes/Photo.tsx +73 -0
  226. package/template/presets/punk-cut-paper/scenes/Ransom.tsx +119 -0
  227. package/template/presets/punk-cut-paper/scenes/Xerox.tsx +31 -0
  228. package/template/presets/punk-cut-paper/scenes/lib/punk.tsx +208 -0
  229. package/template/runtime/composition.tsx +920 -0
  230. package/template/runtime/helpers.tsx +228 -0
  231. package/template/runtime/index.tsx +22 -0
  232. package/template/runtime/types.ts +248 -0
  233. package/template/skill/SKILL.md +149 -0
  234. package/template/skill/references/browser-export.md +61 -0
  235. package/template/skill/references/components.md +38 -0
  236. package/template/skill/references/craft.md +53 -0
  237. package/template/skill/references/cursor.md +91 -0
  238. package/template/skill/references/footage.md +73 -0
  239. package/template/skill/references/format.md +140 -0
  240. package/template/skill/references/presets.md +56 -0
  241. package/template/skill/references/sound.md +128 -0
  242. package/template/starter/.studio/chat.json +1 -0
  243. package/template/starter/assets/.keep +0 -0
  244. package/template/starter/layers.json +46 -0
  245. package/template/starter/notes.md +4 -0
  246. package/template/starter/project.json +13 -0
  247. package/template/starter/renders/.keep +0 -0
  248. package/template/starter/scenes/Title.tsx +38 -0
@@ -0,0 +1,193 @@
1
+ """The one cue sheet -> layers.json. python scripts/build_layers.py
2
+
3
+ Music: Lyria take 1, 152 BPM, beat 11.84 f, bar 47.37 f; bar k starts at BAR(k) = 2.1 + 47.37k (drop on bar 5 = f239).
4
+ Voice clips: `at` = frame of the first spoken word; clip from = at - measured onset (VOICE_ONSET, seconds).
5
+ SFX: `at` = cue frame; from = at - onset frames (scenes/lib/sfx-onsets.json); gain from target LUFS.
6
+ """
7
+ import json
8
+ from pathlib import Path
9
+
10
+ ROOT = Path(__file__).resolve().parent.parent
11
+ FPS = 30
12
+ BAR = lambda k: round(2.1 + 47.37 * k)
13
+ END = 1950
14
+
15
+ VOICE = { # file: (onset s, speech end s, file length s)
16
+ "v1-hook-take1": (0.25, 5.00, 5.28),
17
+ "v2a-posting-take1": (0.24, 2.74, 3.08),
18
+ "v2b-schedule-take1": (0.29, 2.82, 3.24),
19
+ "v3a-threads-take1": (0.25, 2.20, 2.44),
20
+ "v3b-approve-take1": (0.13, 3.16, 3.44),
21
+ "v4a-copypaste-take1": (0.30, 3.92, 4.28),
22
+ "v4b-agents-take1": (0.27, 4.07, 4.32),
23
+ "v5a-blog-take1": (0.29, 2.74, 3.08),
24
+ "v5b-plan-take2": (0.18, 4.89, 5.20),
25
+ "v6a-stuck-take1": (0.22, 1.64, 1.96),
26
+ "v6b-ideas-take1": (0.26, 3.14, 3.44),
27
+ "v7-end-take1": (0.18, 5.42, 5.60),
28
+ }
29
+
30
+ # ---- scenes -------------------------------------------------------------------------------------
31
+ SCENES = [] # (id, scene, from, to, props, note)
32
+
33
+
34
+ def scene(id, name, start, end, props, note):
35
+ SCENES.append(dict(id=id, scene=name, start=start, end=end, props=props, note=note))
36
+
37
+
38
+ VO = [] # (id, file, at, note)
39
+ SFX = [] # (id, name, at, gain, note)
40
+
41
+ # Hook 0 - 247 (drop at bar 5 = 239)
42
+ scene("hook", "Hook", 0, BAR(5) + 8, dict(
43
+ t1=29, t2=69, t3=109, tShake=150, tMascot=196, tDrop=BAR(5),
44
+ l1="10 clients.", l2="10 calendars.", l3="1 very tired team.",
45
+ clients=["Fernhill", "Northwind", "Lumen", "Oak & Co", "Pixel Pup", "Brew Lab", "Kite", "Nova", "Mesa", "Juniper"],
46
+ ), "comic page draws one panel per phrase; colour mascot jumps on the drop (bar 5)")
47
+ VO.append(("vo-1", "v1-hook-take1", 29, "'Ten' on panel 1 (f29)"))
48
+
49
+
50
+ def painfix(id, name, k0, kFix, k1, voA, voB, props, note, lead=12, tail=8):
51
+ """pain starts on bar k0, the mascot crosses on bar kFix, next beat on bar k1."""
52
+ s, x, e = BAR(k0), BAR(kFix), BAR(k1)
53
+ props = dict(tSwipe=x - s, tPainText=lead + 4, tFixText=x - s + 8, **props)
54
+ scene(id, name, s, e + tail, props, note)
55
+ VO.append((f"vo-{id}-a", voA, s + lead + 4, f"pain line, first word = pain caption (bar {k0} + {lead + 4}f)"))
56
+ VO.append((f"vo-{id}-b", voB, x + 8, f"fix line, first word 8f after the mascot's swipe (bar {kFix})"))
57
+
58
+
59
+ painfix("posting", "Posting", 5, 8, 11, "v2a-posting-take1", "v2b-schedule-take1", dict(
60
+ painText="Posting by hand, brand by brand?", fixText="One calendar. Every client.",
61
+ brands=["Fernhill", "Northwind", "Lumen", "Oak & Co", "Kite"], times=["9:00", "9:15", "9:30", "9:45", "10:00"],
62
+ tabs=["Fernhill", "Northwind", "Lumen"], tTaps=40, tapEvery=16, tCards=14, cardEvery=5,
63
+ cards=[dict(r=0, c=0, brand="Fernhill"), dict(r=0, c=2, brand="Lumen"), dict(r=1, c=1, brand="Northwind"),
64
+ dict(r=1, c=4, brand="Fernhill"), dict(r=2, c=0, brand="Lumen"), dict(r=2, c=3, brand="Northwind"),
65
+ dict(r=2, c=5, brand="Fernhill"), dict(r=3, c=2, brand="Northwind"), dict(r=3, c=6, brand="Lumen")],
66
+ enterFrom=[960, 958],
67
+ ), "pain: tapping POST on five phones; fix: one calendar, cards land in cells")
68
+
69
+ painfix("approvals", "Approvals", 11, 14, 17, "v3a-threads-take1", "v3b-approve-take1", dict(
70
+ painText="Approvals lost in email threads?", fixText="Review + approve in one place.",
71
+ subjects=["Re: Re: Fwd: final_v7", "RE: approved??", "Fwd: new version (2)", "Re: which one?", "Re: Re: Re: feedback", "Fwd: FINAL final"],
72
+ client="Fernhill Bakery", comment="Love it! Good to go.", tPress=40, tStamp=46,
73
+ ), "pain: envelopes + tangled thread; fix: review panel, Approve pressed (on 'approve'), stamp")
74
+
75
+ painfix("agents", "Agents", 17, 20, 23, "v4a-copypaste-take1", "v4b-agents-take1", dict(
76
+ painText="Copy. Paste. Five tools. Repeat?", fixText="Your AI agents. Access you approve.",
77
+ tools=["Docs", "Sheets", "Scheduler", "Chat", "Email"], agents=["Claude", "ChatGPT", "OpenClaw", "Hermes"],
78
+ footnote="Claude + ChatGPT connect over MCP · OpenClaw + Hermes: custom setup, not yet tested",
79
+ tLocks=80,
80
+ ), "pain: AI chat -> five tools by copy/paste; fix: agents wired into Rolino, padlock on every line ('access you approve')", lead=6)
81
+
82
+ painfix("blog", "Blog", 23, 26, 30, "v5a-blog-take1", "v5b-plan-take2", dict(
83
+ painText="A blog that hasn't moved in months?", fixText="Articles planned + drafted.",
84
+ months=["April", "May", "June", "July", "Aug"],
85
+ rows=[dict(day="Tue 27 Oct", title="How to keep sourdough fresh", status="Draft ready"),
86
+ dict(day="Thu 29 Oct", title="5 autumn loaves to try", status="Drafting"),
87
+ dict(day="Tue 3 Nov", title="Behind the oven at 5 a.m.", status="Planned")],
88
+ tApprove=103, approveText="You approve before anything goes live.",
89
+ ), "pain: dusty blog, months crossed out; fix: blog plan rows, approval box ticked on 'approve' (fix +103)", lead=6)
90
+
91
+ painfix("ideas", "Ideas", 30, 32, 35, "v6a-stuck-take1", "v6b-ideas-take1", dict(
92
+ painText="Stuck on what to post next?", fixText="Ideas from your own data.",
93
+ ideas=[dict(kind="Blog", title="How to keep sourdough fresh"), dict(kind="Instagram", title="Behind the oven reel"),
94
+ dict(kind="Page", title="Holiday pre-orders")],
95
+ tSearch=44, tAnalytics=60, tIdeas=78,
96
+ ), "pain: blank page, pencil tapping; fix: Search + Analytics charts (on their words) -> idea cards", lead=6)
97
+ # fix timings (fl) are frames after the swipe: the fix line starts at fl 8, so word at file frame w lands at fl 8 + w - onset.
98
+
99
+ scene("end", "EndCard", BAR(35), END, dict(
100
+ title="ROLINO", line="Every client's content, in one workspace.", url="getrolino.com",
101
+ tTitle=16, tLine=45, tUrl=140, tHit=1897 - BAR(35),
102
+ ), "end card on the final chorus (bar 35); URL on 'get rolino dot com'; rays on the last bar (f1897)")
103
+ VO.append(("vo-end", "v7-end-take1", BAR(35) + 16, "'Rolino' as ROLINO letters on"))
104
+
105
+ # ---- SFX (target LUFS per cue; gain = 10^((target - file LUFS)/20), capped at 1) ------------------------
106
+ LUFS = json.loads((ROOT / "scenes/lib/sfx-lufs.json").read_text(encoding="utf-8"))
107
+
108
+
109
+ def sfx(id, name, at, target, note):
110
+ g = min(1.0, round(10 ** ((target - LUFS[name]) / 20), 3))
111
+ SFX.append((id, name, at, g, note))
112
+
113
+
114
+ sfx("sfx-pencil-p1", "pencil-stroke", 29, -27, "panel 1 caption writes on")
115
+ sfx("sfx-pencil-p2", "pencil-stroke", 69, -27, "panel 2 caption")
116
+ sfx("sfx-pencil-p3", "pencil-stroke", 109, -27, "panel 3 caption")
117
+ sfx("sfx-pop-mascot", "comic-pop", 196, -24, "colour mascot pops up in the gutter")
118
+ sfx("sfx-blow", "page-turn", BAR(5), -22, "comic page blows away on the drop")
119
+ beats = [("posting", 5, 8), ("approvals", 11, 14), ("agents", 17, 20), ("blog", 23, 26), ("ideas", 30, 32)]
120
+ for id, k0, kx in beats:
121
+ s, x = BAR(k0), BAR(kx)
122
+ sfx(f"sfx-{id}-draw", "pencil-stroke", s, -28, "pain sketch draws on")
123
+ sfx(f"sfx-{id}-swipe", "page-turn", x - 4, -21, "mascot dash erases the pain (centre on the bar line)")
124
+ sfx(f"sfx-{id}-redraw", "pencil-stroke", x, -27, "fix redraws behind the mascot")
125
+ for i in range(5):
126
+ sfx(f"sfx-posting-tap{i + 1}", "mouse-click", BAR(5) + 40 + i * 16, -29, f"POST tapped on phone {i + 1}")
127
+ for i in range(0, 9, 2):
128
+ sfx(f"sfx-posting-card{i + 1}", ["paper-tap-1", "paper-tap-2", "paper-tap-4"][i % 3], BAR(8) + 14 + i * 5, -30, "calendar card lands")
129
+ sfx("sfx-approve-click", "mouse-click", BAR(14) + 40, -25, "Approve pressed (on 'approve')")
130
+ sfx("sfx-approve-stamp", "rubber-stamp", BAR(14) + 46, -21, "APPROVED stamp lands")
131
+ for i in range(4):
132
+ sfx(f"sfx-agents-lock{i + 1}", f"tab-click-{i % 3 + 1}", BAR(20) + 80 + i * 6, -28, "padlock + check on an agent line ('access you approve')")
133
+ sfx("sfx-blog-check", "pencil-stroke", BAR(26) + 103, -26, "approval box ticked on 'approve'")
134
+ for i in range(3):
135
+ sfx(f"sfx-ideas-card{i + 1}", ["paper-tap-2", "paper-tap-4", "paper-tap-1"][i], BAR(32) + 78 + i * 7, -28, "idea card lands")
136
+ sfx("sfx-end-pop", "comic-pop", BAR(35), -23, "mascot lands on the end card")
137
+ sfx("sfx-end-url", "tab-click-2", BAR(35) + 140, -27, "URL box draws on 'get rolino dot com'")
138
+ sfx("sfx-end-hit", "paper-slap-3", 1897, -21, "pencil rays on the last bar")
139
+
140
+
141
+ # ---- build ----------------------------------------------------------------------------------------
142
+ def main():
143
+ onsets = json.loads((ROOT / "scenes/lib/sfx-onsets.json").read_text(encoding="utf-8"))
144
+ tracks = []
145
+ tracks.append(dict(id="grain", name="Charcoal grain", kind="scene", clips=[dict(
146
+ id="grain", name="Grain (boils on threes)", **{"from": 0}, duration=END, scene="Grain", props=dict(opacity=0.55),
147
+ note="charcoal dust swapped on threes over the whole film")]))
148
+ tracks.append(dict(id="scenes", name="Scenes", kind="scene", clips=[dict(
149
+ id=s["id"], name=s["scene"], **{"from": s["start"]}, duration=s["end"] - s["start"], scene=s["scene"], props=s["props"], note=s["note"],
150
+ ) for s in SCENES]))
151
+ tracks.append(dict(id="paper", name="Paper", kind="scene", clips=[dict(
152
+ id="paper", name="Drawing paper", **{"from": 0}, duration=END, scene="Paper", props={}, note="paper under everything")]))
153
+ vclips = []
154
+ for id, file, at, note in VO:
155
+ on, _, ln = VOICE[file]
156
+ vclips.append(dict(id=id, name=file, **{"from": at - round(on * FPS)}, duration=round(ln * FPS), src=f"assets/voice/{file}.wav",
157
+ volume=1, role="voice", note=note))
158
+ tracks.append(dict(id="voice", name="Voice (Gemini Puck)", kind="audio", clips=vclips))
159
+ tracks.append(dict(id="music", name="Music", kind="audio", clips=[dict(
160
+ id="music", name="Synth-pop (Lyria take 1, 152 BPM)", **{"from": 0}, duration=END, src=MUSIC, volume=MUSIC_VOL, role="music",
161
+ fadeOut=20, note="drop on bar 5 = f239; final chorus bar 35 = f1660")]))
162
+ sclips = []
163
+ for id, name, at, gain, note in SFX:
164
+ src = f"assets/sfx/{name}.wav"
165
+ o = onsets.get(src, {"onsetMs": 0, "frames": 30})
166
+ sclips.append(dict(id=id, name=name, **{"from": at - round(o["onsetMs"] / 1000 * FPS)}, duration=o["frames"], src=src,
167
+ volume=gain, role="sfx", note=note))
168
+ sclips.sort(key=lambda c: c["from"])
169
+ # split overlapping sfx over two tracks
170
+ a, b = [], []
171
+ for c in sclips:
172
+ (a if not a or a[-1]["from"] + a[-1]["duration"] <= c["from"] else b).append(c)
173
+ tracks.append(dict(id="sfx", name="SFX", kind="audio", clips=a))
174
+ tracks.append(dict(id="sfx-2", name="SFX 2", kind="audio", clips=b))
175
+ markers = [dict(id="m-drop", frame=BAR(5), label="Drop", kind="beat")]
176
+ for s in SCENES:
177
+ markers.append(dict(id=f"m-{s['id']}", frame=s["start"], label=s["scene"], kind="section"))
178
+ for k, v in EXTRA_MARKERS:
179
+ markers.append(dict(id=k, frame=v[0], label=v[1], kind="cue"))
180
+ (ROOT / "layers.json").write_text(json.dumps(dict(version=1, tracks=tracks, markers=markers), indent=1, ensure_ascii=False), encoding="utf-8")
181
+ pj = json.loads((ROOT / "project.json").read_text(encoding="utf-8"))
182
+ pj["durationInFrames"] = END
183
+ (ROOT / "project.json").write_text(json.dumps(pj, indent=2, ensure_ascii=False), encoding="utf-8")
184
+ print("ok", len(SCENES), "scenes", len(vclips), "voice", len(sclips), "sfx")
185
+
186
+
187
+ MUSIC = "assets/music/score-duck-b.wav"
188
+ MUSIC_VOL = 0.45
189
+ EXTRA_MARKERS = [(f'm-swipe-{k}', (BAR(k), 'Mascot swipe')) for k in (8, 14, 20, 26, 32)] + [
190
+ ('m-mascot', (196, 'Mascot appears')), ('m-approve', (BAR(14) + 40, 'Approve')), ('m-url', (BAR(35) + 140, 'URL')), ('m-final', (1897, 'Final bar'))]
191
+
192
+ if __name__ == "__main__":
193
+ main()
@@ -0,0 +1,34 @@
1
+ """Duck the score under the voice-over. python scripts/duck_music.py assets/music/<new-name>.wav
2
+ Reads the voice clips from layers.json, finds speech in each take (energy gate), lowers the Lyria take by DUCK dB
3
+ there (150 ms attack, 400 ms release). Use a new output name on every rerun (the listen tools cache by path),
4
+ then point MUSIC in build_layers.py at it and rebuild."""
5
+ import json, sys
6
+ import numpy as np, soundfile as sf, librosa
7
+
8
+ DUCK = -14.0; ATT = 0.15; REL = 0.40; FPS = 30
9
+ SRC = "assets/music/synthpop-sketch-take1.mp3"
10
+ OUT = sys.argv[1]
11
+ layers = json.load(open("layers.json", encoding="utf-8"))
12
+ voice = next(t for t in layers["tracks"] if t["id"] == "voice")["clips"]
13
+ y, sr = librosa.load(SRC, sr=44100, mono=False)
14
+ y = y.T # (n, 2)
15
+ mask = np.zeros(len(y))
16
+ for v in voice:
17
+ x, vsr = sf.read(v["src"]); x = x if x.ndim == 1 else x.mean(1)
18
+ w = int(0.02 * vsr)
19
+ e = np.array([np.sqrt((x[k:k + w] ** 2).mean()) for k in range(0, len(x) - w, w)])
20
+ db = 20 * np.log10(e + 1e-9)
21
+ on = np.where(db > db.max() - 32)[0]
22
+ if not len(on):
23
+ continue
24
+ s = v["from"] / FPS + on[0] * 0.02; t = v["from"] / FPS + (on[-1] + 1) * 0.02
25
+ mask[int(s * sr):int(t * sr)] = 1
26
+ g = np.zeros(len(y)); a = int(ATT * sr); r = int(REL * sr)
27
+ idx = np.where(np.diff(np.r_[0, mask, 0]))[0].reshape(-1, 2)
28
+ for s, t in idx:
29
+ g[max(0, s - a):s] = np.maximum(g[max(0, s - a):s], np.linspace(0, 1, s - max(0, s - a)))
30
+ g[s:t] = 1
31
+ e = min(len(y), t + r); g[t:e] = np.maximum(g[t:e], np.linspace(1, 0, e - t))
32
+ gain = 10 ** (DUCK * g / 20)
33
+ sf.write(OUT, y * gain[:, None], sr, subtype="PCM_24")
34
+ print("ducked spans (s):", [(round(s / sr, 2), round(t / sr, 2)) for s, t in idx])
@@ -0,0 +1,93 @@
1
+ """Charcoal-sketch textures (fixed seeds, grayscale only — the mascot is the only colour in the film).
2
+
3
+ assets/paper/sketch-paper.jpg 1920x1080 drawing paper: tooth, fibres, soft charcoal smudges at the edges
4
+ assets/paper/grain-{0,1,2}.png transparent charcoal dust overlays, swapped on threes for "boiling" paper
5
+ assets/paper/smudge.png a soft charcoal smear (eraser / shading patches)
6
+ """
7
+ import numpy as np
8
+ from PIL import Image, ImageFilter
9
+ from pathlib import Path
10
+
11
+ OUT = Path(__file__).resolve().parent.parent / "assets" / "paper"
12
+ OUT.mkdir(parents=True, exist_ok=True)
13
+ W, H = 1920, 1080
14
+
15
+
16
+ def blur(a, r):
17
+ im = Image.fromarray(np.clip(a * 255, 0, 255).astype(np.uint8))
18
+ return np.asarray(im.filter(ImageFilter.GaussianBlur(r)), dtype=np.float32) / 255
19
+
20
+
21
+ def paper():
22
+ rng = np.random.default_rng(7)
23
+ base = np.full((H, W), 0.915, np.float32)
24
+ # paper tooth: fine noise + medium mottling
25
+ base += (rng.random((H, W)) - 0.5) * 0.05
26
+ base += (blur(rng.random((H, W)), 6) - 0.5) * 0.10
27
+ base += (blur(rng.random((H, W)), 40) - 0.5) * 0.18
28
+ # fibres
29
+ fib = np.zeros((H, W), np.float32)
30
+ for _ in range(1600):
31
+ x, y = rng.integers(0, W), rng.integers(0, H)
32
+ ang = rng.random() * np.pi
33
+ ln = rng.integers(8, 40)
34
+ for t in range(ln):
35
+ xx, yy = int(x + np.cos(ang) * t), int(y + np.sin(ang) * t)
36
+ if 0 <= xx < W and 0 <= yy < H:
37
+ fib[yy, xx] = 1
38
+ base -= blur(fib, 0.7) * 0.06
39
+ # charcoal smudges toward the edges
40
+ yy, xx = np.mgrid[0:H, 0:W]
41
+ d = np.sqrt(((xx - W / 2) / (W / 2)) ** 2 + ((yy - H / 2) / (H / 2)) ** 2)
42
+ vign = np.clip((d - 0.75) / 0.6, 0, 1) ** 1.6
43
+ smudge = blur(rng.random((H, W)), 30)
44
+ base -= vign * (0.10 + smudge * 0.12)
45
+ g = np.clip(base, 0, 1)
46
+ rgb = np.stack([g * 0.995 + 0.004, g * 0.99 + 0.002, g * 0.975], -1) # faint warm paper
47
+ Image.fromarray((rgb * 255).astype(np.uint8)).save(OUT / "sketch-paper.jpg", quality=92)
48
+
49
+
50
+ def grain(seed):
51
+ rng = np.random.default_rng(100 + seed)
52
+ a = np.zeros((H, W), np.float32)
53
+ n = 9000
54
+ xs, ys = rng.integers(0, W, n), rng.integers(0, H, n)
55
+ a[ys, xs] = rng.random(n) * 0.9
56
+ a = blur(a, 0.6) * 3
57
+ # a few long faint charcoal scratches
58
+ for _ in range(14):
59
+ x, y = rng.integers(0, W), rng.integers(0, H)
60
+ ang = rng.random() * np.pi
61
+ ln = rng.integers(40, 180)
62
+ for t in range(ln):
63
+ xx, yy = int(x + np.cos(ang) * t), int(y + np.sin(ang) * t)
64
+ if 0 <= xx < W and 0 <= yy < H:
65
+ a[yy, xx] = max(a[yy, xx], 0.25)
66
+ alpha = np.clip(a, 0, 1)
67
+ rgba = np.zeros((H, W, 4), np.uint8)
68
+ rgba[..., :3] = 40
69
+ rgba[..., 3] = (alpha * 255).astype(np.uint8)
70
+ Image.fromarray(rgba).save(OUT / f"grain-{seed}.png")
71
+
72
+
73
+ def smudge():
74
+ rng = np.random.default_rng(3)
75
+ S = 600
76
+ yy, xx = np.mgrid[0:S, 0:S]
77
+ d = np.sqrt(((xx - S / 2) / (S / 2)) ** 2 + ((yy - S / 2) / (S * 0.32)) ** 2)
78
+ a = np.clip(1 - d, 0, 1) ** 1.2
79
+ streak = blur(rng.random((S, S)), 2)
80
+ streak = np.asarray(Image.fromarray((streak * 255).astype(np.uint8)).resize((S, S // 8)).resize((S, S)), np.float32) / 255
81
+ a = a * (0.55 + streak * 0.6)
82
+ a = blur(np.clip(a, 0, 1), 6)
83
+ rgba = np.zeros((S, S, 4), np.uint8)
84
+ rgba[..., :3] = 35
85
+ rgba[..., 3] = (np.clip(a, 0, 1) * 200).astype(np.uint8)
86
+ Image.fromarray(rgba).save(OUT / "smudge.png")
87
+
88
+
89
+ paper()
90
+ for s in range(3):
91
+ grain(s)
92
+ smudge()
93
+ print("ok")
@@ -0,0 +1,37 @@
1
+ # Preset: Punk Cut-Paper (lyric / music video)
2
+
3
+ The style gallery fills the [brackets] from its form and sends this to the agent. You can also paste it into a
4
+ Agentcut chat yourself.
5
+
6
+ ---
7
+
8
+ Make a music video in the **Punk Cut-Paper preset**. Song: [song]. Photos: [photos].
9
+ Title: [title]. The song is about [about]. Lyrics: [lyrics].
10
+
11
+ Start from the kit in `library/presets/punk-cut-paper/`: copy `scenes/` (Ransom, Motif, Photo, Backdrop, Xerox +
12
+ `lib/punk.tsx`) and `assets/paper/` into the project, use the same fonts in project.json (Anton, Archivo Black,
13
+ Special Elite, Abril Fatface, Permanent Marker, Rubik Mono One, Courier Prime:700), and use
14
+ `build_layers.example.py` as the template for the first timeline. Regenerate `scenes/lib/beats.ts` from the song.
15
+
16
+ The look:
17
+ - **Wall:** cream xerox-paper background. Big torn color strips and newsprint scraps, halftone blots, scribbled X marks
18
+ and stars. The layout re-cuts on the strong beats: every 8 beats in the intro, 4 in verses, 2 in choruses, every beat
19
+ in the loudest parts. One color set per section, from: punk red, hot pink, safety yellow, orange, teal, blue, black.
20
+ - **Lyrics:** a ransom note, one line at a time. Each word is a torn paper chip in a random font and color that slaps
21
+ down (stepped overshoot) on the frame the word is sung. Keywords are cut letter by letter in capitals. Words fly off
22
+ torn away at the end of the line. Lines alternate left and right halves in wide; in mobile they sit lower-middle.
23
+ - **Pictures:** every line gets a cut-paper illustration of what it says (flat paper shapes with rough-cut edges and
24
+ drop shadows, assembled piece by piece, moving in choppy 12 fps stop-motion). No drawn people or hands, only objects
25
+ and symbols. The kit's Motif scene has 28 ready designs (garden, cake, sun, hearts, crown, …) to reuse.
26
+ - **Photos:** the person's photos are torn-edge prints with tape, slapped in on the hook lines and on the lines they
27
+ match. Treatments vary: color, xerox black-and-white, or red/pink/yellow/teal tint. A small cut-paper sticker goes on
28
+ the photo's corner. On gang shouts (HEY!), use eye-level photo strips and giant letter-by-letter slams.
29
+ - **Intro and outro:** the title builds one letter per strong beat, then the photo and a starburst badge (number or
30
+ tagline). The same title card returns after the last sung line and holds to the end.
31
+ - **Overlay:** film grain, a scratch here and there, dark copier edges, a faint flash on strong beats.
32
+ - **Both sizes:** wide 1920×1080 and mobile 1080×1920, checked with captures.
33
+
34
+ Workflow: transcribe the lyrics and check them against the official text when given (fix misheard words, keep the
35
+ sung timing), analyze the beats, show the cue sheet in a few lines, then build section by section. Capture both sizes
36
+ as you go. Write the cue sheet in notes.md. Every lyric line, illustration, photo and backdrop is its own clip, so it
37
+ can be edited on the timeline. Don't export until asked.
@@ -0,0 +1,150 @@
1
+ # Builds layers.json from the lyric cue table (word frames from screenslick_studio_transcribe, corrected by hand).
2
+ # Run once to seed the timeline; after that the timeline is edited directly (hand edits win).
3
+ import json, sys, os
4
+
5
+ HERE = os.path.dirname(os.path.abspath(__file__))
6
+ PROJ = os.path.dirname(HERE)
7
+ words = json.load(open(os.path.join(HERE, "transcribe.json")))["words"]
8
+
9
+ # (start frame of first word, text with *accents*, motif or photo spec, optional overrides)
10
+ # word timings come from whisper; text is the corrected lyric.
11
+ LINES = [
12
+ # Example cue table (replace with the new song's lines). Frames are the first sung word of each line.
13
+ # verse 1
14
+ (629, "Coffee in my hands, *sunrise coming through", {"motif": "sun"}),
15
+ (750, "Cooking up *magic, nothing left to prove", {"motif": "pot"}),
16
+ (828, "Taking it *bold and I'm ready to roll", {"motif": "wheel"}),
17
+ (941, "Friends and family *cheering, filling up my soul", {"motif": "cheer"}),
18
+ # chorus
19
+ (1136, "*Shining like the summer", {"photo": {"treatment": "xerox", "zoom": 1.35}}),
20
+ (1220, "Brighter than the *day", {"motif": "sun"}),
21
+ (1305, "No more hiding *years, I've earned every one", {"motif": "calendar"}),
22
+ # gang shout
23
+ (2096, "*HEY!", {"shout": True}),
24
+ # outro
25
+ (5840, "*Happy *birthday to me", {"motif": "cake"}),
26
+ (6055, "Living *wild and free", {"motif": "chain"}),
27
+ ]
28
+
29
+ def wordframes(start, n_words, until):
30
+ """Pick the whisper word start frames for this line (skips ♪ and noise)."""
31
+ real = [w for w in words if w["text"].strip() not in ("♪", "[MUSIC]") and not w["text"].strip().startswith("(")]
32
+ real.sort(key=lambda w: w["fromFrame"])
33
+ i = next((k for k, w in enumerate(real) if w["fromFrame"] >= start - 3), None)
34
+ out = []
35
+ while i is not None and i < len(real) and len(out) < n_words and real[i]["fromFrame"] < until:
36
+ fr = real[i]["fromFrame"]
37
+ if not out or fr >= out[-1]:
38
+ out.append(fr)
39
+ i += 1
40
+ return out
41
+
42
+ clips_lyr, clips_pic, clips_shout = [], [], []
43
+ for li, (start, text, spec) in enumerate(LINES):
44
+ nxt = LINES[li + 1][0] if li + 1 < len(LINES) else 6300
45
+ toks = text.split()
46
+ fr = wordframes(start, len(toks), nxt)
47
+ # pad missing words evenly
48
+ last = fr[-1] if fr else start
49
+ while len(fr) < len(toks):
50
+ last += 7
51
+ fr.append(last)
52
+ fr[0] = start
53
+ for k in range(1, len(fr)): # whisper duplicates words in repeats: keep >= 5f between word slaps
54
+ fr[k] = max(fr[k], fr[k - 1] + 5)
55
+ side = "left" if li % 2 == 0 else "right"
56
+ lead = 6
57
+ cfrom = start - lead
58
+ end = min(nxt - 4, max(fr[-1] + 45, start + 60))
59
+ if li + 1 == len(LINES):
60
+ end = 6215
61
+ dur = end - cfrom
62
+ wl = [{"t": t, "at": max(0, f - cfrom)} for t, f in zip(toks, fr)]
63
+ shout = spec.get("shout")
64
+ cid = f"lyr-{li+1:02d}"
65
+ props = {"words": wl, "side": "center" if shout else side, "seed": li + 1}
66
+ if shout:
67
+ props.update({"letters": True, "stagger": 1, "size": 260})
68
+ wl[0]["at"] = lead
69
+ clips_lyr.append({"id": cid, "name": text.replace("*", ""), "from": cfrom, "duration": dur, "scene": "Ransom", "props": props,
70
+ "note": f"first sung word at f{start}; words slap on whisper word starts"})
71
+ pfrom = start - 10
72
+ pdur = end + 4 - pfrom
73
+ if "photo" in spec:
74
+ p = {"side": "center" if shout else side, "seed": li + 7, "rot": (-5 if li % 2 else 4), "from": ("bottom" if li % 3 == 0 else ("left" if side == "right" else "right"))}
75
+ p.update(spec["photo"])
76
+ clips_pic.append({"id": f"pic-{li+1:02d}", "name": "photo", "from": pfrom, "duration": pdur, "scene": "Photo", "props": p,
77
+ "note": "photo lands with the hook line"})
78
+ if "motif" in spec:
79
+ clips_pic.append({"id": f"mot-{li+1:02d}", "name": spec["motif"], "from": pfrom, "duration": pdur, "scene": "Motif",
80
+ "props": {"kind": spec["motif"], "side": side, "seed": li + 3}, "note": f"illustrates '{text.replace('*','')}'"})
81
+
82
+ # intro title (letters land on strong beats from f108)
83
+ intro = [
84
+ {"id": "title", "name": "HAPPY BIRTHDAY SAM", "from": 100, "duration": 495, "scene": "Ransom",
85
+ "props": {"words": [{"t": "*HAPPY", "at": 8}, {"t": "*BIRTHDAY", "at": 74}, {"t": "*SAM", "at": 180}], "side": "left", "seed": 53, "stagger": 13, "size": 165},
86
+ "note": "intro: one letter per strong beat (13f grid from f108); the name lands f280"},
87
+ ]
88
+ intro += [
89
+ {"id": "title-outro", "name": "HAPPY BIRTHDAY SAM (finale)", "from": 6205, "duration": 419, "scene": "Ransom",
90
+ "props": {"words": [{"t": "*HAPPY", "at": 8}, {"t": "*BIRTHDAY", "at": 26}, {"t": "*SAM", "at": 52}], "side": "left", "seed": 77, "stagger": 3, "size": 165},
91
+ "note": "finale after the last sung word (f6165); holds to the end"},
92
+ ]
93
+ intro_pic = [
94
+ {"id": "pic-outro", "name": "photo (finale)", "from": 6215, "duration": 409, "scene": "Photo",
95
+ "props": {"side": "left", "treatment": "color", "zoom": 1.05, "rot": -4, "from": "right", "seed": 21}, "note": "finale photo"},
96
+ {"id": "mot-outro-53", "name": "53 badge (finale)", "from": 6290, "duration": 334, "scene": "Motif",
97
+ "props": {"kind": "badge53", "side": "left", "seed": 9, "x": 0.58, "y": 0.8, "scale": 0.45, "mobile": {"x": 0.76, "y": 0.43, "scale": 0.36}}, "note": "53 stamp"},
98
+ {"id": "pic-intro", "name": "photo", "from": 320, "duration": 275, "scene": "Photo",
99
+ "props": {"side": "left", "treatment": "color", "zoom": 1.05, "rot": 5, "from": "right", "seed": 11}, "note": "photo slaps in after the name"},
100
+ {"id": "mot-intro-53", "name": "53 badge", "from": 430, "duration": 165, "scene": "Motif",
101
+ "props": {"kind": "badge53", "side": "left", "seed": 4, "x": 0.6, "y": 0.78, "scale": 0.45, "mobile": {"x": 0.76, "y": 0.43, "scale": 0.36}}, "note": "53 stamp"},
102
+ ]
103
+
104
+ SECTIONS = [ # (from, to, colors, cutEvery, energy)
105
+ (0, 600, ["#FFD21F", "#141312"], 8, 0.4),
106
+ (600, 1080, ["#13A89A", "#FFD21F", "#141312"], 4, 0.5),
107
+ (1080, 2080, ["#E2332A", "#FFD21F", "#141312", "#FF4F9A"], 2, 0.9),
108
+ (2080, 2510, ["#FF4F9A", "#141312", "#FFD21F"], 1, 1.0),
109
+ (2510, 3200, ["#2A5FD8", "#F07A22", "#141312"], 4, 0.5),
110
+ (3200, 4100, ["#E2332A", "#FFD21F", "#141312", "#13A89A"], 2, 0.9),
111
+ (4100, 5220, ["#FF4F9A", "#2A5FD8", "#141312"], 4, 0.6),
112
+ (5220, 5830, ["#E2332A", "#FFD21F", "#FF4F9A", "#141312"], 1, 1.0),
113
+ (5830, 6624, ["#F07A22", "#FFD21F", "#141312"], 4, 0.6),
114
+ ]
115
+ bg = [{"id": f"bg-{i+1}", "name": f"Backdrop {i+1}", "from": a, "duration": b - a, "scene": "Backdrop",
116
+ "props": {"colors": c, "cutEvery": n, "energy": e, "seed": i + 1}, "note": f"re-cuts every {n} strong beats"}
117
+ for i, (a, b, c, n, e) in enumerate(SECTIONS)]
118
+
119
+ layers = {
120
+ "version": 1,
121
+ "tracks": [
122
+ {"id": "xerox", "name": "Xerox overlay", "kind": "scene", "clips": [
123
+ {"id": "xerox", "name": "Grain + copier edges", "from": 0, "duration": 6624, "scene": "Xerox", "props": {"grain": 0.28, "edges": 0.5, "flash": 0.05}}]},
124
+ {"id": "lyrics", "name": "Lyrics", "kind": "scene", "clips": sorted(intro + clips_lyr, key=lambda c: c["from"])},
125
+ {"id": "pictures", "name": "Motifs + photos", "kind": "scene", "clips": sorted(intro_pic + clips_pic, key=lambda c: c["from"])},
126
+ {"id": "backdrop", "name": "Backdrop", "kind": "scene", "clips": bg},
127
+ {"id": "music", "name": "Song", "kind": "audio", "clips": [
128
+ {"id": "song", "name": "song", "from": 0, "duration": 6624, "src": "assets/song.mp3", "volume": 1, "role": "music"}]},
129
+ ],
130
+ "markers": [
131
+ {"id": "m-v1", "frame": 600, "label": "Verse 1", "kind": "section"},
132
+ {"id": "m-c1", "frame": 1080, "label": "Chorus 1", "kind": "section"},
133
+ {"id": "m-hey", "frame": 2080, "label": "HEY! break", "kind": "section"},
134
+ {"id": "m-v2", "frame": 2510, "label": "Verse 2", "kind": "section"},
135
+ {"id": "m-c2", "frame": 3200, "label": "Chorus 2", "kind": "section"},
136
+ {"id": "m-br", "frame": 4100, "label": "Bridge", "kind": "section"},
137
+ {"id": "m-c3", "frame": 5220, "label": "Final chorus", "kind": "section"},
138
+ {"id": "m-out", "frame": 5830, "label": "Outro", "kind": "section"},
139
+ ],
140
+ }
141
+ only = sys.argv[1] if len(sys.argv) > 1 else None
142
+ if only: # partial build: keep clips that start before frame N
143
+ N = int(only)
144
+ for t in layers["tracks"]:
145
+ if t["id"] in ("lyrics", "pictures"):
146
+ t["clips"] = [c for c in t["clips"] if c["from"] < N]
147
+ json.dump(layers, open(os.path.join(PROJ, "layers.json"), "w"), indent=1)
148
+ print("lyrics", len(clips_lyr), "pics", len(clips_pic))
149
+ for c in clips_lyr:
150
+ print(c["id"], c["from"], c["duration"], [w["at"] for w in c["props"]["words"]], c["name"])
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "Punk Cut-Paper",
3
+ "description": "Lyric video as a punk collage: ransom-note lyrics slapped on the beat, torn color strips, cut-paper illustrations, taped photos, xerox grain.",
4
+ "kind": "Music video",
5
+ "aspect": "wide",
6
+ "preview": "preview.mp4",
7
+ "poster": "poster.jpg",
8
+ "fields": [
9
+ { "id": "song", "label": "Song", "type": "audio", "required": true, "help": "An audio file in the project or the library." },
10
+ { "id": "photos", "label": "Photos", "type": "images", "help": "Photos of the person, from the project's images." },
11
+ { "id": "title", "label": "Title", "type": "text", "placeholder": "HAPPY BIRTHDAY SAM" },
12
+ { "id": "about", "label": "What it's about", "type": "longtext", "placeholder": "Who it's for, names, facts, the mood" },
13
+ { "id": "lyrics", "label": "Lyrics", "type": "longtext", "placeholder": "Paste the official lyrics (or leave empty to transcribe)" }
14
+ ]
15
+ }
@@ -0,0 +1,76 @@
1
+ // Xerox-paper wall: torn color panels re-cut every few strong beats (hard punk cuts), halftone blots, newsprint scraps.
2
+ import React from "react";
3
+ import { AbsoluteFill, Img, useCurrentFrame } from "remotion";
4
+ import { asset, type SceneProps } from "agentcut";
5
+ import { P, Paper, Halftone, beatIndex, beatPulse, hash } from "./lib/punk";
6
+
7
+ type Props = SceneProps & {
8
+ colors?: string[]; // panel colors for this section
9
+ cutEvery?: number; // re-cut the layout every N strong beats
10
+ energy?: number; // 0..1: how many panels / how wild
11
+ seed?: number;
12
+ };
13
+
14
+ export default function Backdrop({ colors = [P.yellow, P.red, P.ink], cutEvery = 4, energy = 0.6, seed = 1, width, height, clip }: Props) {
15
+ const f = useCurrentFrame();
16
+ const abs = clip.from + f;
17
+ const bi = Math.max(0, beatIndex(abs));
18
+ const cut = Math.floor(bi / Math.max(1, cutEvery));
19
+ const pulse = beatPulse(abs, 9);
20
+ const cs = seed * 1000 + cut * 13;
21
+ const W = width, H = height;
22
+ const diag = Math.hypot(W, H);
23
+ const nPanels = 1 + Math.round(energy * 2);
24
+
25
+ const panels = Array.from({ length: nPanels }).map((_, i) => {
26
+ const s = cs + i * 71;
27
+ const color = colors[Math.floor(hash(s, 1) * colors.length)];
28
+ const ph = H * (0.22 + hash(s, 2) * 0.3);
29
+ const rot = (hash(s, 3) - 0.5) * 34;
30
+ const cy = H * (0.15 + hash(s, 4) * 0.7);
31
+ const cx = W * (0.3 + hash(s, 6) * 0.4);
32
+ return (
33
+ <Paper key={`${cut}-${i}`} w={diag * 1.2} h={ph} seed={s} color={color} kind="tear" grain={0.5} shadow={0.8}
34
+ style={{ left: cx - diag * 0.6, top: cy - ph / 2, transform: `rotate(${rot}deg) scale(${1 + pulse * 0.015})` }} />
35
+ );
36
+ });
37
+
38
+ const blots = Array.from({ length: 2 }).map((_, i) => {
39
+ const s = cs + 500 + i * 37;
40
+ const c = (["black", "red", "yellow"] as const)[Math.floor(hash(s, 1) * 3)];
41
+ return <Halftone key={i} x={W * hash(s, 2)} y={H * hash(s, 3)} size={Math.min(W, H) * (0.5 + hash(s, 4) * 0.5)} color={c} o={0.22 + energy * 0.25} rot={hash(s, 5) * 90} />;
42
+ });
43
+
44
+ const scraps = Array.from({ length: 3 }).map((_, i) => {
45
+ const s = cs + 900 + i * 53;
46
+ const w = Math.min(W, H) * (0.22 + hash(s, 1) * 0.2);
47
+ const h = w * (0.35 + hash(s, 2) * 0.5);
48
+ return (
49
+ <Paper key={`s${cut}-${i}`} w={w} h={h} seed={s} tex="newsprint" kind={hash(s, 3) > 0.5 ? "tear" : "cut"} shadow={0.6}
50
+ style={{ left: W * hash(s, 4) - w / 2, top: H * hash(s, 5) - h / 2, transform: `rotate(${(hash(s, 6) - 0.5) * 40}deg)`, opacity: 0.85 }} />
51
+ );
52
+ });
53
+
54
+ // scribbled X marks and stars
55
+ const marks = Array.from({ length: 4 }).map((_, i) => {
56
+ const s = cs + 1300 + i * 19;
57
+ const x = W * hash(s, 1), y = H * hash(s, 2), sz = 40 + hash(s, 3) * 60;
58
+ const star = hash(s, 4) > 0.5;
59
+ return (
60
+ <svg key={i} width={sz} height={sz} viewBox="0 0 40 40" style={{ position: "absolute", left: x, top: y, transform: `rotate(${hash(s, 5) * 90}deg)` }}>
61
+ {star ? <path d="M20 2 L24 15 L38 15 L27 23 L31 37 L20 29 L9 37 L13 23 L2 15 L16 15 Z" fill={P.ink} />
62
+ : <path d="M6 6 L34 34 M34 6 L6 34" stroke={P.ink} strokeWidth="5" strokeLinecap="round" />}
63
+ </svg>
64
+ );
65
+ });
66
+
67
+ return (
68
+ <AbsoluteFill style={{ background: P.paper, overflow: "hidden" }}>
69
+ <Img src={asset("assets/paper/desk-cream.jpg")} style={{ position: "absolute", left: 0, top: 0, width: Math.max(W, H * 16 / 9), height: Math.max(H, W * 9 / 16) }} />
70
+ {blots}
71
+ {scraps}
72
+ {panels}
73
+ {marks}
74
+ </AbsoluteFill>
75
+ );
76
+ }