@allyhub/sdk 0.1.0-alpha.8 → 0.2.0-next.0

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 (370) hide show
  1. package/NOTICE +85 -0
  2. package/client.d.ts +45 -1
  3. package/dist/anim.js +2 -75
  4. package/dist/define.d.ts +10 -4
  5. package/dist/define.js +2 -95
  6. package/dist/dom.d.ts +1 -1
  7. package/dist/dom.js +2 -457
  8. package/dist/fit.js +2 -60
  9. package/dist/free.d.ts +18 -0
  10. package/dist/free.js +2 -0
  11. package/dist/index.d.ts +28 -13
  12. package/dist/index.js +2 -11
  13. package/dist/input.d.ts +306 -0
  14. package/dist/input.js +2 -0
  15. package/dist/media.d.ts +3 -6
  16. package/dist/media.js +2 -27
  17. package/dist/messages.d.ts +3 -2
  18. package/dist/messages.js +2 -2
  19. package/dist/module.d.ts +24 -0
  20. package/dist/module.js +2 -0
  21. package/dist/noise.js +2 -233
  22. package/dist/parts.d.ts +97 -21
  23. package/dist/parts.js +2 -414
  24. package/dist/paths.d.ts +1 -1
  25. package/dist/paths.js +2 -720
  26. package/dist/phone.d.ts +26 -0
  27. package/dist/phone.js +2 -0
  28. package/dist/piece.d.ts +106 -35
  29. package/dist/piece.js +2 -38
  30. package/dist/props.d.ts +1 -1
  31. package/dist/props.js +2 -35
  32. package/dist/scenery.d.ts +2 -0
  33. package/dist/scenery.js +2 -0
  34. package/dist/text.js +2 -38
  35. package/dist/written.d.ts +12 -0
  36. package/dist/written.js +2 -0
  37. package/docs/README.md +18 -0
  38. package/docs/batches.md +148 -0
  39. package/docs/contract.md +51 -0
  40. package/docs/defaults.md +703 -0
  41. package/docs/docs.md +148 -0
  42. package/docs/footage.md +249 -0
  43. package/docs/layers.md +317 -0
  44. package/docs/modeling.md +143 -0
  45. package/docs/project.md +265 -0
  46. package/docs/scenery.md +308 -0
  47. package/docs/sheets.md +119 -0
  48. package/docs/slides.md +111 -0
  49. package/docs/sound.md +170 -0
  50. package/docs/speech.md +289 -0
  51. package/docs/video.md +265 -0
  52. package/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +52 -0
  53. package/node_modules/@allyhub-next/audio/dist/at-cut.js +2 -0
  54. package/node_modules/@allyhub-next/audio/dist/decode.d.ts +33 -0
  55. package/node_modules/@allyhub-next/audio/dist/decode.js +2 -0
  56. package/node_modules/@allyhub-next/audio/dist/envelope.d.ts +37 -0
  57. package/node_modules/@allyhub-next/audio/dist/envelope.js +2 -0
  58. package/node_modules/@allyhub-next/audio/dist/index.d.ts +17 -0
  59. package/node_modules/@allyhub-next/audio/dist/index.js +2 -0
  60. package/node_modules/@allyhub-next/audio/dist/levels.d.ts +97 -0
  61. package/node_modules/@allyhub-next/audio/dist/levels.js +2 -0
  62. package/node_modules/@allyhub-next/audio/dist/master.d.ts +29 -0
  63. package/node_modules/@allyhub-next/audio/dist/master.js +2 -0
  64. package/node_modules/@allyhub-next/audio/dist/music.d.ts +11 -0
  65. package/node_modules/@allyhub-next/audio/dist/music.js +2 -0
  66. package/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +39 -0
  67. package/node_modules/@allyhub-next/audio/dist/node/decode.js +2 -0
  68. package/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +25 -0
  69. package/node_modules/@allyhub-next/audio/dist/node/ebur128.js +2 -0
  70. package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +31 -0
  71. package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.js +2 -0
  72. package/node_modules/@allyhub-next/audio/dist/node/index.d.ts +8 -0
  73. package/node_modules/@allyhub-next/audio/dist/node/index.js +2 -0
  74. package/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +18 -0
  75. package/node_modules/@allyhub-next/audio/dist/node/loudness.js +2 -0
  76. package/node_modules/@allyhub-next/audio/dist/node/master.d.ts +42 -0
  77. package/node_modules/@allyhub-next/audio/dist/node/master.js +2 -0
  78. package/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +60 -0
  79. package/node_modules/@allyhub-next/audio/dist/node/measure.js +2 -0
  80. package/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +31 -0
  81. package/node_modules/@allyhub-next/audio/dist/node/mix.js +2 -0
  82. package/node_modules/@allyhub-next/audio/dist/plan.d.ts +143 -0
  83. package/node_modules/@allyhub-next/audio/dist/plan.js +2 -0
  84. package/node_modules/@allyhub-next/audio/dist/recorded.d.ts +26 -0
  85. package/node_modules/@allyhub-next/audio/dist/recorded.js +2 -0
  86. package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +47 -0
  87. package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.js +2 -0
  88. package/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +89 -0
  89. package/node_modules/@allyhub-next/audio/dist/recording/chain.js +2 -0
  90. package/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +64 -0
  91. package/node_modules/@allyhub-next/audio/dist/recording/dynamics.js +2 -0
  92. package/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +26 -0
  93. package/node_modules/@allyhub-next/audio/dist/recording/fft.js +2 -0
  94. package/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +42 -0
  95. package/node_modules/@allyhub-next/audio/dist/recording/filters.js +2 -0
  96. package/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +56 -0
  97. package/node_modules/@allyhub-next/audio/dist/recording/fit.js +2 -0
  98. package/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +10 -0
  99. package/node_modules/@allyhub-next/audio/dist/recording/index.js +2 -0
  100. package/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +12 -0
  101. package/node_modules/@allyhub-next/audio/dist/recording/loudness.js +2 -0
  102. package/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +67 -0
  103. package/node_modules/@allyhub-next/audio/dist/recording/measure.js +2 -0
  104. package/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +32 -0
  105. package/node_modules/@allyhub-next/audio/dist/recording/mic.js +2 -0
  106. package/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +27 -0
  107. package/node_modules/@allyhub-next/audio/dist/recording/noise.js +2 -0
  108. package/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +64 -0
  109. package/node_modules/@allyhub-next/audio/dist/recording/presets.js +2 -0
  110. package/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +78 -0
  111. package/node_modules/@allyhub-next/audio/dist/recording/room.js +2 -0
  112. package/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +111 -0
  113. package/node_modules/@allyhub-next/audio/dist/recording/setup.js +2 -0
  114. package/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +3 -0
  115. package/node_modules/@allyhub-next/audio/dist/recording/vec.js +2 -0
  116. package/node_modules/@allyhub-next/audio/dist/render.d.ts +26 -0
  117. package/node_modules/@allyhub-next/audio/dist/render.js +2 -0
  118. package/node_modules/@allyhub-next/audio/dist/sfx.d.ts +10 -0
  119. package/node_modules/@allyhub-next/audio/dist/sfx.js +2 -0
  120. package/node_modules/@allyhub-next/audio/dist/shape.d.ts +118 -0
  121. package/node_modules/@allyhub-next/audio/dist/shape.js +2 -0
  122. package/node_modules/@allyhub-next/audio/dist/voice.d.ts +45 -0
  123. package/node_modules/@allyhub-next/audio/dist/voice.js +2 -0
  124. package/node_modules/@allyhub-next/audio/package.json +17 -0
  125. package/node_modules/@allyhub-next/formats/dist/data/comments.d.ts +94 -0
  126. package/node_modules/@allyhub-next/formats/dist/data/comments.js +2 -0
  127. package/node_modules/@allyhub-next/formats/dist/data/config.d.ts +10 -0
  128. package/node_modules/@allyhub-next/formats/dist/data/config.js +2 -0
  129. package/node_modules/@allyhub-next/formats/dist/data/edits.d.ts +28 -0
  130. package/node_modules/@allyhub-next/formats/dist/data/edits.js +2 -0
  131. package/node_modules/@allyhub-next/formats/dist/data/elements.d.ts +6 -0
  132. package/node_modules/@allyhub-next/formats/dist/data/elements.js +2 -0
  133. package/node_modules/@allyhub-next/formats/dist/data/faces.d.ts +38 -0
  134. package/node_modules/@allyhub-next/formats/dist/data/faces.js +2 -0
  135. package/node_modules/@allyhub-next/formats/dist/data/file.d.ts +11 -0
  136. package/node_modules/@allyhub-next/formats/dist/data/file.js +2 -0
  137. package/node_modules/@allyhub-next/formats/dist/data/gen.d.ts +31 -0
  138. package/node_modules/@allyhub-next/formats/dist/data/gen.js +2 -0
  139. package/node_modules/@allyhub-next/formats/dist/data/messages.d.ts +34 -0
  140. package/node_modules/@allyhub-next/formats/dist/data/messages.js +2 -0
  141. package/node_modules/@allyhub-next/formats/dist/data/reference.d.ts +676 -0
  142. package/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
  143. package/node_modules/@allyhub-next/formats/dist/data/script.d.ts +37 -0
  144. package/node_modules/@allyhub-next/formats/dist/data/script.js +2 -0
  145. package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +214 -0
  146. package/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
  147. package/node_modules/@allyhub-next/formats/dist/data/words.d.ts +25 -0
  148. package/node_modules/@allyhub-next/formats/dist/data/words.js +2 -0
  149. package/node_modules/@allyhub-next/formats/dist/index.d.ts +16 -0
  150. package/node_modules/@allyhub-next/formats/dist/index.js +2 -0
  151. package/node_modules/@allyhub-next/formats/dist/items.d.ts +94 -0
  152. package/node_modules/@allyhub-next/formats/dist/items.js +2 -0
  153. package/node_modules/@allyhub-next/formats/dist/layout.d.ts +50 -0
  154. package/node_modules/@allyhub-next/formats/dist/layout.js +5 -0
  155. package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +301 -0
  156. package/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
  157. package/node_modules/@allyhub-next/formats/package.json +14 -0
  158. package/node_modules/@allyhub-next/formats/schemas/comments.schema.json +152 -0
  159. package/node_modules/@allyhub-next/formats/schemas/config.schema.json +43 -0
  160. package/node_modules/@allyhub-next/formats/schemas/edits.schema.json +112 -0
  161. package/node_modules/@allyhub-next/formats/schemas/elements.schema.json +33 -0
  162. package/node_modules/@allyhub-next/formats/schemas/gen.schema.json +97 -0
  163. package/node_modules/@allyhub-next/formats/schemas/interpretation.schema.json +125 -0
  164. package/node_modules/@allyhub-next/formats/schemas/items.json +75 -0
  165. package/node_modules/@allyhub-next/formats/schemas/messages.schema.json +11 -0
  166. package/node_modules/@allyhub-next/formats/schemas/script.schema.json +162 -0
  167. package/node_modules/@allyhub-next/formats/schemas/sheet.schema.json +395 -0
  168. package/node_modules/@allyhub-next/formats/schemas/words.schema.json +63 -0
  169. package/node_modules/@allyhub-next/protocol/dist/app.d.ts +98 -0
  170. package/node_modules/@allyhub-next/protocol/dist/app.js +2 -0
  171. package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +116 -0
  172. package/node_modules/@allyhub-next/protocol/dist/auth.js +2 -0
  173. package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +59 -0
  174. package/node_modules/@allyhub-next/protocol/dist/cli.js +2 -0
  175. package/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +272 -0
  176. package/node_modules/@allyhub-next/protocol/dist/cloud.js +2 -0
  177. package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +405 -0
  178. package/node_modules/@allyhub-next/protocol/dist/editor.js +2 -0
  179. package/node_modules/@allyhub-next/protocol/dist/files.d.ts +101 -0
  180. package/node_modules/@allyhub-next/protocol/dist/files.js +2 -0
  181. package/node_modules/@allyhub-next/protocol/dist/index.d.ts +12 -0
  182. package/node_modules/@allyhub-next/protocol/dist/index.js +2 -0
  183. package/node_modules/@allyhub-next/protocol/dist/jsonrpc.d.ts +83 -0
  184. package/node_modules/@allyhub-next/protocol/dist/jsonrpc.js +2 -0
  185. package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +53 -0
  186. package/node_modules/@allyhub-next/protocol/dist/registry.js +2 -0
  187. package/node_modules/@allyhub-next/protocol/dist/runtimes.d.ts +93 -0
  188. package/node_modules/@allyhub-next/protocol/dist/runtimes.js +2 -0
  189. package/node_modules/@allyhub-next/protocol/dist/teams.d.ts +67 -0
  190. package/node_modules/@allyhub-next/protocol/dist/teams.js +2 -0
  191. package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +345 -0
  192. package/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
  193. package/node_modules/@allyhub-next/protocol/package.json +13 -0
  194. package/node_modules/@allyhub-next/runtimes/dist/bundled.d.ts +10 -0
  195. package/node_modules/@allyhub-next/runtimes/dist/bundled.js +2 -0
  196. package/node_modules/@allyhub-next/runtimes/dist/download.d.ts +15 -0
  197. package/node_modules/@allyhub-next/runtimes/dist/download.js +2 -0
  198. package/node_modules/@allyhub-next/runtimes/dist/errors.d.ts +16 -0
  199. package/node_modules/@allyhub-next/runtimes/dist/errors.js +2 -0
  200. package/node_modules/@allyhub-next/runtimes/dist/home.d.ts +2 -0
  201. package/node_modules/@allyhub-next/runtimes/dist/home.js +2 -0
  202. package/node_modules/@allyhub-next/runtimes/dist/index.d.ts +9 -0
  203. package/node_modules/@allyhub-next/runtimes/dist/index.js +2 -0
  204. package/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +6 -0
  205. package/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
  206. package/node_modules/@allyhub-next/runtimes/dist/manifest.d.ts +3 -0
  207. package/node_modules/@allyhub-next/runtimes/dist/manifest.js +2 -0
  208. package/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +63 -0
  209. package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +3 -0
  210. package/node_modules/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
  211. package/node_modules/@allyhub-next/runtimes/dist/unpack.js +2 -0
  212. package/node_modules/@allyhub-next/runtimes/manifest.json +395 -0
  213. package/node_modules/@allyhub-next/runtimes/package.json +14 -0
  214. package/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +153 -0
  215. package/node_modules/@allyhub-next/scenery/NOTICE +42 -0
  216. package/node_modules/@allyhub-next/scenery/dist/aim.d.ts +55 -0
  217. package/node_modules/@allyhub-next/scenery/dist/aim.js +2 -0
  218. package/node_modules/@allyhub-next/scenery/dist/bake.d.ts +203 -0
  219. package/node_modules/@allyhub-next/scenery/dist/bake.js +2 -0
  220. package/node_modules/@allyhub-next/scenery/dist/camera.d.ts +150 -0
  221. package/node_modules/@allyhub-next/scenery/dist/camera.js +2 -0
  222. package/node_modules/@allyhub-next/scenery/dist/curve.d.ts +40 -0
  223. package/node_modules/@allyhub-next/scenery/dist/curve.js +2 -0
  224. package/node_modules/@allyhub-next/scenery/dist/define.d.ts +164 -0
  225. package/node_modules/@allyhub-next/scenery/dist/define.js +2 -0
  226. package/node_modules/@allyhub-next/scenery/dist/fit.d.ts +64 -0
  227. package/node_modules/@allyhub-next/scenery/dist/fit.js +2 -0
  228. package/node_modules/@allyhub-next/scenery/dist/glass.d.ts +34 -0
  229. package/node_modules/@allyhub-next/scenery/dist/glass.js +2 -0
  230. package/node_modules/@allyhub-next/scenery/dist/handheld.d.ts +184 -0
  231. package/node_modules/@allyhub-next/scenery/dist/handheld.js +2 -0
  232. package/node_modules/@allyhub-next/scenery/dist/hull.d.ts +23 -0
  233. package/node_modules/@allyhub-next/scenery/dist/hull.js +2 -0
  234. package/node_modules/@allyhub-next/scenery/dist/index.d.ts +22 -0
  235. package/node_modules/@allyhub-next/scenery/dist/index.js +2 -0
  236. package/node_modules/@allyhub-next/scenery/dist/lens.d.ts +48 -0
  237. package/node_modules/@allyhub-next/scenery/dist/lens.js +2 -0
  238. package/node_modules/@allyhub-next/scenery/dist/moire.d.ts +136 -0
  239. package/node_modules/@allyhub-next/scenery/dist/moire.js +93 -0
  240. package/node_modules/@allyhub-next/scenery/dist/motion.d.ts +48 -0
  241. package/node_modules/@allyhub-next/scenery/dist/motion.js +2 -0
  242. package/node_modules/@allyhub-next/scenery/dist/move.d.ts +260 -0
  243. package/node_modules/@allyhub-next/scenery/dist/move.js +2 -0
  244. package/node_modules/@allyhub-next/scenery/dist/noise.d.ts +41 -0
  245. package/node_modules/@allyhub-next/scenery/dist/noise.js +2 -0
  246. package/node_modules/@allyhub-next/scenery/dist/phone.d.ts +34 -0
  247. package/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
  248. package/node_modules/@allyhub-next/scenery/dist/report.d.ts +677 -0
  249. package/node_modules/@allyhub-next/scenery/dist/report.js +2 -0
  250. package/node_modules/@allyhub-next/scenery/dist/screen-focus.d.ts +55 -0
  251. package/node_modules/@allyhub-next/scenery/dist/screen-focus.js +2 -0
  252. package/node_modules/@allyhub-next/scenery/dist/screen.d.ts +71 -0
  253. package/node_modules/@allyhub-next/scenery/dist/screen.js +2 -0
  254. package/node_modules/@allyhub-next/scenery/dist/solve.d.ts +82 -0
  255. package/node_modules/@allyhub-next/scenery/dist/solve.js +2 -0
  256. package/node_modules/@allyhub-next/scenery/dist/timing.d.ts +26 -0
  257. package/node_modules/@allyhub-next/scenery/dist/timing.js +2 -0
  258. package/node_modules/@allyhub-next/scenery/dist/vec.d.ts +19 -0
  259. package/node_modules/@allyhub-next/scenery/dist/vec.js +2 -0
  260. package/node_modules/@allyhub-next/scenery/package.json +13 -0
  261. package/node_modules/@allyhub-next/video-core/dist/anchors.d.ts +164 -0
  262. package/node_modules/@allyhub-next/video-core/dist/anchors.js +2 -0
  263. package/node_modules/@allyhub-next/video-core/dist/audio-types.d.ts +148 -0
  264. package/node_modules/@allyhub-next/video-core/dist/audio-types.js +2 -0
  265. package/node_modules/@allyhub-next/video-core/dist/backdrop.d.ts +87 -0
  266. package/node_modules/@allyhub-next/video-core/dist/backdrop.js +2 -0
  267. package/node_modules/@allyhub-next/video-core/dist/captions.d.ts +122 -0
  268. package/node_modules/@allyhub-next/video-core/dist/captions.js +11 -0
  269. package/node_modules/@allyhub-next/video-core/dist/console.d.ts +91 -0
  270. package/node_modules/@allyhub-next/video-core/dist/console.js +2 -0
  271. package/node_modules/@allyhub-next/video-core/dist/contrast.d.ts +98 -0
  272. package/node_modules/@allyhub-next/video-core/dist/contrast.js +2 -0
  273. package/node_modules/@allyhub-next/video-core/dist/cut-report.d.ts +77 -0
  274. package/node_modules/@allyhub-next/video-core/dist/cut-report.js +2 -0
  275. package/node_modules/@allyhub-next/video-core/dist/edit.d.ts +77 -0
  276. package/node_modules/@allyhub-next/video-core/dist/edit.js +13 -0
  277. package/node_modules/@allyhub-next/video-core/dist/edits.d.ts +163 -0
  278. package/node_modules/@allyhub-next/video-core/dist/edits.js +2 -0
  279. package/node_modules/@allyhub-next/video-core/dist/export.d.ts +96 -0
  280. package/node_modules/@allyhub-next/video-core/dist/export.js +2 -0
  281. package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +965 -0
  282. package/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
  283. package/node_modules/@allyhub-next/video-core/dist/footage-motion.d.ts +168 -0
  284. package/node_modules/@allyhub-next/video-core/dist/footage-motion.js +2 -0
  285. package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +240 -0
  286. package/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
  287. package/node_modules/@allyhub-next/video-core/dist/gen.d.ts +37 -0
  288. package/node_modules/@allyhub-next/video-core/dist/gen.js +2 -0
  289. package/node_modules/@allyhub-next/video-core/dist/index.d.ts +40 -0
  290. package/node_modules/@allyhub-next/video-core/dist/index.js +2 -0
  291. package/node_modules/@allyhub-next/video-core/dist/look.d.ts +66 -0
  292. package/node_modules/@allyhub-next/video-core/dist/look.js +2 -0
  293. package/node_modules/@allyhub-next/video-core/dist/marks.d.ts +34 -0
  294. package/node_modules/@allyhub-next/video-core/dist/marks.js +2 -0
  295. package/node_modules/@allyhub-next/video-core/dist/matrix.d.ts +289 -0
  296. package/node_modules/@allyhub-next/video-core/dist/matrix.js +2 -0
  297. package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +465 -0
  298. package/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
  299. package/node_modules/@allyhub-next/video-core/dist/media.d.ts +226 -0
  300. package/node_modules/@allyhub-next/video-core/dist/media.js +2 -0
  301. package/node_modules/@allyhub-next/video-core/dist/messages.d.ts +88 -0
  302. package/node_modules/@allyhub-next/video-core/dist/messages.js +2 -0
  303. package/node_modules/@allyhub-next/video-core/dist/motion.d.ts +56 -0
  304. package/node_modules/@allyhub-next/video-core/dist/motion.js +2 -0
  305. package/node_modules/@allyhub-next/video-core/dist/music.d.ts +110 -0
  306. package/node_modules/@allyhub-next/video-core/dist/music.js +2 -0
  307. package/node_modules/@allyhub-next/video-core/dist/piece.d.ts +1146 -0
  308. package/node_modules/@allyhub-next/video-core/dist/piece.js +2 -0
  309. package/node_modules/@allyhub-next/video-core/dist/placement.d.ts +37 -0
  310. package/node_modules/@allyhub-next/video-core/dist/placement.js +2 -0
  311. package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +262 -0
  312. package/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
  313. package/node_modules/@allyhub-next/video-core/dist/render-types.d.ts +49 -0
  314. package/node_modules/@allyhub-next/video-core/dist/render-types.js +2 -0
  315. package/node_modules/@allyhub-next/video-core/dist/schema.d.ts +352 -0
  316. package/node_modules/@allyhub-next/video-core/dist/schema.js +2 -0
  317. package/node_modules/@allyhub-next/video-core/dist/script-edit.d.ts +176 -0
  318. package/node_modules/@allyhub-next/video-core/dist/script-edit.js +2 -0
  319. package/node_modules/@allyhub-next/video-core/dist/script.d.ts +67 -0
  320. package/node_modules/@allyhub-next/video-core/dist/script.js +2 -0
  321. package/node_modules/@allyhub-next/video-core/dist/seams.d.ts +214 -0
  322. package/node_modules/@allyhub-next/video-core/dist/seams.js +2 -0
  323. package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +37 -0
  324. package/node_modules/@allyhub-next/video-core/dist/slides.js +2 -0
  325. package/node_modules/@allyhub-next/video-core/dist/sound-under.d.ts +72 -0
  326. package/node_modules/@allyhub-next/video-core/dist/sound-under.js +2 -0
  327. package/node_modules/@allyhub-next/video-core/dist/speech.d.ts +83 -0
  328. package/node_modules/@allyhub-next/video-core/dist/speech.js +5 -0
  329. package/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +616 -0
  330. package/node_modules/@allyhub-next/video-core/dist/timeline.js +2 -0
  331. package/node_modules/@allyhub-next/video-core/dist/timing.d.ts +88 -0
  332. package/node_modules/@allyhub-next/video-core/dist/timing.js +2 -0
  333. package/node_modules/@allyhub-next/video-core/dist/transcript.d.ts +288 -0
  334. package/node_modules/@allyhub-next/video-core/dist/transcript.js +2 -0
  335. package/node_modules/@allyhub-next/video-core/dist/transition.d.ts +289 -0
  336. package/node_modules/@allyhub-next/video-core/dist/transition.js +2 -0
  337. package/node_modules/@allyhub-next/video-core/dist/voice.d.ts +175 -0
  338. package/node_modules/@allyhub-next/video-core/dist/voice.js +2 -0
  339. package/node_modules/@allyhub-next/video-core/dist/words.d.ts +128 -0
  340. package/node_modules/@allyhub-next/video-core/dist/words.js +2 -0
  341. package/node_modules/@allyhub-next/video-core/package.json +14 -0
  342. package/package.json +52 -41
  343. package/README.md +0 -17
  344. package/dist/anim.d.ts.map +0 -1
  345. package/dist/anim.js.map +0 -1
  346. package/dist/define.d.ts.map +0 -1
  347. package/dist/define.js.map +0 -1
  348. package/dist/dom.d.ts.map +0 -1
  349. package/dist/dom.js.map +0 -1
  350. package/dist/fit.d.ts.map +0 -1
  351. package/dist/fit.js.map +0 -1
  352. package/dist/index.d.ts.map +0 -1
  353. package/dist/index.js.map +0 -1
  354. package/dist/media.d.ts.map +0 -1
  355. package/dist/media.js.map +0 -1
  356. package/dist/messages.d.ts.map +0 -1
  357. package/dist/messages.js.map +0 -1
  358. package/dist/noise.d.ts.map +0 -1
  359. package/dist/noise.js.map +0 -1
  360. package/dist/parts.d.ts.map +0 -1
  361. package/dist/parts.js.map +0 -1
  362. package/dist/paths.d.ts.map +0 -1
  363. package/dist/paths.js.map +0 -1
  364. package/dist/piece.d.ts.map +0 -1
  365. package/dist/piece.js.map +0 -1
  366. package/dist/props.d.ts.map +0 -1
  367. package/dist/props.js.map +0 -1
  368. package/dist/text.d.ts.map +0 -1
  369. package/dist/text.js.map +0 -1
  370. /package/{LICENSE → LICENSE.md} +0 -0
@@ -0,0 +1,37 @@
1
+ import { type MixLevels } from "./levels.js";
2
+ import type { GainPoint, Segment } from "./plan.js";
3
+ /** A stretch of the film, seconds. */
4
+ export interface Span {
5
+ start: number;
6
+ end: number;
7
+ }
8
+ /**
9
+ * Music gain under speech: down by `duck.db` while words are spoken,
10
+ * going down over `attack` before a word and back over `release` after
11
+ * one. Pauses shorter than `hold` stay ducked: under a narration the
12
+ * music is one steady bed, not a swell between every two sentences. It
13
+ * comes back up between paragraphs, and where nobody speaks.
14
+ */
15
+ export declare function duckEnvelope(spoken: readonly Span[], duck?: MixLevels["duck"]): GainPoint[];
16
+ /**
17
+ * Where speech plays on the film's clock: its segments (room tone
18
+ * included), with gaps shorter than a ramp down and back up joined.
19
+ */
20
+ export declare function speechSpans(segments: readonly Segment[], duck?: MixLevels["duck"]): Span[];
21
+ /**
22
+ * A level that changes by `depth` dB while speech plays (the spans),
23
+ * ramping over the duck's attack and release: music and footage go to
24
+ * their under-speech level only then.
25
+ */
26
+ export declare function speechEnvelope(spans: readonly Span[], depth: number, duck?: MixLevels["duck"]): GainPoint[];
27
+ /** The sum of two envelopes, exact at every point of either. */
28
+ export declare function addEnvelopes(a: readonly GainPoint[], b: readonly GainPoint[]): GainPoint[];
29
+ /**
30
+ * The gain of an equal-power fade `x` of the way through (0 to 1): two
31
+ * unrelated sounds cross-faded with it keep their summed power, so room
32
+ * tone goes over into the take's own room without a dip.
33
+ */
34
+ export declare const equalPower: (x: number) => number;
35
+ /** The envelope's gain at t, in dB: its first value before it, its last after it. */
36
+ export declare function gainAt(points: readonly GainPoint[], t: number): number;
37
+ //# sourceMappingURL=envelope.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{MIX_DEFAULTS as s}from"./levels.js";function f(e,t){const n=[];for(const r of[...e].sort((a,o)=>a.start-o.start)){const a=n.at(-1);a&&r.start-a.end<t?a.end=Math.max(a.end,r.end):n.push({start:r.start,end:r.end})}return n}function u(e,t,n,r){const a=[];for(const o of e)a.push({t:Math.max(0,o.start-n),db:0},{t:o.start,db:t},{t:o.end,db:t},{t:o.end+r,db:0});return a}export function duckEnvelope(e,t=s.duck){return t.db>=0||e.length===0?[]:u(f(e,t.hold+t.attack+t.release),t.db,t.attack,t.release)}export function speechSpans(e,t=s.duck){return f(e.filter(n=>n.dur>0).map(n=>({start:n.at,end:n.at+n.dur})),t.attack+t.release)}export function speechEnvelope(e,t,n=s.duck){return t===0||e.length===0?[]:u(e,t,n.attack,n.release)}export function addEnvelopes(e,t){return e.length===0?[...t]:t.length===0?[...e]:[...new Set([...e,...t].map(r=>r.t))].sort((r,a)=>r-a).map(r=>({t:r,db:gainAt(e,r)+gainAt(t,r)}))}export const equalPower=e=>Math.sin(Math.PI/2*Math.min(1,Math.max(0,e)));export function gainAt(e,t){if(e.length===0)return 0;const n=e[0];if(!n||t<=n.t)return n?.db??0;for(let r=1;r<e.length;r++){const a=e[r-1],o=e[r];if(!(!a||!o)&&t<=o.t)return o.t===a.t?o.db:a.db+(o.db-a.db)*(t-a.t)/(o.t-a.t)}return e.at(-1)?.db??0}
@@ -0,0 +1,17 @@
1
+ export { SAMPLE_RATE, type FootageClip, type GainPoint, type MixPlan, type MusicPlay, type MusicSegment, type PartSpan, type Segment, type SfxPlay, type SpeechClip, type Stereo, type VoicePlan, } from "./plan.js";
2
+ export { addEnvelopes, duckEnvelope, equalPower, gainAt, speechEnvelope, speechSpans, type Span, } from "./envelope.js";
3
+ export { clipSource, decodeKey, decodings, speechHow, type DecodeAs, type SoundOf, } from "./decode.js";
4
+ export { renderMix, playSfx, type RenderOptions } from "./render.js";
5
+ export { playMusic } from "./music.js";
6
+ export { hashSeed, SFX_HIT, synthSfx } from "./sfx.js";
7
+ export { addSpeech, playVoice, sumSpeech, voiceGroups, type ClipSource, type VoiceGroup, } from "./voice.js";
8
+ export { limitPeaks, masterMix, previewMaster } from "./master.js";
9
+ export { drySpeech, recordedSpeech, type SpeechTracks } from "./recorded.js";
10
+ export { db, levelCurve, silenceBands, soundAtCut, waveColumns, type Band, type CutSound, type SilenceOptions, } from "./at-cut.js";
11
+ export { MASTER_DEFAULTS, MASTER_MECHANICS, MIX_DEFAULTS, resolveMaster, resolveMix, type MasterOptions, type MasterTargets, type MixLevels, type MixOptions, } from "./levels.js";
12
+ export { BAND_TYPES, bandAt, COMPRESS_DEFAULTS, shapeProblem, shapes, shapeSound, soundFilterProblem, soundLevel, type BandKey, type BandType, type EqBand, type FixedShape, type ResolvedShape, type SoundCompressor, type SoundMoment, type SoundShape, } from "./shape.js";
13
+ export * from "./recording/index.js";
14
+ export { biquad, biquadGain, BUTTERWORTH_Q, chainGain, fromDb, runBiquads, toDb, type Biquad, type FilterSpec, } from "./recording/filters.js";
15
+ export { convolve, fft, magnitudes, minimumPhase, nextPow2, } from "./recording/fft.js";
16
+ export { agc, compress, deess, gainComputer, type AgcOptions, type CompressorOptions, type DeesserOptions, } from "./recording/dynamics.js";
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ export{SAMPLE_RATE}from"./plan.js";export{addEnvelopes,duckEnvelope,equalPower,gainAt,speechEnvelope,speechSpans}from"./envelope.js";export{clipSource,decodeKey,decodings,speechHow}from"./decode.js";export{renderMix,playSfx}from"./render.js";export{playMusic}from"./music.js";export{hashSeed,SFX_HIT,synthSfx}from"./sfx.js";export{addSpeech,playVoice,sumSpeech,voiceGroups}from"./voice.js";export{limitPeaks,masterMix,previewMaster}from"./master.js";export{drySpeech,recordedSpeech}from"./recorded.js";export{db,levelCurve,silenceBands,soundAtCut,waveColumns}from"./at-cut.js";export{MASTER_DEFAULTS,MASTER_MECHANICS,MIX_DEFAULTS,resolveMaster,resolveMix}from"./levels.js";export{BAND_TYPES,bandAt,COMPRESS_DEFAULTS,shapeProblem,shapes,shapeSound,soundFilterProblem,soundLevel}from"./shape.js";export*from"./recording/index.js";export{biquad,biquadGain,BUTTERWORTH_Q,chainGain,fromDb,runBiquads,toDb}from"./recording/filters.js";export{convolve,fft,magnitudes,minimumPhase,nextPow2}from"./recording/fft.js";export{agc,compress,deess,gainComputer}from"./recording/dynamics.js";
@@ -0,0 +1,97 @@
1
+ /** `video({ mix })`: loudness targets of the stems (LUFS) and the music's ducking and fades. */
2
+ export interface MixOptions {
3
+ /** Each part's speech; default -16. */
4
+ speech?: number;
5
+ /** The music while speech plays; default -20. */
6
+ music?: number;
7
+ /** The music where nobody speaks; default -16. */
8
+ musicAlone?: number;
9
+ /** Sound effects from files; built-in sounds move by the same amount from the default; default -22. */
10
+ sfx?: number;
11
+ /** Footage's own sound where nobody speaks; default -16. */
12
+ footage?: number;
13
+ /** Footage's own sound while speech plays; default -22. */
14
+ footageUnderSpeech?: number;
15
+ /**
16
+ * How the music dips under words: `db` below its level while speech
17
+ * plays (default -8), going down over `attack` seconds before a word
18
+ * (0.3), back up over `release` after one (1), and staying down
19
+ * through pauses shorter than `hold` (2).
20
+ */
21
+ duck?: {
22
+ db?: number;
23
+ attack?: number;
24
+ release?: number;
25
+ hold?: number;
26
+ };
27
+ /** The music's fade in at the start and out at the end, seconds; defaults 0.3 and 1.5 (at most a quarter of the video). */
28
+ musicFade?: {
29
+ in?: number;
30
+ out?: number;
31
+ };
32
+ }
33
+ /** The mix's settings with every default filled in. */
34
+ export interface MixLevels {
35
+ speech: number;
36
+ music: number;
37
+ musicAlone: number;
38
+ sfx: number;
39
+ footage: number;
40
+ footageUnderSpeech: number;
41
+ duck: {
42
+ db: number;
43
+ attack: number;
44
+ release: number;
45
+ hold: number;
46
+ };
47
+ musicFade: {
48
+ in: number;
49
+ out: number;
50
+ };
51
+ }
52
+ export declare const MIX_DEFAULTS: MixLevels;
53
+ /** An output's mix options over the defaults. */
54
+ export declare function resolveMix(o: MixOptions | undefined): MixLevels;
55
+ /** `video({ master })`: what the sum is mastered to. */
56
+ export interface MasterOptions {
57
+ /**
58
+ * Integrated loudness, LUFS (-70 to 0); default the platform profile's,
59
+ * else -14. false keeps the mix's own level (peaks still limited).
60
+ */
61
+ lufs?: number | false;
62
+ /** True-peak ceiling, dBTP (-9 to 0); default -3 (AAC overshoots up to about 2 dB). */
63
+ truePeak?: number;
64
+ }
65
+ export declare const MASTER_DEFAULTS: {
66
+ readonly lufs: -14;
67
+ readonly truePeak: -3;
68
+ };
69
+ /**
70
+ * How the master reaches its targets, mechanics rather than options: the
71
+ * mix's integrated loudness is measured, one gain brings it to the target,
72
+ * a limiter at `oversample` times the rate holds the true peak under the
73
+ * ceiling (going down over `attack` seconds, back over `release`), and
74
+ * what came out is measured again; the gain is corrected by what the
75
+ * limiter took, at most `rounds` times, until the loudness is within
76
+ * `tolerance` LU of the target. Nothing rides the level over time: the
77
+ * mix keeps its loudness range.
78
+ */
79
+ export declare const MASTER_MECHANICS: {
80
+ readonly attack: 0.002;
81
+ readonly release: 0.04;
82
+ readonly oversample: 4;
83
+ readonly rounds: 4;
84
+ readonly tolerance: 0.1;
85
+ };
86
+ /** The master's targets, or false to keep the mix's level (its peaks still limited to `truePeak`). */
87
+ export interface MasterTargets {
88
+ lufs: number | false;
89
+ truePeak: number;
90
+ }
91
+ /**
92
+ * An output's `master` resolved: a number is the loudness, false keeps
93
+ * the mix's level, an object sets either; `profileLufs` is the platform
94
+ * profile's loudness, the default when the output names none.
95
+ */
96
+ export declare function resolveMaster(master: number | false | MasterOptions | undefined, profileLufs?: number): MasterTargets;
97
+ //# sourceMappingURL=levels.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ export const MIX_DEFAULTS={speech:-16,music:-20,musicAlone:-16,sfx:-22,footage:-16,footageUnderSpeech:-22,duck:{db:-8,attack:.3,release:1,hold:2},musicFade:{in:.3,out:1.5}};export function resolveMix(e){const u=MIX_DEFAULTS;return{speech:e?.speech??u.speech,music:e?.music??u.music,musicAlone:e?.musicAlone??u.musicAlone,sfx:e?.sfx??u.sfx,footage:e?.footage??u.footage,footageUnderSpeech:e?.footageUnderSpeech??u.footageUnderSpeech,duck:{...u.duck,...e?.duck},musicFade:{...u.musicFade,...e?.musicFade}}}export const MASTER_DEFAULTS={lufs:-14,truePeak:-3},MASTER_MECHANICS={attack:.002,release:.04,oversample:4,rounds:4,tolerance:.1};export function resolveMaster(e,u){const s=u??MASTER_DEFAULTS.lufs;return e===!1?{lufs:!1,truePeak:MASTER_DEFAULTS.truePeak}:typeof e=="number"?{lufs:e,truePeak:MASTER_DEFAULTS.truePeak}:{lufs:e?.lufs??s,truePeak:e?.truePeak??MASTER_DEFAULTS.truePeak}}
@@ -0,0 +1,29 @@
1
+ import { type MasterTargets } from "./levels.js";
2
+ import type { Stereo } from "./plan.js";
3
+ /**
4
+ * Holds the samples' peaks at `ceiling` (linear) in place: a gain that
5
+ * looks `attack` seconds ahead, comes down to what the loudest sample in
6
+ * that window allows, averaged over the window so it never jumps, and
7
+ * comes back up over `release`. The preview's limiter: it holds the
8
+ * samples, not the peaks between them, which the export's limiter holds
9
+ * at four times the rate.
10
+ */
11
+ export declare function limitPeaks(bus: Stereo, ceiling: number, rate: number, attack?: number, release?: number): void;
12
+ /**
13
+ * The preview's master, in place: the export's measured gain to the
14
+ * target loudness and a limiter at the ceiling, the gain corrected by
15
+ * what the limiter took (MASTER_MECHANICS). Its limiter holds samples,
16
+ * not true peaks, so the preview's peaks and loudness can differ from the
17
+ * export's by a fraction of a dB where the mix is limited hard.
18
+ */
19
+ export declare function masterMix(bus: Stereo, rate: number, targets: MasterTargets): {
20
+ gainDb: number;
21
+ integrated?: number;
22
+ };
23
+ /**
24
+ * A plan's mix as the player plays it: rendered (render.ts), then
25
+ * mastered in place as the export is. Undefined where it is silent:
26
+ * nothing to master or to play.
27
+ */
28
+ export declare function previewMaster(bus: Stereo, rate: number, targets: MasterTargets): Stereo | undefined;
29
+ //# sourceMappingURL=master.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{integratedLoudness as w}from"./recording/loudness.js";import{MASTER_MECHANICS as M}from"./levels.js";export function limitPeaks(e,s,i,m=M.attack,c=M.release){const n=e[0].length,o=Math.max(1,Math.round(m*i)),a=new Float32Array(n);for(let t=0;t<n;t++){const d=Math.max(Math.abs(e[0][t]??0),Math.abs(e[1][t]??0));a[t]=d>s?s/d:1}const r=new Float32Array(n),l=[];let f=0;for(let t=n-1;t>=0;t--){const d=a[t]??1;for(;l.length>f&&(a[l[l.length-1]??0]??1)>=d;)l.pop();for(l.push(t);(l[f]??0)>t+o;)f++;r[t]=a[l[f]??t]??1}const u=Math.exp(-1/(Math.max(c,1e-4)*i));let h=1;for(let t=0;t<n;t++)h=Math.min(r[t]??1,1-(1-h)*u),r[t]=h;let p=0;const x=new Float32Array(n);for(let t=0;t<n;t++)p+=r[t]??1,t>=o&&(p-=r[t-o]??1),x[t]=p/Math.min(o,t+1);for(let t=0;t<n;t++){const d=Math.min(x[t]??1,a[t]??1);e[0][t]=(e[0][t]??0)*d,e[1][t]=(e[1][t]??0)*d}}export function masterMix(e,s,i){const m=10**(i.truePeak/20),c=w(e,s),n=l=>{const f=10**(l/20),u=[Float32Array.from(e[0],h=>h*f),Float32Array.from(e[1],h=>h*f)];return limitPeaks(u,m,s),u};let o=i.lufs===!1||c===void 0?0:i.lufs-c,a=n(o),r=w(a,s);if(i.lufs!==!1&&c!==void 0)for(let l=1;l<M.rounds&&r!==void 0;l++){const f=i.lufs-r;if(Math.abs(f)<=M.tolerance)break;o+=f,a=n(o),r=w(a,s)}return e[0].set(a[0]),e[1].set(a[1]),{gainDb:o,...r===void 0?{}:{integrated:r}}}export function previewMaster(e,s,i){const[m,c]=e;let n=!1;for(let o=0;o<m.length&&!n;o++)n=m[o]!==0||c[o]!==0;if(n)return masterMix(e,s,i),e}
@@ -0,0 +1,11 @@
1
+ import type { MusicPlay, Stereo } from "./plan.js";
2
+ /**
3
+ * The music as the film plays it, at `rate`: its segments with their
4
+ * seams' equal-power fades, shaped by its bands and compressor, levelled
5
+ * (a shaped stem by its loudness as shaped, to the mix's musicAlone),
6
+ * then its gain over time (its dip under speech and its own points) and
7
+ * its fades, ending at `until` or the film's end. What the render's mix
8
+ * and the player add.
9
+ */
10
+ export declare function playMusic(m: MusicPlay, src: Stereo, duration: number, rate: number): Stereo;
11
+ //# sourceMappingURL=music.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{equalPower as b,gainAt as D}from"./envelope.js";import{shapes as F,shapeSound as I,soundLevel as O}from"./shape.js";export function playMusic(f,c,M,t){const i=Math.round(M*t),o=[new Float32Array(i),new Float32Array(i)],g=c[0].length;if(g===0)return o;for(const n of f.segments){const e=Math.round(n.at*t),k=Math.round(n.from*t),r=Math.round(n.dur*t),l=Math.round(n.fadeIn*t),p=Math.round(n.fadeOut*t);for(let s=0;s<r;s++){const u=e+s,a=k+s;if(u<0||u>=i||a<0||a>=g)continue;let d=1;l>0&&s<l&&(d*=b(s/l)),p>0&&r-1-s<p&&(d*=b((r-1-s)/p)),o[0][u]=(o[0][u]??0)+(c[0][a]??0)*d,o[1][u]=(o[1][u]??0)+(c[1][a]??0)*d}}let w=f.gainDb;if(f.shape&&(F(f.shape)||f.shape.filter!==void 0)){I(o,f.shape,t,0);const n=O(o,t);n&&(w=f.alone-n.lufs)}const y=Math.round(f.fadeIn*t),A=Math.round(f.fadeOut*t),h=Math.min(i,Math.round((f.until??M)*t));for(let n=0;n<i;n++){if(n>=h){o[0][n]=0,o[1][n]=0;continue}let e=10**((w+D(f.duck,n/t))/20);n<y&&(e*=n/y),h-n<A&&(e*=(h-n)/A),o[0][n]=(o[0][n]??0)*e,o[1][n]=(o[1][n]??0)*e}return o}
@@ -0,0 +1,39 @@
1
+ import { type DecodeAs, type SoundOf } from "../decode.js";
2
+ import { type MixPlan } from "../plan.js";
3
+ import { type FfmpegOptions } from "./ffmpeg.js";
4
+ /**
5
+ * Speech clean-up: ffmpeg's FFT denoiser (afftdn) reducing the noise by
6
+ * `db`, tracking the noise floor as it changes.
7
+ */
8
+ export declare function denoiseFilter(db: number): string;
9
+ /**
10
+ * The filters that play a file's sound as the mix does: a stem's own
11
+ * filter chain, the denoiser, then ffmpeg's atempo (a time stretch that
12
+ * keeps the pitch; one filter covers 0.5 to 2). None for a file played
13
+ * as recorded.
14
+ */
15
+ export declare function speechFilters(o: DecodeAs): string[];
16
+ /**
17
+ * A file's sound denoised, sped or filtered as the mix plays it (the
18
+ * same filters, stereo at 48 kHz), written to `out` as FLAC: what the
19
+ * preview plays for a take with denoise() or speed(), or a stem with a
20
+ * filter.
21
+ */
22
+ export declare function speechFile(path: string, out: string, how: DecodeAs, o?: FfmpegOptions): Promise<void>;
23
+ /**
24
+ * A sound or video file's sound as two channels at 48 kHz (a mono file
25
+ * given twice), through the filters `how` asks for.
26
+ */
27
+ export declare function decodeStereo(path: string, how?: DecodeAs, o?: FfmpegOptions): Promise<[Float32Array, Float32Array]>;
28
+ /** A file's sound as one channel at `rate` (its channels mixed down), as ffmpeg resamples it. */
29
+ export declare function decodeMono(path: string, rate: number, o?: FfmpegOptions): Promise<Float32Array>;
30
+ /** Where the plan's files are: its name for a file (a repository path) to a path on this computer. */
31
+ export interface MixSources {
32
+ file(name: string): string | undefined;
33
+ }
34
+ /**
35
+ * Every file the plan plays decoded as it asks (a take denoised and sped,
36
+ * a stem filtered), each once; a file that cannot be decoded is left out.
37
+ */
38
+ export declare function decodePlan(plan: MixPlan, sources: MixSources, o?: FfmpegOptions): Promise<SoundOf>;
39
+ //# sourceMappingURL=decode.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{decodeKey as p,decodings as g}from"../decode.js";import{SAMPLE_RATE as w}from"../plan.js";import{ffmpegOf as d,floats as u,runFfmpeg as l}from"./ffmpeg.js";const m=w;export function denoiseFilter(t){return`afftdn=nr=${Math.min(Math.max(t,.01),97).toFixed(2)}:nf=-50:tn=1`}export function speechFilters(t){return[...t.filter?[t.filter]:[],...t.denoise?[denoiseFilter(t.denoise)]:[],...t.speed!==void 0&&t.speed!==1?[`atempo=${t.speed.toFixed(6)}`]:[]]}export async function speechFile(t,n,i,r={}){const c=speechFilters(i);await l(await d(r),["-v","error","-y","-i",t,"-vn",...c.length>0?["-af",c.join(",")]:[],"-ac","2","-ar",String(m),"-c:a","flac","-f","flac",n])}export async function decodeStereo(t,n={},i={}){const r=speechFilters(n),{out:c}=await l(await d(i),["-v","error","-i",t,...r.length>0?["-af",r.join(",")]:[],"-f","f32le","-ac","2","-ar",String(m),"-"],!0),o=u(c),e=Math.floor(o.length/2),a=new Float32Array(e),s=new Float32Array(e);for(let f=0;f<e;f++)a[f]=o[f*2]??0,s[f]=o[f*2+1]??0;return[a,s]}export async function decodeMono(t,n,i={}){const{out:r}=await l(await d(i),["-v","error","-i",t,"-map","0:a:0","-ac","1","-ar",String(n),"-f","f32le","-"],!0);return u(r)}export async function decodePlan(t,n,i={}){const r=await d(i),c=new Map;for(const{file:o,how:e}of g(t)){const a=n.file(o);if(!a)continue;const s=await decodeStereo(a,e,{ffmpeg:r}).catch(()=>{});s&&c.set(p(o,e),s)}return(o,e)=>{const a=c.get(p(o,e));return a?{src:a,made:e}:void 0}}
@@ -0,0 +1,25 @@
1
+ /** One ebur128 measurement, every 100 ms. */
2
+ export interface LoudnessFrame {
3
+ /** End of the measured window, seconds. */
4
+ t: number;
5
+ /** Momentary loudness (400 ms window), LUFS. */
6
+ momentary: number;
7
+ /** Short-term loudness (3 s window), LUFS. */
8
+ shortTerm: number;
9
+ }
10
+ /** The summary: integrated loudness (LUFS), its range (LU) and true peak (dBTP). */
11
+ export interface LoudnessSummary {
12
+ /** Absent when everything is gated out: ebur128 says −70 LUFS then, nothing to hear. */
13
+ integrated?: number;
14
+ range?: number;
15
+ truePeak?: number;
16
+ }
17
+ /** A finite number in a match, or undefined (`-inf`, missing). */
18
+ export declare function num(s: string | undefined): number | undefined;
19
+ /** ebur128's summary, the last one in the log. */
20
+ export declare function ebur128Summary(log: string): LoudnessSummary;
21
+ /** ebur128's per-frame log (framelog=info) and its summary. */
22
+ export declare function parseEbur128(log: string): LoudnessSummary & {
23
+ frames: LoudnessFrame[];
24
+ };
25
+ //# sourceMappingURL=ebur128.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ export function num(e){if(e===void 0)return;const n=Number(e);return Number.isFinite(n)?n:void 0}export function ebur128Summary(e){const n=e.slice(e.lastIndexOf("Summary:")),t=num(/Integrated loudness:\s*\n\s*I:\s*(-?[\d.]+|-inf) LUFS/.exec(n)?.[1]),s=num(/Loudness range:\s*\n\s*LRA:\s*(-?[\d.]+)/.exec(n)?.[1]),r=num(/True peak:\s*\n\s*Peak:\s*(-?[\d.]+|-inf)/.exec(n)?.[1]);return{...t!==void 0&&t>-70?{integrated:t}:{},...s===void 0?{}:{range:s},...r===void 0?{}:{truePeak:r}}}export function parseEbur128(e){const n=[],t=/\bt:\s*(-?[\d.]+)\s+TARGET:.*?\bM:\s*(-?[\d.]+|-inf)\s+S:\s*(-?[\d.]+|-inf)/g;for(const s of e.matchAll(t)){const r=num(s[1]);r!==void 0&&n.push({t:r,momentary:num(s[2])??-120,shortTerm:num(s[3])??-120})}return{frames:n,...ebur128Summary(e)}}
@@ -0,0 +1,31 @@
1
+ /** What can go wrong, by a code a caller branches on. */
2
+ export type AudioErrorCode =
3
+ /** The file has no sound stream. */
4
+ "no-sound"
5
+ /** ffmpeg exited with an error. */
6
+ | "ffmpeg";
7
+ export declare class AudioError extends Error {
8
+ readonly code: AudioErrorCode;
9
+ constructor(code: AudioErrorCode, message: string, options?: ErrorOptions);
10
+ }
11
+ /** Which ffmpeg to run; default the runtime manager's pinned build, fetched when first needed. */
12
+ export interface FfmpegOptions {
13
+ ffmpeg?: string | undefined;
14
+ }
15
+ /** The ffmpeg to run: the one named, else the pinned one. */
16
+ export declare function ffmpegOf(o?: FfmpegOptions): Promise<string>;
17
+ /** How much of ffmpeg's log a run keeps unless it asks for more, in characters. */
18
+ export declare const FFMPEG_LOG = 200000;
19
+ /**
20
+ * Runs ffmpeg; resolves with its stdout (when asked for) and stderr. Of
21
+ * its log, the last `keep` characters are kept (at least half of them):
22
+ * enough to say what went wrong. A run that measures from the log (a
23
+ * line per moment of the sound) asks for all of it.
24
+ */
25
+ export declare function runFfmpeg(ffmpeg: string, args: string[], stdout?: boolean, keep?: number): Promise<{
26
+ out: Buffer;
27
+ err: string;
28
+ }>;
29
+ /** Samples of 32-bit floats from ffmpeg's output, copied: the Buffer may not be 4-byte aligned. */
30
+ export declare function floats(out: Buffer): Float32Array;
31
+ //# sourceMappingURL=ffmpeg.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{spawn as d}from"node:child_process";import{createRuntimes as m}from"@allyhub-next/runtimes";export class AudioError extends Error{code;constructor(r,o,f){super(o,f),this.name="AudioError",this.code=r}}let s;export function ffmpegOf(e={}){if(e.ffmpeg!==void 0)return Promise.resolve(e.ffmpeg);const r=s??m().bin("ffmpeg","ffmpeg").catch(o=>{throw s=void 0,o});return s=r,r}export const FFMPEG_LOG=2e5;export function runFfmpeg(e,r,o=!1,f=FFMPEG_LOG){return new Promise((u,p)=>{const i=d(e,r,{stdio:["ignore",o?"pipe":"ignore","pipe"]}),c=[];let t="";i.stdout?.on("data",n=>c.push(n)),i.stderr?.on("data",n=>{t+=n.toString(),t.length>f&&(t=t.slice(-f/2))}),i.on("error",p),i.on("close",n=>{n===0?u({out:Buffer.concat(c),err:t}):p(new AudioError("ffmpeg",`ffmpeg failed (${String(n)}): ${t.slice(-2e3)}`))})})}export function floats(e){return new Float32Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength-e.byteLength%4))}
@@ -0,0 +1,8 @@
1
+ export { AudioError, FFMPEG_LOG, ffmpegOf, runFfmpeg, type AudioErrorCode, type FfmpegOptions, } from "./ffmpeg.js";
2
+ export { decodeMono, decodePlan, decodeStereo, denoiseFilter, speechFile, speechFilters, type MixSources, } from "./decode.js";
3
+ export { mixToSamples, voiceTracks, type VoiceTracks } from "./mix.js";
4
+ export { master, type Mastered, type Measured } from "./master.js";
5
+ export { fileLoudness, type FileLoudness } from "./loudness.js";
6
+ export { ebur128Summary, parseEbur128, type LoudnessFrame, type LoudnessSummary, } from "./ebur128.js";
7
+ export { ANALYZE_DEFAULTS, analyzeSound, parseAstats, parseSilences, spanLoudness, type AnalyzeOptions, type Silence, type SoundAnalysis, } from "./measure.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ export{AudioError,FFMPEG_LOG,ffmpegOf,runFfmpeg}from"./ffmpeg.js";export{decodeMono,decodePlan,decodeStereo,denoiseFilter,speechFile,speechFilters}from"./decode.js";export{mixToSamples,voiceTracks}from"./mix.js";export{master}from"./master.js";export{fileLoudness}from"./loudness.js";export{ebur128Summary,parseEbur128}from"./ebur128.js";export{ANALYZE_DEFAULTS,analyzeSound,parseAstats,parseSilences,spanLoudness}from"./measure.js";
@@ -0,0 +1,18 @@
1
+ import { type FfmpegOptions } from "./ffmpeg.js";
2
+ /** A file's loudness, LUFS, and how it was measured. */
3
+ export interface FileLoudness {
4
+ lufs: number;
5
+ /**
6
+ * "integrated": BS.1770's gated integrated loudness (ffmpeg's ebur128);
7
+ * "level": the K-weighted level over the whole file, for a sound too
8
+ * short for one 0.4 s block (a click) or all under the gate.
9
+ */
10
+ by: "integrated" | "level";
11
+ }
12
+ /**
13
+ * A file's loudness, cached per file version (its path, size and time):
14
+ * its integrated loudness, else its K-weighted level over its whole
15
+ * length (`by` says which); undefined for a file with no sound.
16
+ */
17
+ export declare function fileLoudness(path: string, o?: FfmpegOptions): Promise<FileLoudness | undefined>;
18
+ //# sourceMappingURL=loudness.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{stat as u}from"node:fs/promises";import{SAMPLE_RATE as d}from"../plan.js";import{soundLevel as l}from"../shape.js";import{decodeStereo as g}from"./decode.js";import{ebur128Summary as p}from"./ebur128.js";import{ffmpegOf as b,runFfmpeg as w}from"./ffmpeg.js";const m=new Map;export async function fileLoudness(t,a={}){const n=await u(t),o=`${t}:${String(n.size)}:${String(n.mtimeMs)}`,r=m.get(o);if(r!==void 0)return r;const i=await b(a),{err:c}=await w(i,["-hide_banner","-nostats","-i",t,"-vn","-sn","-dn","-af","ebur128=framelog=verbose","-f","null","-"]),f=p(c).integrated;let e;if(f!==void 0)e={lufs:f,by:"integrated"};else{const s=l(await g(t,{},{ffmpeg:i}).catch(()=>[]),d);s&&(e=s)}return e&&m.set(o,e),e}
@@ -0,0 +1,42 @@
1
+ import { type MasterTargets } from "../levels.js";
2
+ import { type FfmpegOptions } from "./ffmpeg.js";
3
+ /** A file's loudness as measured: integrated (LUFS), its range (LU) and true peak (dBTP). */
4
+ export interface Measured {
5
+ integrated: number;
6
+ range?: number;
7
+ truePeak?: number;
8
+ }
9
+ /** What the master did and what came out, measured on the file it wrote. */
10
+ export interface Mastered {
11
+ /** The file as written; undefined when the mix is silent. */
12
+ loudness?: Measured;
13
+ /** The mix before the master, measured the same way. */
14
+ before?: Measured;
15
+ /** The gain the master applied, dB. */
16
+ gainDb?: number;
17
+ /**
18
+ * dB the limiter took off the loudest peak: the true peak the gain
19
+ * would have made, less the ceiling (0 where it did not touch it).
20
+ */
21
+ limited?: number;
22
+ /** What it was asked for. */
23
+ target: MasterTargets;
24
+ /** Rounds of gain, limiting and measuring it took. */
25
+ rounds?: number;
26
+ }
27
+ /**
28
+ * Writes an interleaved stereo mix at 48 kHz mastered to `targets.lufs`
29
+ * (default −14) with its true peak at most `targets.truePeak` dBTP
30
+ * (default −3: AAC overshoots by up to about 2 dB on a dense, bright mix,
31
+ * a −2 dBTP master measured −0.2 dBTP as AAC), as 48 kHz PCM WAV, exactly
32
+ * `duration` seconds. The mix's integrated loudness is measured, one gain
33
+ * brings it to the target, a limiter at four times the rate holds the
34
+ * peaks, and what came out is measured: the gain is corrected by what the
35
+ * limiter took until the loudness is within MASTER_MECHANICS.tolerance of
36
+ * the target, at most MASTER_MECHANICS.rounds times. Nothing rides the
37
+ * level over time, so the mix keeps its loudness range. With `lufs` false
38
+ * the mix keeps its own level: only its peaks are limited. The limiter's
39
+ * attack and release are mechanics, not options.
40
+ */
41
+ export declare function master(mix: Float32Array, duration: number, out: string, targets?: MasterTargets, o?: FfmpegOptions): Promise<Mastered>;
42
+ //# sourceMappingURL=master.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{rm as M,writeFile as P}from"node:fs/promises";import{MASTER_DEFAULTS as x,MASTER_MECHANICS as T}from"../levels.js";import{SAMPLE_RATE as v}from"../plan.js";import{ebur128Summary as _}from"./ebur128.js";import{ffmpegOf as R,runFfmpeg as g}from"./ffmpeg.js";const l=v;async function D(e,s,a){const{err:t}=await g(e,["-hide_banner","-nostats",...s,"-af",`${a}${a?",":""}ebur128=peak=true:framelog=quiet`,"-f","null","-"]);return _(t)}const h=e=>({integrated:e.integrated,...e.range===void 0?{}:{range:e.range},...e.truePeak===void 0?{}:{truePeak:e.truePeak}});export async function master(e,s,a,t={...x},k={}){const u=await R(k),d=`${a}.f32`;await P(d,new Uint8Array(e.buffer,e.byteOffset,e.byteLength));try{const c=["-f","f32le","-ar",String(l),"-ac","2","-i",d],p=`aresample=${String(l)}:in_chlayout=stereo:out_chlayout=stereo`,b=`apad=whole_dur=${s.toFixed(6)},atrim=0:${s.toFixed(6)}`,r=await D(u,c,p);if(r.integrated===void 0)return await g(u,["-v","error","-y",...c,"-af",b,"-c:a","pcm_s16le",a]),{target:t};const w=t.truePeak,A=10**(w/20),o=T,E=`aresample=${String(l*o.oversample)},aformat=sample_fmts=dbl:channel_layouts=stereo,alimiter=limit=${A.toFixed(4)}:level=false:attack=${String(o.attack*1e3)}:release=${String(o.release*1e3)},aresample=${String(l)},${b}`,$=async i=>{const{err:F}=await g(u,["-hide_banner","-nostats","-y",...c,"-af",`${p},volume=${i.toFixed(4)}dB:precision=double,${E},ebur128=peak=true:framelog=quiet`,"-c:a","pcm_s16le",a]);return _(F)};let f=t.lufs===!1?0:t.lufs-r.integrated,n=await $(f),m=1;if(t.lufs!==!1)for(;m<o.rounds&&n.integrated!==void 0;){const i=t.lufs-n.integrated;if(Math.abs(i)<=o.tolerance)break;f+=i,n=await $(f),m++}const y=r.truePeak===void 0?void 0:Math.max(0,r.truePeak+f-w),S=i=>Math.round(i*100)/100;return{...n.integrated===void 0?{}:{loudness:h({...n,integrated:n.integrated})},before:h({...r,integrated:r.integrated}),gainDb:S(f),...y===void 0?{}:{limited:S(y)},target:t,rounds:m}}finally{await M(d,{force:!0})}}
@@ -0,0 +1,60 @@
1
+ import { type LoudnessFrame } from "./ebur128.js";
2
+ import { type FfmpegOptions } from "./ffmpeg.js";
3
+ export interface Silence {
4
+ start: number;
5
+ end: number;
6
+ duration: number;
7
+ }
8
+ export interface SoundAnalysis {
9
+ duration: number;
10
+ /** Integrated loudness, LUFS; undefined when the file is silent. */
11
+ integrated?: number;
12
+ /** Loudness range, LU. */
13
+ range?: number;
14
+ /** True peak, dBTP. */
15
+ truePeak?: number;
16
+ /** Highest sample, dBFS. */
17
+ samplePeak?: number;
18
+ /** RMS level over the whole file, dBFS. */
19
+ rms?: number;
20
+ /** Times a sample reached full scale. */
21
+ clipped: number;
22
+ frames: LoudnessFrame[];
23
+ silences: Silence[];
24
+ /** The sound as one channel at `rate`, for measuring it further (its onsets). */
25
+ samples: Float32Array;
26
+ rate: number;
27
+ }
28
+ /** silencedetect's gaps; one still open at the end closes at `duration`. */
29
+ export declare function parseSilences(log: string, duration: number): Silence[];
30
+ /** astats' overall peak, RMS and how often the peak was reached. */
31
+ export declare function parseAstats(log: string): {
32
+ samplePeak?: number;
33
+ rms?: number;
34
+ peakCount: number;
35
+ };
36
+ /**
37
+ * Loudness from `start` to `end`: the energy mean and the highest of the
38
+ * momentary measurements whose 400 ms window centres there.
39
+ */
40
+ export declare function spanLoudness(frames: readonly LoudnessFrame[], start: number, end: number): {
41
+ mean?: number;
42
+ max?: number;
43
+ };
44
+ export interface AnalyzeOptions extends FfmpegOptions {
45
+ /** Below this level is silence, dBFS. Default −50. */
46
+ noise?: number;
47
+ /** Shortest silence reported, seconds. Default 0.5. */
48
+ minSilence?: number;
49
+ /** The rate of the samples it returns, and its duration is counted in. Default 22050 (the media module's onsets). */
50
+ rate?: number;
51
+ }
52
+ /** What `analyzeSound` measures by unless asked otherwise. */
53
+ export declare const ANALYZE_DEFAULTS: {
54
+ readonly noise: -50;
55
+ readonly minSilence: 0.5;
56
+ readonly rate: 22050;
57
+ };
58
+ /** Measures a file's sound with ffmpeg (two passes, at once). */
59
+ export declare function analyzeSound(file: string, o?: AnalyzeOptions): Promise<SoundAnalysis>;
60
+ //# sourceMappingURL=measure.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{parseEbur128 as k,num as m}from"./ebur128.js";import{AudioError as x,ffmpegOf as P,floats as S,runFfmpeg as g}from"./ffmpeg.js";export function parseSilences(r,n){const s=[];let e;for(const a of r.matchAll(/silence_(start|end):\s*(-?[\d.]+)(?:\s*\|\s*silence_duration:\s*([\d.]+))?/g)){const t=m(a[2]);t!==void 0&&(a[1]==="start"?e=Math.max(0,t):e!==void 0&&(s.push({start:e,end:t,duration:t-e}),e=void 0))}return e!==void 0&&n-e>0&&s.push({start:e,end:n,duration:n-e}),s}export function parseAstats(r){const n=r.slice(r.lastIndexOf("Overall")),s=m(/Peak level dB:\s*(-?[\d.]+|-inf)/.exec(n)?.[1]),e=m(/RMS level dB:\s*(-?[\d.]+|-inf)/.exec(n)?.[1]),a=m(/\n[^\n]*Peak count:\s*([\d.]+)/.exec(n)?.[1]);return{...s!==void 0?{samplePeak:s}:{},...e!==void 0?{rms:e}:{},peakCount:a??0}}export function spanLoudness(r,n,s){let e=0,a=0,t=-1/0;for(const o of r){const f=o.t-.2;f<n||f>=s||(e+=10**(o.momentary/10),a++,o.momentary>t&&(t=o.momentary))}if(a===0)return{};const u=10*Math.log10(e/a),i=o=>Math.round(o*10)/10;return u>-70?{mean:i(u),max:i(t)}:{}}export const ANALYZE_DEFAULTS={noise:-50,minSilence:.5,rate:22050};export async function analyzeSound(r,n={}){const s=await P(n),e=n.noise??ANALYZE_DEFAULTS.noise,a=n.minSilence??ANALYZE_DEFAULTS.minSilence,t=n.rate??ANALYZE_DEFAULTS.rate,u=["-i",r,"-map","0:a:0"];let i,o;try{[i,o]=await Promise.all([g(s,["-hide_banner","-nostats",...u,"-af",`ebur128=peak=true:framelog=info,silencedetect=n=${String(e)}dB:d=${String(a)},astats`,"-f","null","-"],!1,1/0),g(s,["-v","error",...u,"-ac","1","-ar",String(t),"-f","f32le","-"],!0)])}catch(l){throw(l instanceof Error?l.message:String(l)).includes("matches no streams")?new x("no-sound",`${r} has no sound.`,{cause:l}):l}const f=S(o.out),p=f.length/t,d=k(i.err),c=parseAstats(i.err),h=c.samplePeak!==void 0&&c.samplePeak>=-.01;return{duration:p,...d.integrated!==void 0?{integrated:d.integrated}:{},...d.range!==void 0?{range:d.range}:{},...d.truePeak!==void 0?{truePeak:d.truePeak}:{},...c.samplePeak!==void 0?{samplePeak:c.samplePeak}:{},...c.rms!==void 0?{rms:c.rms}:{},clipped:h?Math.max(1,c.peakCount):0,frames:d.frames,silences:parseSilences(i.err,p),samples:f,rate:t}}
@@ -0,0 +1,31 @@
1
+ import { type MixPlan, type Stereo } from "../plan.js";
2
+ import { type VoiceGroup } from "../voice.js";
3
+ import { type MixSources } from "./decode.js";
4
+ import type { FfmpegOptions } from "./ffmpeg.js";
5
+ /**
6
+ * Renders a plan to an interleaved stereo Float32 mix at 48 kHz, before
7
+ * mastering, its speech recorded through the plan's settings;
8
+ * `only: "voice"` renders the speech alone, as recorded, for measuring
9
+ * it.
10
+ */
11
+ export declare function mixToSamples(plan: MixPlan, sources: MixSources, o?: FfmpegOptions & {
12
+ only?: "voice";
13
+ }): Promise<Float32Array>;
14
+ /** An output's speech before it is recorded: a track per setting, and what plays as it is. */
15
+ export interface VoiceTracks {
16
+ /** Samples a second. */
17
+ rate: number;
18
+ /** Speech recorded alike, with its clips summed (not yet recorded). */
19
+ groups: (VoiceGroup & {
20
+ dry: Stereo;
21
+ })[];
22
+ /** Speech whose setting is false, summed: played as it is. */
23
+ plain: Stereo;
24
+ }
25
+ /**
26
+ * The speech of a plan summed per setting, before it is recorded: what
27
+ * `mixToSamples` plays through each setting, for measuring and for trying
28
+ * another setting on the same speech.
29
+ */
30
+ export declare function voiceTracks(plan: MixPlan, sources: MixSources, o?: FfmpegOptions): Promise<VoiceTracks>;
31
+ //# sourceMappingURL=mix.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{clipSource as a}from"../decode.js";import{SAMPLE_RATE as d}from"../plan.js";import{renderMix as f}from"../render.js";import{sumSpeech as l,voiceGroups as y}from"../voice.js";import{decodePlan as u}from"./decode.js";const m=d,p=r=>({duration:r.duration,speech:r.speech,footage:[],sfx:[]});export async function mixToSamples(r,c,e={}){const s=await u(e.only==="voice"?p(r):r,c,e),[n,i]=f(r,s,m,e.only===void 0?{}:{only:e.only}),t=new Float32Array(n.length*2);for(let o=0;o<n.length;o++)t[o*2]=n[o]??0,t[o*2+1]=i[o]??0;return t}export async function voiceTracks(r,c,e={}){const s=a(await u(p(r),c,e)),{groups:n,dry:i}=y(r),t=o=>l(o,r.duration,m,s);return{rate:m,groups:n.map(o=>({...o,dry:t(o.clips)})),plain:t(i)}}