@allyhub/sdk 0.1.0-alpha.8 → 0.2.0-next.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 (365) hide show
  1. package/LICENSE.md +241 -0
  2. package/NOTICE +85 -0
  3. package/client.d.ts +45 -1
  4. package/dist/anim.js +2 -75
  5. package/dist/define.d.ts +10 -4
  6. package/dist/define.js +2 -95
  7. package/dist/dom.d.ts +1 -1
  8. package/dist/dom.js +2 -457
  9. package/dist/fit.js +2 -60
  10. package/dist/free.d.ts +18 -0
  11. package/dist/free.js +2 -0
  12. package/dist/index.d.ts +28 -13
  13. package/dist/index.js +2 -11
  14. package/dist/input.d.ts +306 -0
  15. package/dist/input.js +2 -0
  16. package/dist/media.d.ts +3 -6
  17. package/dist/media.js +2 -27
  18. package/dist/messages.d.ts +3 -2
  19. package/dist/messages.js +2 -2
  20. package/dist/module.d.ts +24 -0
  21. package/dist/module.js +2 -0
  22. package/dist/noise.js +2 -233
  23. package/dist/parts.d.ts +98 -22
  24. package/dist/parts.js +2 -414
  25. package/dist/paths.d.ts +1 -1
  26. package/dist/paths.js +2 -720
  27. package/dist/phone.d.ts +26 -0
  28. package/dist/phone.js +2 -0
  29. package/dist/piece.d.ts +106 -35
  30. package/dist/piece.js +2 -38
  31. package/dist/props.d.ts +1 -1
  32. package/dist/props.js +2 -35
  33. package/dist/scenery.d.ts +2 -0
  34. package/dist/scenery.js +2 -0
  35. package/dist/text.js +2 -38
  36. package/dist/written.d.ts +12 -0
  37. package/dist/written.js +2 -0
  38. package/docs/README.md +18 -0
  39. package/docs/batches.md +148 -0
  40. package/docs/contract.md +51 -0
  41. package/docs/defaults.md +703 -0
  42. package/docs/docs.md +148 -0
  43. package/docs/footage.md +249 -0
  44. package/docs/layers.md +317 -0
  45. package/docs/modeling.md +143 -0
  46. package/docs/project.md +265 -0
  47. package/docs/scenery.md +308 -0
  48. package/docs/sheets.md +119 -0
  49. package/docs/slides.md +111 -0
  50. package/docs/sound.md +170 -0
  51. package/docs/speech.md +289 -0
  52. package/docs/video.md +265 -0
  53. package/node_modules/@allyhub-next/audio/LICENSE +241 -0
  54. package/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +52 -0
  55. package/node_modules/@allyhub-next/audio/dist/at-cut.js +2 -0
  56. package/node_modules/@allyhub-next/audio/dist/decode.d.ts +33 -0
  57. package/node_modules/@allyhub-next/audio/dist/decode.js +2 -0
  58. package/node_modules/@allyhub-next/audio/dist/envelope.d.ts +37 -0
  59. package/node_modules/@allyhub-next/audio/dist/envelope.js +2 -0
  60. package/node_modules/@allyhub-next/audio/dist/index.d.ts +17 -0
  61. package/node_modules/@allyhub-next/audio/dist/index.js +2 -0
  62. package/node_modules/@allyhub-next/audio/dist/levels.d.ts +97 -0
  63. package/node_modules/@allyhub-next/audio/dist/levels.js +2 -0
  64. package/node_modules/@allyhub-next/audio/dist/master.d.ts +29 -0
  65. package/node_modules/@allyhub-next/audio/dist/master.js +2 -0
  66. package/node_modules/@allyhub-next/audio/dist/music.d.ts +11 -0
  67. package/node_modules/@allyhub-next/audio/dist/music.js +2 -0
  68. package/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +39 -0
  69. package/node_modules/@allyhub-next/audio/dist/node/decode.js +2 -0
  70. package/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +25 -0
  71. package/node_modules/@allyhub-next/audio/dist/node/ebur128.js +2 -0
  72. package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +31 -0
  73. package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.js +2 -0
  74. package/node_modules/@allyhub-next/audio/dist/node/index.d.ts +8 -0
  75. package/node_modules/@allyhub-next/audio/dist/node/index.js +2 -0
  76. package/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +18 -0
  77. package/node_modules/@allyhub-next/audio/dist/node/loudness.js +2 -0
  78. package/node_modules/@allyhub-next/audio/dist/node/master.d.ts +42 -0
  79. package/node_modules/@allyhub-next/audio/dist/node/master.js +2 -0
  80. package/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +60 -0
  81. package/node_modules/@allyhub-next/audio/dist/node/measure.js +2 -0
  82. package/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +31 -0
  83. package/node_modules/@allyhub-next/audio/dist/node/mix.js +2 -0
  84. package/node_modules/@allyhub-next/audio/dist/plan.d.ts +143 -0
  85. package/node_modules/@allyhub-next/audio/dist/plan.js +2 -0
  86. package/node_modules/@allyhub-next/audio/dist/recorded.d.ts +26 -0
  87. package/node_modules/@allyhub-next/audio/dist/recorded.js +2 -0
  88. package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +47 -0
  89. package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.js +2 -0
  90. package/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +89 -0
  91. package/node_modules/@allyhub-next/audio/dist/recording/chain.js +2 -0
  92. package/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +64 -0
  93. package/node_modules/@allyhub-next/audio/dist/recording/dynamics.js +2 -0
  94. package/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +26 -0
  95. package/node_modules/@allyhub-next/audio/dist/recording/fft.js +2 -0
  96. package/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +42 -0
  97. package/node_modules/@allyhub-next/audio/dist/recording/filters.js +2 -0
  98. package/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +56 -0
  99. package/node_modules/@allyhub-next/audio/dist/recording/fit.js +2 -0
  100. package/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +10 -0
  101. package/node_modules/@allyhub-next/audio/dist/recording/index.js +2 -0
  102. package/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +12 -0
  103. package/node_modules/@allyhub-next/audio/dist/recording/loudness.js +2 -0
  104. package/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +67 -0
  105. package/node_modules/@allyhub-next/audio/dist/recording/measure.js +2 -0
  106. package/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +32 -0
  107. package/node_modules/@allyhub-next/audio/dist/recording/mic.js +2 -0
  108. package/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +27 -0
  109. package/node_modules/@allyhub-next/audio/dist/recording/noise.js +2 -0
  110. package/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +64 -0
  111. package/node_modules/@allyhub-next/audio/dist/recording/presets.js +2 -0
  112. package/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +78 -0
  113. package/node_modules/@allyhub-next/audio/dist/recording/room.js +2 -0
  114. package/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +111 -0
  115. package/node_modules/@allyhub-next/audio/dist/recording/setup.js +2 -0
  116. package/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +3 -0
  117. package/node_modules/@allyhub-next/audio/dist/recording/vec.js +2 -0
  118. package/node_modules/@allyhub-next/audio/dist/render.d.ts +26 -0
  119. package/node_modules/@allyhub-next/audio/dist/render.js +2 -0
  120. package/node_modules/@allyhub-next/audio/dist/sfx.d.ts +10 -0
  121. package/node_modules/@allyhub-next/audio/dist/sfx.js +2 -0
  122. package/node_modules/@allyhub-next/audio/dist/shape.d.ts +118 -0
  123. package/node_modules/@allyhub-next/audio/dist/shape.js +2 -0
  124. package/node_modules/@allyhub-next/audio/dist/voice.d.ts +45 -0
  125. package/node_modules/@allyhub-next/audio/dist/voice.js +2 -0
  126. package/node_modules/@allyhub-next/audio/package.json +17 -0
  127. package/node_modules/@allyhub-next/formats/LICENSE +241 -0
  128. package/node_modules/@allyhub-next/formats/dist/data/comments.d.ts +94 -0
  129. package/node_modules/@allyhub-next/formats/dist/data/comments.js +2 -0
  130. package/node_modules/@allyhub-next/formats/dist/data/config.d.ts +10 -0
  131. package/node_modules/@allyhub-next/formats/dist/data/config.js +2 -0
  132. package/node_modules/@allyhub-next/formats/dist/data/edits.d.ts +28 -0
  133. package/node_modules/@allyhub-next/formats/dist/data/edits.js +2 -0
  134. package/node_modules/@allyhub-next/formats/dist/data/elements.d.ts +6 -0
  135. package/node_modules/@allyhub-next/formats/dist/data/elements.js +2 -0
  136. package/node_modules/@allyhub-next/formats/dist/data/faces.d.ts +38 -0
  137. package/node_modules/@allyhub-next/formats/dist/data/faces.js +2 -0
  138. package/node_modules/@allyhub-next/formats/dist/data/file.d.ts +11 -0
  139. package/node_modules/@allyhub-next/formats/dist/data/file.js +2 -0
  140. package/node_modules/@allyhub-next/formats/dist/data/gen.d.ts +31 -0
  141. package/node_modules/@allyhub-next/formats/dist/data/gen.js +2 -0
  142. package/node_modules/@allyhub-next/formats/dist/data/messages.d.ts +34 -0
  143. package/node_modules/@allyhub-next/formats/dist/data/messages.js +2 -0
  144. package/node_modules/@allyhub-next/formats/dist/data/reference.d.ts +676 -0
  145. package/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
  146. package/node_modules/@allyhub-next/formats/dist/data/script.d.ts +37 -0
  147. package/node_modules/@allyhub-next/formats/dist/data/script.js +2 -0
  148. package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +214 -0
  149. package/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
  150. package/node_modules/@allyhub-next/formats/dist/data/words.d.ts +25 -0
  151. package/node_modules/@allyhub-next/formats/dist/data/words.js +2 -0
  152. package/node_modules/@allyhub-next/formats/dist/index.d.ts +16 -0
  153. package/node_modules/@allyhub-next/formats/dist/index.js +2 -0
  154. package/node_modules/@allyhub-next/formats/dist/items.d.ts +94 -0
  155. package/node_modules/@allyhub-next/formats/dist/items.js +2 -0
  156. package/node_modules/@allyhub-next/formats/dist/layout.d.ts +50 -0
  157. package/node_modules/@allyhub-next/formats/dist/layout.js +5 -0
  158. package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +301 -0
  159. package/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
  160. package/node_modules/@allyhub-next/formats/package.json +14 -0
  161. package/node_modules/@allyhub-next/protocol/LICENSE +241 -0
  162. package/node_modules/@allyhub-next/protocol/dist/app.d.ts +98 -0
  163. package/node_modules/@allyhub-next/protocol/dist/app.js +2 -0
  164. package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +116 -0
  165. package/node_modules/@allyhub-next/protocol/dist/auth.js +2 -0
  166. package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +59 -0
  167. package/node_modules/@allyhub-next/protocol/dist/cli.js +2 -0
  168. package/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +274 -0
  169. package/node_modules/@allyhub-next/protocol/dist/cloud.js +2 -0
  170. package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +405 -0
  171. package/node_modules/@allyhub-next/protocol/dist/editor.js +2 -0
  172. package/node_modules/@allyhub-next/protocol/dist/files.d.ts +101 -0
  173. package/node_modules/@allyhub-next/protocol/dist/files.js +2 -0
  174. package/node_modules/@allyhub-next/protocol/dist/index.d.ts +12 -0
  175. package/node_modules/@allyhub-next/protocol/dist/index.js +2 -0
  176. package/node_modules/@allyhub-next/protocol/dist/jsonrpc.d.ts +83 -0
  177. package/node_modules/@allyhub-next/protocol/dist/jsonrpc.js +2 -0
  178. package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +53 -0
  179. package/node_modules/@allyhub-next/protocol/dist/registry.js +2 -0
  180. package/node_modules/@allyhub-next/protocol/dist/runtimes.d.ts +93 -0
  181. package/node_modules/@allyhub-next/protocol/dist/runtimes.js +2 -0
  182. package/node_modules/@allyhub-next/protocol/dist/teams.d.ts +67 -0
  183. package/node_modules/@allyhub-next/protocol/dist/teams.js +2 -0
  184. package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +345 -0
  185. package/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
  186. package/node_modules/@allyhub-next/protocol/package.json +13 -0
  187. package/node_modules/@allyhub-next/runtimes/LICENSE +241 -0
  188. package/node_modules/@allyhub-next/runtimes/dist/bundled.d.ts +10 -0
  189. package/node_modules/@allyhub-next/runtimes/dist/bundled.js +2 -0
  190. package/node_modules/@allyhub-next/runtimes/dist/download.d.ts +15 -0
  191. package/node_modules/@allyhub-next/runtimes/dist/download.js +2 -0
  192. package/node_modules/@allyhub-next/runtimes/dist/errors.d.ts +16 -0
  193. package/node_modules/@allyhub-next/runtimes/dist/errors.js +2 -0
  194. package/node_modules/@allyhub-next/runtimes/dist/home.d.ts +2 -0
  195. package/node_modules/@allyhub-next/runtimes/dist/home.js +2 -0
  196. package/node_modules/@allyhub-next/runtimes/dist/index.d.ts +9 -0
  197. package/node_modules/@allyhub-next/runtimes/dist/index.js +2 -0
  198. package/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +6 -0
  199. package/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
  200. package/node_modules/@allyhub-next/runtimes/dist/manifest.d.ts +3 -0
  201. package/node_modules/@allyhub-next/runtimes/dist/manifest.js +2 -0
  202. package/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +63 -0
  203. package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +3 -0
  204. package/node_modules/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
  205. package/node_modules/@allyhub-next/runtimes/dist/unpack.js +2 -0
  206. package/node_modules/@allyhub-next/runtimes/manifest.json +395 -0
  207. package/node_modules/@allyhub-next/runtimes/package.json +14 -0
  208. package/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +153 -0
  209. package/node_modules/@allyhub-next/scenery/LICENSE +241 -0
  210. package/node_modules/@allyhub-next/scenery/NOTICE +42 -0
  211. package/node_modules/@allyhub-next/scenery/dist/aim.d.ts +55 -0
  212. package/node_modules/@allyhub-next/scenery/dist/aim.js +2 -0
  213. package/node_modules/@allyhub-next/scenery/dist/bake.d.ts +203 -0
  214. package/node_modules/@allyhub-next/scenery/dist/bake.js +2 -0
  215. package/node_modules/@allyhub-next/scenery/dist/camera.d.ts +150 -0
  216. package/node_modules/@allyhub-next/scenery/dist/camera.js +2 -0
  217. package/node_modules/@allyhub-next/scenery/dist/curve.d.ts +40 -0
  218. package/node_modules/@allyhub-next/scenery/dist/curve.js +2 -0
  219. package/node_modules/@allyhub-next/scenery/dist/define.d.ts +164 -0
  220. package/node_modules/@allyhub-next/scenery/dist/define.js +2 -0
  221. package/node_modules/@allyhub-next/scenery/dist/fit.d.ts +64 -0
  222. package/node_modules/@allyhub-next/scenery/dist/fit.js +2 -0
  223. package/node_modules/@allyhub-next/scenery/dist/glass.d.ts +34 -0
  224. package/node_modules/@allyhub-next/scenery/dist/glass.js +2 -0
  225. package/node_modules/@allyhub-next/scenery/dist/handheld.d.ts +184 -0
  226. package/node_modules/@allyhub-next/scenery/dist/handheld.js +2 -0
  227. package/node_modules/@allyhub-next/scenery/dist/hull.d.ts +23 -0
  228. package/node_modules/@allyhub-next/scenery/dist/hull.js +2 -0
  229. package/node_modules/@allyhub-next/scenery/dist/index.d.ts +22 -0
  230. package/node_modules/@allyhub-next/scenery/dist/index.js +2 -0
  231. package/node_modules/@allyhub-next/scenery/dist/lens.d.ts +48 -0
  232. package/node_modules/@allyhub-next/scenery/dist/lens.js +2 -0
  233. package/node_modules/@allyhub-next/scenery/dist/moire.d.ts +136 -0
  234. package/node_modules/@allyhub-next/scenery/dist/moire.js +93 -0
  235. package/node_modules/@allyhub-next/scenery/dist/motion.d.ts +48 -0
  236. package/node_modules/@allyhub-next/scenery/dist/motion.js +2 -0
  237. package/node_modules/@allyhub-next/scenery/dist/move.d.ts +260 -0
  238. package/node_modules/@allyhub-next/scenery/dist/move.js +2 -0
  239. package/node_modules/@allyhub-next/scenery/dist/noise.d.ts +41 -0
  240. package/node_modules/@allyhub-next/scenery/dist/noise.js +2 -0
  241. package/node_modules/@allyhub-next/scenery/dist/phone.d.ts +34 -0
  242. package/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
  243. package/node_modules/@allyhub-next/scenery/dist/report.d.ts +677 -0
  244. package/node_modules/@allyhub-next/scenery/dist/report.js +2 -0
  245. package/node_modules/@allyhub-next/scenery/dist/screen-focus.d.ts +55 -0
  246. package/node_modules/@allyhub-next/scenery/dist/screen-focus.js +2 -0
  247. package/node_modules/@allyhub-next/scenery/dist/screen.d.ts +71 -0
  248. package/node_modules/@allyhub-next/scenery/dist/screen.js +2 -0
  249. package/node_modules/@allyhub-next/scenery/dist/solve.d.ts +82 -0
  250. package/node_modules/@allyhub-next/scenery/dist/solve.js +2 -0
  251. package/node_modules/@allyhub-next/scenery/dist/timing.d.ts +26 -0
  252. package/node_modules/@allyhub-next/scenery/dist/timing.js +2 -0
  253. package/node_modules/@allyhub-next/scenery/dist/vec.d.ts +19 -0
  254. package/node_modules/@allyhub-next/scenery/dist/vec.js +2 -0
  255. package/node_modules/@allyhub-next/scenery/package.json +13 -0
  256. package/node_modules/@allyhub-next/video-core/LICENSE +241 -0
  257. package/node_modules/@allyhub-next/video-core/dist/anchors.d.ts +164 -0
  258. package/node_modules/@allyhub-next/video-core/dist/anchors.js +2 -0
  259. package/node_modules/@allyhub-next/video-core/dist/audio-types.d.ts +148 -0
  260. package/node_modules/@allyhub-next/video-core/dist/audio-types.js +2 -0
  261. package/node_modules/@allyhub-next/video-core/dist/backdrop.d.ts +87 -0
  262. package/node_modules/@allyhub-next/video-core/dist/backdrop.js +2 -0
  263. package/node_modules/@allyhub-next/video-core/dist/captions.d.ts +122 -0
  264. package/node_modules/@allyhub-next/video-core/dist/captions.js +11 -0
  265. package/node_modules/@allyhub-next/video-core/dist/console.d.ts +91 -0
  266. package/node_modules/@allyhub-next/video-core/dist/console.js +2 -0
  267. package/node_modules/@allyhub-next/video-core/dist/contrast.d.ts +98 -0
  268. package/node_modules/@allyhub-next/video-core/dist/contrast.js +2 -0
  269. package/node_modules/@allyhub-next/video-core/dist/cut-report.d.ts +77 -0
  270. package/node_modules/@allyhub-next/video-core/dist/cut-report.js +2 -0
  271. package/node_modules/@allyhub-next/video-core/dist/edit.d.ts +77 -0
  272. package/node_modules/@allyhub-next/video-core/dist/edit.js +13 -0
  273. package/node_modules/@allyhub-next/video-core/dist/edits.d.ts +163 -0
  274. package/node_modules/@allyhub-next/video-core/dist/edits.js +2 -0
  275. package/node_modules/@allyhub-next/video-core/dist/export.d.ts +96 -0
  276. package/node_modules/@allyhub-next/video-core/dist/export.js +2 -0
  277. package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +965 -0
  278. package/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
  279. package/node_modules/@allyhub-next/video-core/dist/footage-motion.d.ts +168 -0
  280. package/node_modules/@allyhub-next/video-core/dist/footage-motion.js +2 -0
  281. package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +240 -0
  282. package/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
  283. package/node_modules/@allyhub-next/video-core/dist/gen.d.ts +37 -0
  284. package/node_modules/@allyhub-next/video-core/dist/gen.js +2 -0
  285. package/node_modules/@allyhub-next/video-core/dist/index.d.ts +40 -0
  286. package/node_modules/@allyhub-next/video-core/dist/index.js +2 -0
  287. package/node_modules/@allyhub-next/video-core/dist/look.d.ts +66 -0
  288. package/node_modules/@allyhub-next/video-core/dist/look.js +2 -0
  289. package/node_modules/@allyhub-next/video-core/dist/marks.d.ts +34 -0
  290. package/node_modules/@allyhub-next/video-core/dist/marks.js +2 -0
  291. package/node_modules/@allyhub-next/video-core/dist/matrix.d.ts +289 -0
  292. package/node_modules/@allyhub-next/video-core/dist/matrix.js +2 -0
  293. package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +465 -0
  294. package/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
  295. package/node_modules/@allyhub-next/video-core/dist/media.d.ts +226 -0
  296. package/node_modules/@allyhub-next/video-core/dist/media.js +2 -0
  297. package/node_modules/@allyhub-next/video-core/dist/messages.d.ts +88 -0
  298. package/node_modules/@allyhub-next/video-core/dist/messages.js +2 -0
  299. package/node_modules/@allyhub-next/video-core/dist/motion.d.ts +56 -0
  300. package/node_modules/@allyhub-next/video-core/dist/motion.js +2 -0
  301. package/node_modules/@allyhub-next/video-core/dist/music.d.ts +110 -0
  302. package/node_modules/@allyhub-next/video-core/dist/music.js +2 -0
  303. package/node_modules/@allyhub-next/video-core/dist/piece.d.ts +1146 -0
  304. package/node_modules/@allyhub-next/video-core/dist/piece.js +2 -0
  305. package/node_modules/@allyhub-next/video-core/dist/placement.d.ts +37 -0
  306. package/node_modules/@allyhub-next/video-core/dist/placement.js +2 -0
  307. package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +262 -0
  308. package/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
  309. package/node_modules/@allyhub-next/video-core/dist/render-types.d.ts +49 -0
  310. package/node_modules/@allyhub-next/video-core/dist/render-types.js +2 -0
  311. package/node_modules/@allyhub-next/video-core/dist/schema.d.ts +352 -0
  312. package/node_modules/@allyhub-next/video-core/dist/schema.js +2 -0
  313. package/node_modules/@allyhub-next/video-core/dist/script-edit.d.ts +176 -0
  314. package/node_modules/@allyhub-next/video-core/dist/script-edit.js +2 -0
  315. package/node_modules/@allyhub-next/video-core/dist/script.d.ts +67 -0
  316. package/node_modules/@allyhub-next/video-core/dist/script.js +2 -0
  317. package/node_modules/@allyhub-next/video-core/dist/seams.d.ts +214 -0
  318. package/node_modules/@allyhub-next/video-core/dist/seams.js +2 -0
  319. package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +37 -0
  320. package/node_modules/@allyhub-next/video-core/dist/slides.js +2 -0
  321. package/node_modules/@allyhub-next/video-core/dist/sound-under.d.ts +72 -0
  322. package/node_modules/@allyhub-next/video-core/dist/sound-under.js +2 -0
  323. package/node_modules/@allyhub-next/video-core/dist/speech.d.ts +83 -0
  324. package/node_modules/@allyhub-next/video-core/dist/speech.js +5 -0
  325. package/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +616 -0
  326. package/node_modules/@allyhub-next/video-core/dist/timeline.js +2 -0
  327. package/node_modules/@allyhub-next/video-core/dist/timing.d.ts +88 -0
  328. package/node_modules/@allyhub-next/video-core/dist/timing.js +2 -0
  329. package/node_modules/@allyhub-next/video-core/dist/transcript.d.ts +288 -0
  330. package/node_modules/@allyhub-next/video-core/dist/transcript.js +2 -0
  331. package/node_modules/@allyhub-next/video-core/dist/transition.d.ts +289 -0
  332. package/node_modules/@allyhub-next/video-core/dist/transition.js +2 -0
  333. package/node_modules/@allyhub-next/video-core/dist/voice.d.ts +175 -0
  334. package/node_modules/@allyhub-next/video-core/dist/voice.js +2 -0
  335. package/node_modules/@allyhub-next/video-core/dist/words.d.ts +128 -0
  336. package/node_modules/@allyhub-next/video-core/dist/words.js +2 -0
  337. package/node_modules/@allyhub-next/video-core/package.json +14 -0
  338. package/package.json +52 -41
  339. package/README.md +0 -17
  340. package/dist/anim.d.ts.map +0 -1
  341. package/dist/anim.js.map +0 -1
  342. package/dist/define.d.ts.map +0 -1
  343. package/dist/define.js.map +0 -1
  344. package/dist/dom.d.ts.map +0 -1
  345. package/dist/dom.js.map +0 -1
  346. package/dist/fit.d.ts.map +0 -1
  347. package/dist/fit.js.map +0 -1
  348. package/dist/index.d.ts.map +0 -1
  349. package/dist/index.js.map +0 -1
  350. package/dist/media.d.ts.map +0 -1
  351. package/dist/media.js.map +0 -1
  352. package/dist/messages.d.ts.map +0 -1
  353. package/dist/messages.js.map +0 -1
  354. package/dist/noise.d.ts.map +0 -1
  355. package/dist/noise.js.map +0 -1
  356. package/dist/parts.d.ts.map +0 -1
  357. package/dist/parts.js.map +0 -1
  358. package/dist/paths.d.ts.map +0 -1
  359. package/dist/paths.js.map +0 -1
  360. package/dist/piece.d.ts.map +0 -1
  361. package/dist/piece.js.map +0 -1
  362. package/dist/props.d.ts.map +0 -1
  363. package/dist/props.js.map +0 -1
  364. package/dist/text.d.ts.map +0 -1
  365. package/dist/text.js.map +0 -1
@@ -0,0 +1,64 @@
1
+ /** A compressor's settings; levels in dBFS. */
2
+ export interface CompressorOptions {
3
+ /** Where it starts to act, dBFS. */
4
+ threshold: number;
5
+ /** Input dB over the threshold per output dB. */
6
+ ratio: number;
7
+ /** The knee's width, dB (0: hard). */
8
+ knee: number;
9
+ /** Seconds to go down, and to come back. */
10
+ attack: number;
11
+ release: number;
12
+ /** The level's detector: a window's RMS, seconds (0: the peak). */
13
+ window: number;
14
+ }
15
+ /** The gain reduction (dB, ≤ 0) of the gain computer for an input level. */
16
+ export declare function gainComputer(x: number, o: Pick<CompressorOptions, "threshold" | "ratio" | "knee">): number;
17
+ /** Compresses the channels in place. */
18
+ export declare function compress(channels: readonly Float32Array[], o: CompressorOptions, rate: number): void;
19
+ /** A de-esser's settings: the band it listens to, and how it presses it down. */
20
+ export interface DeesserOptions {
21
+ /** Where sibilance starts, Hz: the band over it is what is pressed down. */
22
+ hz: number;
23
+ /** The band's level where it starts, dBFS, and its ratio. */
24
+ threshold: number;
25
+ ratio: number;
26
+ attack: number;
27
+ release: number;
28
+ }
29
+ /**
30
+ * Presses the highs down where they are loud: split at `hz` by a
31
+ * fourth-order Linkwitz–Riley crossover (two Butterworth sections each
32
+ * way, whose sum is an all-pass: flat when nothing is pressed), the band
33
+ * over it given the gain its own level asks for.
34
+ */
35
+ export declare function deess(channels: readonly Float32Array[], o: DeesserOptions, rate: number): void;
36
+ /** A phone's automatic gain control. */
37
+ export interface AgcOptions {
38
+ /** The level it rides toward, dBFS (the speech's level). */
39
+ target: number;
40
+ /** The most it lifts, dB; it never lowers more than `target` asks. */
41
+ most: number;
42
+ /** Seconds for the gain to come down, and to rise. */
43
+ attack: number;
44
+ release: number;
45
+ /**
46
+ * The speech's level it follows: the mean power of 50 ms windows over
47
+ * this many seconds, s.
48
+ */
49
+ window: number;
50
+ /**
51
+ * Under this level (dBFS) a window is not speech: the level it follows,
52
+ * and so its gain, hold through it (no gate: undefined, and a pause
53
+ * lifts the room).
54
+ */
55
+ gate?: number;
56
+ }
57
+ /**
58
+ * Rides the level in place toward `target`, as a device's automatic gain
59
+ * does: it follows the speech's level over `window` seconds (holding it
60
+ * through what is under `gate`) and sets the gain that brings that level
61
+ * to the target, at most `most` up, moving at `attack` and `release`.
62
+ */
63
+ export declare function agc(channels: readonly Float32Array[], o: AgcOptions, rate: number): void;
64
+ //# sourceMappingURL=dynamics.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{biquad as w,fromDb as m,runBiquads as x}from"./filters.js";export function gainComputer(a,t){const s=a-t.threshold,r=t.knee;let l;return 2*s<-r?l=a:r>0&&2*Math.abs(s)<=r?l=a+(1/t.ratio-1)*(s+r/2)**2/(2*r):l=t.threshold+s/t.ratio,l-a}function u(a,t,s){const r=a[0]?.length??0,l=new Float32Array(r);if(t<=0){for(let o=0;o<r;o++){let n=0;for(const c of a)n=Math.max(n,Math.abs(c[o]??0));l[o]=20*Math.log10(Math.max(n,1e-9))}return l}const f=Math.exp(-1/(t*s));let e=0;for(let o=0;o<r;o++){let n=0;for(const c of a)n=Math.max(n,(c[o]??0)**2);e=f*e+(1-f)*n,l[o]=10*Math.log10(Math.max(e,1e-18))}return l}function M(a,t,s,r){const l=t>0?Math.exp(-1/(t*r)):0,f=s>0?Math.exp(-1/(s*r)):0,e=new Float32Array(a.length);let o=0;for(let n=0;n<a.length;n++){const c=a[n]??0,h=c<o?l:f;o=h*o+(1-h)*c,e[n]=o}return e}export function compress(a,t,s){const r=u(a,t.window,s),l=new Float32Array(r.length);for(let e=0;e<r.length;e++)l[e]=gainComputer(r[e]??-180,t);const f=M(l,t.attack,t.release,s);for(const e of a)for(let o=0;o<e.length;o++)e[o]=(e[o]??0)*m(f[o]??0)}export function deess(a,t,s){const r=w({type:"highpass",hz:t.hz},s),l=w({type:"lowpass",hz:t.hz},s),f=h=>{const p=Float32Array.from(h);x(p,[r,r]);const i=Float32Array.from(h);return x(i,[l,l]),{low:i,high:p}},e=a.map(f),o=u(e.map(h=>h.high),.005,s),n=new Float32Array(o.length);for(let h=0;h<o.length;h++)n[h]=gainComputer(o[h]??-180,{...t,knee:6});const c=M(n,t.attack,t.release,s);a.forEach((h,p)=>{const i=e[p];if(i)for(let g=0;g<h.length;g++)h[g]=(i.low[g]??0)+(i.high[g]??0)*m(c[g]??0)})}export function agc(a,t,s){const r=u(a,.05,s),l=new Float32Array(r.length),f=Math.exp(-1/(Math.max(t.window,.001)*s));let e=-1;for(let n=0;n<r.length;n++){const c=r[n]??-180;if(t.gate===void 0||c>=t.gate){const h=10**(c/10);e=e<0?h:f*e+(1-f)*h}l[n]=e<0?0:Math.min(t.most,t.target-10*Math.log10(Math.max(e,1e-18)))}const o=M(l,t.attack,t.release,s);for(const n of a)for(let c=0;c<n.length;c++)n[c]=(n[c]??0)*m(o[c]??0)}
@@ -0,0 +1,26 @@
1
+ /** The least power of two at or above n. */
2
+ export declare function nextPow2(n: number): number;
3
+ /**
4
+ * In place: the discrete Fourier transform of re + i·im (`inverse`: its
5
+ * inverse, divided by n). n is a power of two.
6
+ */
7
+ export declare function fft(re: Float64Array, im: Float64Array, inverse?: boolean): void;
8
+ /**
9
+ * `x` convolved with `h`, as long as `x` (what rings on past its end is
10
+ * cut): overlap-add in blocks, two real signals per complex transform.
11
+ */
12
+ export declare function convolve(x: Float32Array, h: Float32Array | Float64Array): Float32Array;
13
+ /**
14
+ * The magnitude of a filter's response at `n / 2 + 1` frequencies from 0
15
+ * to half the rate, of an impulse response `h` (n a power of two ≥ its
16
+ * length).
17
+ */
18
+ export declare function magnitudes(h: Float32Array | Float64Array, n: number): Float64Array;
19
+ /**
20
+ * A minimum-phase impulse response of `taps` taps whose magnitude is
21
+ * `gain(frequency in Hz)` (linear) at `rate`: by the real cepstrum folded
22
+ * onto positive quefrencies (the homomorphic method), its end faded by a
23
+ * half Hann window.
24
+ */
25
+ export declare function minimumPhase(gain: (hz: number) => number, rate: number, taps?: number): Float64Array;
26
+ //# sourceMappingURL=fft.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ const b=new Map;function P(e){let o=b.get(e);if(!o){const a=new Float64Array(e/2),n=new Float64Array(e/2);for(let s=0;s<e/2;s++)a[s]=Math.cos(2*Math.PI*s/e),n[s]=-Math.sin(2*Math.PI*s/e);o={cos:a,sin:n},b.set(e,o)}return o}export function nextPow2(e){let o=1;for(;o<e;)o*=2;return o}export function fft(e,o,a=!1){const n=e.length;if(n<=1)return;for(let c=1,t=0;c<n;c++){let r=n>>1;for(;t&r;r>>=1)t^=r;if(t^=r,c<t){const i=e[c]??0;e[c]=e[t]??0,e[t]=i;const l=o[c]??0;o[c]=o[t]??0,o[t]=l}}const{cos:s,sin:f}=P(n),g=a?-1:1;for(let c=2;c<=n;c<<=1){const t=n/c,r=c/2;for(let i=0;i<n;i+=c)for(let l=0;l<r;l++){const h=s[l*t]??1,u=(f[l*t]??0)*g,w=i+l,M=w+r,y=e[M]??0,A=o[M]??0,F=y*h-A*u,p=y*u+A*h,d=e[w]??0,k=o[w]??0;e[M]=d-F,o[M]=k-p,e[w]=d+F,o[w]=k+p}}if(a)for(let c=0;c<n;c++)e[c]=(e[c]??0)/n,o[c]=(o[c]??0)/n}export function convolve(e,o){const a=new Float32Array(e.length);if(o.length===0||e.length===0)return a;if(o.length<=64){for(let r=0;r<e.length;r++){let i=0;const l=Math.min(o.length,r+1);for(let h=0;h<l;h++)i+=(o[h]??0)*(e[r-h]??0);a[r]=i}return a}const n=nextPow2(2*o.length),s=n-o.length+1,f=new Float64Array(n),g=new Float64Array(n);for(let r=0;r<o.length;r++)f[r]=o[r]??0;fft(f,g);const c=new Float64Array(n),t=new Float64Array(n);for(let r=0;r<e.length;r+=2*s){c.fill(0),t.fill(0);const i=r+s;for(let l=0;l<s;l++)c[l]=e[r+l]??0,t[l]=e[i+l]??0;fft(c,t);for(let l=0;l<n;l++){const h=c[l]??0,u=t[l]??0,w=f[l]??0,M=g[l]??0;c[l]=h*w-u*M,t[l]=h*M+u*w}fft(c,t,!0);for(let l=0;l<n;l++){const h=r+l;h<a.length&&(a[h]=(a[h]??0)+(c[l]??0));const u=i+l;u<a.length&&(a[u]=(a[u]??0)+(t[l]??0))}}return a}export function magnitudes(e,o){const a=new Float64Array(o),n=new Float64Array(o);for(let f=0;f<Math.min(o,e.length);f++)a[f]=e[f]??0;fft(a,n);const s=new Float64Array(o/2+1);for(let f=0;f<=o/2;f++)s[f]=Math.hypot(a[f]??0,n[f]??0);return s}export function minimumPhase(e,o,a=4096){const n=nextPow2(a*4),s=new Float64Array(n),f=new Float64Array(n);for(let t=0;t<=n/2;t++){const r=Math.max(e(t*o/n),1e-6);s[t]=Math.log(r),t>0&&t<n/2&&(s[n-t]=s[t]??0)}fft(s,f,!0);for(let t=1;t<n/2;t++)s[t]=2*(s[t]??0),f[t]=0;f[0]=0,f[n/2]=0;for(let t=n/2+1;t<n;t++)s[t]=0,f[t]=0;fft(s,f);for(let t=0;t<n;t++){const r=Math.exp(s[t]??0),i=f[t]??0;s[t]=r*Math.cos(i),f[t]=r*Math.sin(i)}fft(s,f,!0);const g=new Float64Array(a),c=Math.max(1,Math.floor(a/4));for(let t=0;t<a;t++){const r=t-(a-c),i=r>0?.5*(1+Math.cos(Math.PI*r/c)):1;g[t]=(s[t]??0)*i}return g}
@@ -0,0 +1,42 @@
1
+ /** A biquad's coefficients, a0 divided out. */
2
+ export interface Biquad {
3
+ b0: number;
4
+ b1: number;
5
+ b2: number;
6
+ a1: number;
7
+ a2: number;
8
+ }
9
+ /** One band of an equalizer or a pass, as the cookbook names them. */
10
+ export type FilterSpec = {
11
+ type: "highpass" | "lowpass";
12
+ hz: number;
13
+ q?: number;
14
+ } | {
15
+ type: "peak";
16
+ hz: number;
17
+ db: number;
18
+ q?: number;
19
+ } | {
20
+ type: "lowshelf" | "highshelf";
21
+ hz: number;
22
+ db: number;
23
+ slope?: number;
24
+ } | {
25
+ type: "bandpass";
26
+ hz: number;
27
+ q?: number;
28
+ };
29
+ /** A Butterworth's Q: the flattest pass band. */
30
+ export declare const BUTTERWORTH_Q: number;
31
+ /** A cookbook biquad at `rate`. */
32
+ export declare function biquad(spec: FilterSpec, rate: number): Biquad;
33
+ /** A biquad's gain at `hz` (linear), at `rate`. */
34
+ export declare function biquadGain(b: Biquad, hz: number, rate: number): number;
35
+ /** Filters `x` in place through the biquads in turn. */
36
+ export declare function runBiquads(x: Float32Array, chain: readonly Biquad[]): void;
37
+ /** The gain of a chain of filter specs at `hz` (linear). */
38
+ export declare function chainGain(specs: readonly FilterSpec[], hz: number, rate: number): number;
39
+ /** dB of a linear gain, and the way back. */
40
+ export declare const toDb: (g: number) => number;
41
+ export declare const fromDb: (db: number) => number;
42
+ //# sourceMappingURL=filters.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 BUTTERWORTH_Q=Math.SQRT1_2;export function biquad(o,b){const h=Math.min(Math.max(o.hz,1),b*.49),c=2*Math.PI*h/b,s=Math.cos(c),e=Math.sin(c);let a,n,r,l,f,p;switch(o.type){case"lowpass":case"highpass":case"bandpass":{const t=o.q??BUTTERWORTH_Q,i=e/(2*t);l=1+i,f=-2*s,p=1-i,o.type==="lowpass"?(a=(1-s)/2,n=1-s,r=(1-s)/2):o.type==="highpass"?(a=(1+s)/2,n=-(1+s),r=(1+s)/2):(a=i,n=0,r=-i);break}case"peak":{const t=10**(o.db/40),i=e/(2*(o.q??1));a=1+i*t,n=-2*s,r=1-i*t,l=1+i/t,f=-2*s,p=1-i/t;break}case"lowshelf":case"highshelf":{const t=10**(o.db/40),i=o.slope??1,u=e/2*Math.sqrt((t+1/t)*(1/i-1)+2),M=2*Math.sqrt(t)*u;o.type==="lowshelf"?(a=t*(t+1-(t-1)*s+M),n=2*t*(t-1-(t+1)*s),r=t*(t+1-(t-1)*s-M),l=t+1+(t-1)*s+M,f=-2*(t-1+(t+1)*s),p=t+1+(t-1)*s-M):(a=t*(t+1+(t-1)*s+M),n=-2*t*(t-1+(t+1)*s),r=t*(t+1+(t-1)*s-M),l=t+1-(t-1)*s+M,f=2*(t-1-(t+1)*s),p=t+1-(t-1)*s-M);break}}return{b0:a/l,b1:n/l,b2:r/l,a1:f/l,a2:p/l}}export function biquadGain(o,b,h){const c=2*Math.PI*b/h,s=Math.cos(c),e=Math.sin(c),a=Math.cos(2*c),n=Math.sin(2*c),r=o.b0+o.b1*s+o.b2*a,l=-(o.b1*e+o.b2*n),f=1+o.a1*s+o.a2*a,p=-(o.a1*e+o.a2*n);return Math.hypot(r,l)/Math.hypot(f,p)}export function runBiquads(o,b){for(const h of b){let c=0,s=0;for(let e=0;e<o.length;e++){const a=o[e]??0,n=h.b0*a+c;c=h.b1*a-h.a1*n+s,s=h.b2*a-h.a2*n,o[e]=n}}}export function chainGain(o,b,h){let c=1;for(const s of o)c*=biquadGain(biquad(s,h),b,h);return c}export const toDb=o=>20*Math.log10(Math.max(o,1e-12)),fromDb=o=>10**(o/20);
@@ -0,0 +1,56 @@
1
+ import { type ResolvedVoice } from "./chain.js";
2
+ import { type RecordingMeasureOptions, type RecordingMeasurement } from "./measure.js";
3
+ import type { VoiceOptions, VoiceSetting } from "./setup.js";
4
+ /** How a setting is fitted. */
5
+ export interface VoiceFitOptions {
6
+ /** Rounds of recording, measuring and moving. */
7
+ rounds: number;
8
+ /** The response moves at most this many dB at any band. */
9
+ most: number;
10
+ /** The bands the response is fitted over, Hz. */
11
+ from: number;
12
+ to: number;
13
+ /** The room's reverberation time stays within these, s. */
14
+ rt60: readonly [number, number];
15
+ /** How both voices are measured. */
16
+ measure: RecordingMeasureOptions;
17
+ }
18
+ export declare const VOICE_FIT_DEFAULTS: VoiceFitOptions;
19
+ /** How far a voice's measurement is from the reference's. */
20
+ export interface FitDistance {
21
+ /** RMS of the spectrum's difference over the fitted bands, dB. */
22
+ spectrum: number;
23
+ /** The decay's difference (piece minus reference), s; absent where either is missing. */
24
+ decay?: number;
25
+ /** The room tone's level under the voice, piece minus reference, LU. */
26
+ tone?: number;
27
+ /** The tone's tilt, piece minus reference, dB per octave. */
28
+ tilt?: number;
29
+ }
30
+ /** A setting fitted to a reference. */
31
+ export interface VoiceFit {
32
+ /** The piece's setting with the numbers moved. */
33
+ setting: VoiceOptions;
34
+ /** The fields that moved. */
35
+ moved: string[];
36
+ /** The piece's voice before and after, and how far each is from the reference. */
37
+ before: RecordingMeasurement;
38
+ after: RecordingMeasurement;
39
+ distance: {
40
+ before: FitDistance;
41
+ after: FitDistance;
42
+ };
43
+ /** The bands where the response reached `most`, Hz. */
44
+ limited: number[];
45
+ /** What the reference shows that the setup does not record, and what could not be measured. */
46
+ notes: string[];
47
+ }
48
+ /** The distance of one measurement from another. */
49
+ export declare function fitDistance(piece: RecordingMeasurement, reference: RecordingMeasurement, from?: number, to?: number): FitDistance;
50
+ /**
51
+ * Fits a voice's setting to a reference's measurement. `record` plays the
52
+ * piece's speech through a resolved setting and returns its channels at
53
+ * `rate` (the whole voice, as the measurement should hear it).
54
+ */
55
+ export declare function fitVoice(setting: VoiceSetting | undefined, record: (voice: ResolvedVoice) => readonly Float32Array[], reference: RecordingMeasurement, rate: number, options?: Partial<VoiceFitOptions>): VoiceFit;
56
+ //# sourceMappingURL=fit.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{resolveVoice as j}from"./chain.js";import{measureRecording as K,RECORDING_MEASURE_DEFAULTS as P}from"./measure.js";import{curveDb as Q}from"./mic.js";export const VOICE_FIT_DEFAULTS={rounds:4,most:12,from:100,to:12500,rt60:[.08,2.5],measure:P};const T=o=>Math.round(o*10)/10,_=o=>Math.round(o*100)/100,C=o=>Math.round(o*2)/2,z=(o,l,e)=>Math.min(e,Math.max(l,o));function W(o){return o===void 0||o===!1?{}:typeof o=="string"?{setup:o}:o}export function fitDistance(o,l,e=VOICE_FIT_DEFAULTS.from,F=VOICE_FIT_DEFAULTS.to){const k=new Map(l.spectrum.map(d=>[d.hz,d.db]));let n=0,c=0;for(const d of o.spectrum){const s=k.get(d.hz);s===void 0||d.hz<e||d.hz>F||(n+=(d.db-s)**2,c++)}return{spectrum:T(Math.sqrt(n/Math.max(c,1))),..."t60"in o.decay&&"t60"in l.decay?{decay:_(o.decay.t60-l.decay.t60)}:{},..."below"in o.tone&&"below"in l.tone?{tone:T(o.tone.below-l.tone.below),tilt:T(o.tone.tilt-l.tone.tilt)}:{}}}export function fitVoice(o,l,e,F,k={}){const n={...VOICE_FIT_DEFAULTS,...k},c=W(o),d=j(c);if(d===!1)throw new Error("A voice played as it is has no setting to fit.");const s=d.pickups[0];if(!s)throw new Error("A voice setting has a microphone.");const I=i=>K(l(i),F,n.measure),w=e.spectrum.map(i=>i.hz).filter(i=>i>=n.from&&i<=n.to),y=new Map(w.map(i=>[i,0]));let r=[s.band[0],s.band[1]],p=s.room&&"t60"in e.decay?s.room.rt60:void 0;const m=s.noise&&"below"in e.tone?{below:s.noise.below,tilt:s.noise.tilt}:void 0,v=[],L=()=>{const i=w.filter(h=>h>=r[0]&&h<=r[1]).map(h=>[h,C(Q(s.response,h)+(y.get(h)??0))]),E=p===void 0?void 0:typeof c.room=="string"?{preset:c.room,rt60:_(p)}:{...typeof c.room=="object"?c.room:{},rt60:_(p)},x=m?{...typeof c.noise=="object"?c.noise:{},below:C(m.below),tilt:T(m.tilt)}:void 0;return{...c,...i.length>0?{response:i}:{},...r[0]!==s.band[0]||r[1]!==s.band[1]?{band:[Math.round(r[0]),Math.round(r[1])]}:{},...E?{room:E}:{},...x?{noise:x}:{}}},f=I(d);let u=f;for(let i=0;i<n.rounds;i++){const E=new Map(e.spectrum.map(t=>[t.hz,t.db])),x=new Map;for(const t of u.spectrum){const a=E.get(t.hz);a!==void 0&&y.has(t.hz)&&x.set(t.hz,a-t.db)}const h=t=>(x.get(t)??0)<-n.most,B=[...w].reverse();let D=-1;for(const t of B){if(t<2e3||!h(t))break;D=t}D>0&&(r=[r[0],Math.min(r[1],D/2**(1/6))]);let O=-1;for(const t of w){if(t>400||!h(t))break;O=t}O>0&&(r=[Math.max(r[0],O*2**(1/6)),r[1]]);for(const[t,a]of w.entries()){if(a<r[0]||a>r[1]){y.set(a,0);continue}const b=g=>x.get(w[g]??-1),N=[[b(t-1)??NaN,.25],[b(t)??NaN,.5],[b(t+1)??NaN,.25]].filter(([g])=>Number.isFinite(g)),$=N.reduce((g,[,U])=>g+U,0),H=$>0?N.reduce((g,[U,J])=>g+U*J,0)/$:0;y.set(a,z((y.get(a)??0)+H,-n.most,n.most))}if(p!==void 0&&"t60"in u.decay&&"t60"in e.decay){v.push([Math.log(p),Math.log(u.decay.t60)]);const t=Math.log(e.decay.t60),a=v[v.length-1],b=v[v.length-2];let R=1;if(a&&b&&Math.abs(a[0]-b[0])>.001){const $=(a[1]-b[1])/(a[0]-b[0]);$>.1&&(R=$)}const N=z((t-(a?.[1]??t))/R,-Math.log(3),Math.log(3));p=z(Math.exp((a?.[0]??Math.log(p))+N),n.rt60[0],n.rt60[1])}m&&"below"in u.tone&&"below"in e.tone&&(m.below=z(m.below+(e.tone.below-u.tone.below),10,90),m.tilt=z(m.tilt+(e.tone.tilt-u.tone.tilt),-12,6));const V=j(L());if(V===!1)break;u=I(V)}const A=L(),q=[...A.response?["response"]:[],...A.band?["band"]:[],...p!==void 0?["room.rt60"]:[],...m?["noise.below","noise.tilt"]:[]],M=[],S=d.setup;"missing"in e.decay?M.push(`The reference's room was not measured: ${e.decay.missing}.`):!s.room&&("missing"in f.decay||e.decay.t60>f.decay.t60*1.25)?M.push(`The reference's voice falls away over ${e.decay.t60.toFixed(2)} s where the piece's ${"t60"in f.decay?`does over ${f.decay.t60.toFixed(2)} s`:"stops dead"}, and the setup ${S} records no room: a setup with one, or room: "bedroom" (any room), lets the fit set its reverberation.`):"missing"in f.decay&&s.room&&M.push(`The piece's room was not measured: ${f.decay.missing}.`),"missing"in e.tone?M.push(`The reference's room tone was not measured: ${e.tone.missing}.`):s.noise||M.push(`The reference's pauses hold a room tone ${e.tone.below.toFixed(1)} LU under its voice, and the setup ${S} records none: noise: {} adds one the fit can set.`);const G=w.filter(i=>Math.abs(y.get(i)??0)>=n.most-1e-9);return{setting:A,moved:q,before:f,after:u,distance:{before:fitDistance(f,e,n.from,n.to),after:fitDistance(u,e,n.from,n.to)},limited:G,notes:M}}
@@ -0,0 +1,10 @@
1
+ export { pickupImpulses, recordVoice, resolveVoice, voiceProblem, type ResolvedPickup, type ResolvedPost, type ResolvedRoom, type ResolvedVoice, type VoiceSpan, } from "./chain.js";
2
+ export { fitDistance, fitVoice, VOICE_FIT_DEFAULTS, type FitDistance, type VoiceFit, type VoiceFitOptions, } from "./fit.js";
3
+ export { bandwidthOf, BANDWIDTH_DEFAULTS, type Bandwidth, type BandwidthOptions, } from "./bandwidth.js";
4
+ export { integratedLoudness, steadyLoudness } from "./loudness.js";
5
+ export { measureRecording, RECORDING_MEASURE_DEFAULTS, THIRD_OCTAVES, type RecordingMeasureOptions, type RecordingMeasurement, } from "./measure.js";
6
+ export { PATTERNS, type Pattern } from "./mic.js";
7
+ export { POST_PRESETS, ROOM_PRESETS, SETUP_PRESETS, SOURCE_DEFAULTS, type PostPreset, type RoomPreset, type SetupPreset, } from "./presets.js";
8
+ export { MATERIALS } from "./room.js";
9
+ export { POSTS, ROOMS, VOICE_SETUPS, type AgcSettings, type NoiseOptions, type PostName, type PostOptions, type RoomName, type RoomOptions, type Surface, type VoiceOptions, type VoiceSetting, type VoiceSetup, } from "./setup.js";
10
+ //# 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{pickupImpulses,recordVoice,resolveVoice,voiceProblem}from"./chain.js";export{fitDistance,fitVoice,VOICE_FIT_DEFAULTS}from"./fit.js";export{bandwidthOf,BANDWIDTH_DEFAULTS}from"./bandwidth.js";export{integratedLoudness,steadyLoudness}from"./loudness.js";export{measureRecording,RECORDING_MEASURE_DEFAULTS,THIRD_OCTAVES}from"./measure.js";export{PATTERNS}from"./mic.js";export{POST_PRESETS,ROOM_PRESETS,SETUP_PRESETS,SOURCE_DEFAULTS}from"./presets.js";export{MATERIALS}from"./room.js";export{POSTS,ROOMS,VOICE_SETUPS}from"./setup.js";
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Integrated loudness, LUFS, of channels at `rate` (each weighted 1, as
3
+ * left and right are); undefined when everything is under the gate.
4
+ */
5
+ export declare function integratedLoudness(channels: readonly Float32Array[], rate: number): number | undefined;
6
+ /**
7
+ * The K-weighted level of everything, LUFS, with no gate: for a steady
8
+ * sound too quiet for the integrated loudness's -70 LUFS gate (a room's
9
+ * tone); undefined for digital silence.
10
+ */
11
+ export declare function steadyLoudness(channels: readonly Float32Array[], rate: number): number | undefined;
12
+ //# 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{biquad as y,runBiquads as m}from"./filters.js";function x(a){const f=1681.974450955533,u=3.999843853973347,e=.7071752369554196,t=Math.tan(Math.PI*f/a),h=10**(u/20),s=h**.4996667741545416,o=1+t/e+t*t,l={b0:(h+s*t/e+t*t)/o,b1:2*(t*t-h)/o,b2:(h-s*t/e+t*t)/o,a1:2*(t*t-1)/o,a2:(1-t/e+t*t)/o},i=y({type:"highpass",hz:38.13547087602444,q:.5003270373238773},a),d={b0:1,b1:-2,b2:1,a1:i.a1,a2:i.a2};return[l,d]}export function integratedLoudness(a,f){const u=a[0]?.length??0,e=Math.round(.4*f),t=Math.round(.1*f);if(u<e)return;const h=x(f),s=Math.floor(u/t),o=new Float64Array(s);for(const n of a){const c=Float32Array.from(n);m(c,h);for(let r=0;r<s;r++){let M=0;for(let p=r*t;p<(r+1)*t;p++)M+=(c[p]??0)**2;o[r]=(o[r]??0)+M}}const l=[],i=Math.round(e/t);for(let n=0;n+i<=s;n++){let c=0;for(let r=0;r<i;r++)c+=o[n+r]??0;l.push(c/(i*t))}const d=n=>-.691+10*Math.log10(Math.max(n,1e-20)),b=l.filter(n=>d(n)>-70);if(b.length===0)return;const k=b.reduce((n,c)=>n+c,0)/b.length,g=b.filter(n=>d(n)>d(k)-10);if(g.length!==0)return d(g.reduce((n,c)=>n+c,0)/g.length)}export function steadyLoudness(a,f){const u=x(f);let e=0,t=0;for(const h of a){const s=Float32Array.from(h);m(s,u);let o=0;for(const l of s)o+=l*l;e+=o/Math.max(1,s.length),t=Math.max(t,s.length)}if(!(t===0||e<=1e-20))return-.691+10*Math.log10(e)}
@@ -0,0 +1,67 @@
1
+ /** The measurement's thresholds. */
2
+ export interface RecordingMeasureOptions {
3
+ /**
4
+ * A frame is speech when it is this share of the way from the quiet end
5
+ * (the 10th percentile of frame levels, at most `range` dB under the
6
+ * loud end) to the loud end (the 95th percentile).
7
+ */
8
+ split: number;
9
+ range: number;
10
+ /** Speech joined over gaps shorter than this, s. */
11
+ join: number;
12
+ /** A pause is at least this long, s. */
13
+ gap: number;
14
+ /** A fall is read from this many dB under where speech stopped… */
15
+ skip: number;
16
+ /** …down to this many dB over the pause's floor. */
17
+ floor: number;
18
+ /** Fewer ends than this measure no decay. */
19
+ least: number;
20
+ /** An end whose fall from `skip` to `floor` spans fewer dB than this is not read. */
21
+ fall: number;
22
+ }
23
+ export declare const RECORDING_MEASURE_DEFAULTS: RecordingMeasureOptions;
24
+ /** Third-octave band centres, Hz (ISO 266, 63 Hz to 16 kHz). */
25
+ export declare const THIRD_OCTAVES: number[];
26
+ /** What a voice's recording measures. */
27
+ export interface RecordingMeasurement {
28
+ /** Its integrated loudness, LUFS. */
29
+ loudness: number | null;
30
+ /** Seconds of speech and of pauses. */
31
+ speech: number;
32
+ pauses: number;
33
+ /** dB by third-octave band against the 1 kHz band, over its speech. */
34
+ spectrum: {
35
+ hz: number;
36
+ db: number;
37
+ }[];
38
+ /** The room's decay where speech stops: its median time, the spread of the middle half, how many ends. */
39
+ decay: {
40
+ t60: number;
41
+ low: number;
42
+ high: number;
43
+ ends: number;
44
+ } | {
45
+ missing: string;
46
+ };
47
+ /** The pauses' loudness under the speech's, LU, and the tone's tilt, dB per octave. */
48
+ tone: {
49
+ below: number;
50
+ tilt: number;
51
+ } | {
52
+ missing: string;
53
+ };
54
+ /** Short-term loudness spread over the speech, LU (10th to 90th percentile), and peak over RMS, dB. */
55
+ dynamics: {
56
+ spread: number;
57
+ crest: number;
58
+ };
59
+ }
60
+ /** Speech and pauses as frame runs. */
61
+ export declare function speechRuns(levels: readonly number[], frame: number, o?: RecordingMeasureOptions): {
62
+ speech: [number, number][];
63
+ pauses: [number, number][];
64
+ };
65
+ /** A voice's recording measured (channels at `rate`). */
66
+ export declare function measureRecording(channels: readonly Float32Array[], rate: number, o?: RecordingMeasureOptions): RecordingMeasurement;
67
+ //# 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{fft as J}from"./fft.js";import{integratedLoudness as H,steadyLoudness as K}from"./loudness.js";import{biquad as W,runBiquads as X}from"./filters.js";export const RECORDING_MEASURE_DEFAULTS={split:.35,range:60,join:.15,gap:.3,skip:5,floor:6,least:4,fall:10},THIRD_OCTAVES=[63,80,100,125,160,200,250,315,400,500,630,800,1e3,1250,1600,2e3,2500,3150,4e3,5e3,6300,8e3,1e4,12500,16e3];const F=(i,e)=>i[Math.min(i.length-1,Math.max(0,Math.floor(e*i.length)))]??0;function Y(i){const e=i[0]?.length??0,f=new Float32Array(e);for(const h of i)for(let s=0;s<e;s++)f[s]=(f[s]??0)+(h[s]??0)/i.length;return f}function N(i,e){const f=[];for(let h=0;h+e<=i.length;h+=e){let s=0;for(let M=h;M<h+e;M++)s+=(i[M]??0)**2;f.push(10*Math.log10(s/e+1e-20))}return f}export function speechRuns(i,e,f=RECORDING_MEASURE_DEFAULTS){const h=[...i].sort((t,n)=>t-n),s=F(h,.95),M=Math.max(F(h,.1),s-f.range),w=M+f.split*(s-M),b=i.map(t=>t>w),A=[];let a=-1;b.forEach((t,n)=>{t&&a<0&&(a=n),!t&&a>=0&&(A.push([a,n]),a=-1)}),a>=0&&A.push([a,b.length]);const p=[];for(const t of A){const n=p[p.length-1];n&&(t[0]-n[1])*e<f.join?n[1]=t[1]:p.push([t[0],t[1]])}const S=[];for(let t=1;t<p.length;t++){const n=p[t-1]?.[1]??0,y=p[t]?.[0]??0;(y-n)*e>=f.gap&&S.push([n,y])}return{speech:p,pauses:S}}function Z(i,e,f){const s=new Float64Array(4097);let M=0;const w=new Float64Array(8192),b=new Float64Array(8192),A=Float64Array.from({length:8192},(t,n)=>.5-.5*Math.cos(2*Math.PI*n/8191));for(let t=0;t+8192<=i.length;t+=8192/4)if(f(t+8192/2)){for(let n=0;n<8192;n++)w[n]=(i[t+n]??0)*(A[n]??0),b[n]=0;J(w,b);for(let n=0;n<=8192/2;n++)s[n]=(s[n]??0)+(w[n]??0)**2+(b[n]??0)**2;M++}const a=e/8192,p=THIRD_OCTAVES.filter(t=>t*2**(1/6)<e/2).map(t=>{const n=t/1.122462048309373,y=t*2**(1/6);let O=0;for(let x=Math.floor(n/a);x<=Math.ceil(y/a);x++){const T=Math.max(n,(x-.5)*a),v=Math.min(y,(x+.5)*a);v>T&&(O+=(s[x]??0)*(v-T)/a)}return{hz:t,db:10*Math.log10(O/Math.max(M,1)+1e-20)}}),S=p.find(t=>t.hz===1e3)?.db??0;return p.map(t=>({hz:t.hz,db:Math.round((t.db-S)*10)/10}))}export function measureRecording(i,e,f=RECORDING_MEASURE_DEFAULTS){const h=Y(i),s=Math.round(.02*e),M=N(h,s),{speech:w,pauses:b}=speechRuns(M,s/e,f),A=new Uint8Array(M.length);for(const[o,r]of w)for(let c=o;c<r;c++)A[c]=1;const a=o=>Math.round(o*10)/10,p=o=>Math.round(o*1e3)/1e3,S=Z(h,e,o=>A[Math.floor(o/s)]===1),t=Math.round(.005*e),n=N(h,t),y=[];for(const[o,r]of b){const c=Math.round(o*s/t),k=Math.round(r*s/t),_=F(n.slice(c,k).sort((l,d)=>l-d),.2),D=n.slice(Math.max(0,c-100),c).sort((l,d)=>l-d),C=F(D,.9);let E=c;for(let l=c;l>Math.max(0,c-100);l--)if((n[l]??-200)>=C-6){E=l;break}const g=(n[E]??-200)-f.skip,m=Math.max(_+f.floor,g-40);if(g-m<f.fall)continue;const u=[],R=Math.min(k,n.length,E+Math.round(.5*e/t));for(let l=E;l<R;l++){const d=n[l]??-200;if(d<=m)break;d<=g&&u.push([l*t/e,d])}if(u.length<4)continue;const L=u.reduce((l,d)=>l+d[0],0)/u.length,Q=u.reduce((l,d)=>l+d[1],0)/u.length,V=u.reduce((l,d)=>l+(d[0]-L)*(d[1]-Q),0),B=u.reduce((l,d)=>l+(d[0]-L)**2,0),G=B>0?V/B:0;G<0&&y.push(G)}const O=y.length<f.least?{missing:`${String(y.length)} ends of speech before a pause fell far enough to read (${String(f.least)} needed)`}:(()=>{const o=y.map(r=>-60/r).sort((r,c)=>r-c);return{t60:p(F(o,.5)),low:p(F(o,.25)),high:p(F(o,.75)),ends:o.length}})(),x=H(i,e),T=o=>{const r=Math.round(.08/(s/e));return[o[0]+r,o[1]-r]},v=b.map(T).filter(([o,r])=>r-o>5);let P={missing:"no pause long enough to hear the room in"};if(v.length>0&&x!==void 0){const o=v.reduce((j,[g,m])=>j+(m-g)*s,0),r=Math.max(o,Math.round(.5*e)),c=j=>{const g=new Float32Array(r);let m=0;for(const[u,R]of v)g.set(j.subarray(u*s,R*s),m),m+=(R-u)*s;for(let u=m;u<r;u++)g[u]=g[(u-m)%Math.max(m,1)]??0;return g},k=i.map(c),_=K(k,e),D=j=>{let g=0,m=0;for(const u of k){const R=Float32Array.from(u);X(R,[W({type:"bandpass",hz:j,q:Math.SQRT2},e)]);for(const L of R)g+=L*L;m+=R.length}return 10*Math.log10(g/Math.max(m,1)+1e-20)},C=D(250),E=D(4e3);P=_===void 0?{missing:"the pauses are silent"}:{below:a(x-_),tilt:a((E-C)/4)}}const q=[],I=Math.round(.4*e);for(let o=0;o+I<=h.length;o+=Math.round(.1*e)){if(A[Math.floor((o+I/2)/s)]!==1)continue;const r=H([h.subarray(o,o+I)],e);r!==void 0&&q.push(r)}q.sort((o,r)=>o-r);let U=0,$=0,z=0;for(const[o,r]of w)for(let c=o*s;c<r*s&&c<h.length;c++){const k=Math.abs(h[c]??0);U=Math.max(U,k),$+=k*k,z++}return{loudness:x===void 0?null:a(x),speech:a(w.reduce((o,[r,c])=>o+(c-r),0)*(s/e)),pauses:a(b.reduce((o,[r,c])=>o+(c-r),0)*(s/e)),spectrum:S,decay:O,tone:P,dynamics:{spread:q.length>0?a(F(q,.9)-F(q,.1)):0,crest:z>0?a(20*Math.log10(U/Math.sqrt($/z+1e-20))):0}}}
@@ -0,0 +1,32 @@
1
+ import type { Vec3 } from "./vec.js";
2
+ /** The speed of sound, m/s, at 20 °C. */
3
+ export declare const SOUND_SPEED = 343;
4
+ /** A first-order pattern, as pyroomacoustics names them, and its pressure share p. */
5
+ export declare const PATTERNS: {
6
+ readonly omni: 1;
7
+ readonly subcardioid: 0.75;
8
+ readonly cardioid: 0.5;
9
+ readonly supercardioid: 0.37;
10
+ readonly hypercardioid: 0.25;
11
+ readonly figure8: 0;
12
+ };
13
+ export type Pattern = keyof typeof PATTERNS;
14
+ /** A pattern's gain toward a direction at angle θ off its axis (cos θ given). */
15
+ export declare function patternGain(pattern: Pattern, cos: number): number;
16
+ /**
17
+ * The proximity effect on axis at `hz`: the near field's gain over the far
18
+ * field's, |1 + (1 - p)/(jkr)|, of a source `distance` m away.
19
+ */
20
+ export declare function proximity(pattern: Pattern, distance: number, hz: number): number;
21
+ /**
22
+ * The talker's loss toward an angle θ off where they face, at 180° (dB, ≤ 0),
23
+ * by octave band centre: little in the lows, much in the highs.
24
+ */
25
+ export declare const TALKER_BEHIND: readonly (readonly [number, number])[];
26
+ /** A table of [Hz, dB] read at `hz`, linear in log frequency, held past its ends. */
27
+ export declare function curveDb(table: readonly (readonly [number, number])[], hz: number): number;
28
+ /** The talker's loss (dB) at `hz` toward a direction θ off their facing (cos θ given). */
29
+ export declare function talkerDb(hz: number, cos: number): number;
30
+ /** cos of the angle between two vectors (1 when either is zero). */
31
+ export declare function cosBetween(a: Vec3, b: Vec3): number;
32
+ //# sourceMappingURL=mic.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 SOUND_SPEED=343,PATTERNS={omni:1,subcardioid:.75,cardioid:.5,supercardioid:.37,hypercardioid:.25,figure8:0};export function patternGain(t,r){const n=PATTERNS[t];return n+(1-n)*r}export function proximity(t,r,n){const o=PATTERNS[t],e=2*Math.PI*Math.max(n,1)*Math.max(r,.005)/343;return Math.hypot(1,(1-o)/e)}export const TALKER_BEHIND=[[63,0],[125,-1],[250,-2],[500,-4],[1e3,-6],[2e3,-9],[4e3,-13],[8e3,-18],[16e3,-25]];export function curveDb(t,r){const n=t[0],o=t[t.length-1];if(!n||!o)return 0;if(r<=n[0])return n[1];if(r>=o[0])return o[1];for(let e=1;e<t.length;e++){const i=t[e-1],c=t[e];if(!i||!c||r>c[0])continue;const u=Math.log(r/i[0])/Math.log(c[0]/i[0]);return i[1]+(c[1]-i[1])*u}return o[1]}export function talkerDb(t,r){return curveDb(TALKER_BEHIND,t)*((1-r)/2)}export function cosBetween(t,r){const n=Math.hypot(t[0],t[1],t[2]),o=Math.hypot(r[0],r[1],r[2]);return n===0||o===0?1:(t[0]*r[0]+t[1]*r[1]+t[2]*r[2])/(n*o)}
@@ -0,0 +1,27 @@
1
+ /** mulberry32: the same numbers for the same seed, everywhere. */
2
+ export declare function random(seed: number): () => number;
3
+ /** Normal noise (Box–Muller) from a seed. */
4
+ export declare function gaussian(seed: number): () => number;
5
+ /** What a room tone sounds like. */
6
+ export interface NoiseShape {
7
+ /** dB per octave over 1 kHz (pink noise is -3). */
8
+ tilt: number;
9
+ /** dB more below 120 Hz: ventilation, traffic, the building. */
10
+ rumble: number;
11
+ /** The mains' hum: its fundamental (50 or 60 Hz) and its level against the noise, dB; absent: none. */
12
+ hum?: {
13
+ hz: number;
14
+ db: number;
15
+ };
16
+ /** The highest frequency it has, Hz: a device's band. */
17
+ top: number;
18
+ }
19
+ /** The noise's gain at a frequency (linear), relative to 1 kHz. */
20
+ export declare function noiseGain(shape: NoiseShape, hz: number): number;
21
+ /**
22
+ * `n` samples of room tone of unit RMS before its level is set: Gaussian
23
+ * noise through the shape's minimum-phase filter, the hum added as sines
24
+ * (its harmonics falling 6 dB each), all from the seed.
25
+ */
26
+ export declare function roomTone(n: number, rate: number, shape: NoiseShape, seed: number): Float32Array;
27
+ //# sourceMappingURL=noise.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{convolve as p,minimumPhase as P}from"./fft.js";export function random(n){let r=n>>>0;return()=>{r=r+1831565813>>>0;let t=r;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}export function gaussian(n){const r=random(n);let t;return()=>{if(t!==void 0){const h=t;return t=void 0,h}const a=Math.max(r(),1e-12),c=r(),e=Math.sqrt(-2*Math.log(a));return t=e*Math.sin(2*Math.PI*c),e*Math.cos(2*Math.PI*c)}}export function noiseGain(n,r){const t=Math.max(r,10);let a=n.tilt*Math.log2(t/1e3);return a+=n.rumble/(1+(t/120)**2),t>n.top&&(a-=48*Math.log2(t/n.top)),10**(a/20)}export function roomTone(n,r,t,a){const c=gaussian(a),e=new Float32Array(n+4096);for(let o=0;o<e.length;o++)e[o]=c();const h=P(o=>noiseGain(t,o),r,2048),l=p(e,h).subarray(4096);let m=0;for(const o of l)m+=o*o;const M=Math.sqrt(m/Math.max(1,l.length)),i=new Float32Array(n);for(let o=0;o<n;o++)i[o]=(l[o]??0)/(M||1);if(t.hum){const o=10**(t.hum.db/20)*Math.SQRT2,x=random(a^2654435769);for(let u=1;u<=6;u++){const f=t.hum.hz*u;if(f>t.top)break;const d=o/2**(u-1),b=x()*2*Math.PI,g=2*Math.PI*f/r;for(let s=0;s<n;s++)i[s]=(i[s]??0)+d*Math.sin(g*s+b)}}return i}
@@ -0,0 +1,64 @@
1
+ import type { CompressorOptions, DeesserOptions } from "./dynamics.js";
2
+ import type { FilterSpec } from "./filters.js";
3
+ import type { Pattern } from "./mic.js";
4
+ import type { NoiseShape } from "./noise.js";
5
+ import type { PostName, RoomName, RoomOptions, VoiceSetup } from "./setup.js";
6
+ import type { Vec3 } from "./vec.js";
7
+ /** A room as a preset gives it: every value. */
8
+ export interface RoomPreset {
9
+ size: Vec3;
10
+ walls: string;
11
+ floor: string;
12
+ ceiling: string;
13
+ rt60: number;
14
+ talker: Vec3;
15
+ /** Only the ground is there (outdoors). */
16
+ open?: true;
17
+ /** Reflection order of the image sources. */
18
+ order: number;
19
+ }
20
+ export declare const ROOM_PRESETS: Record<RoomName, RoomPreset>;
21
+ /** A finishing chain as a preset gives it. */
22
+ export interface PostPreset {
23
+ highpass: number | false;
24
+ eq: FilterSpec[];
25
+ /** Threshold: dB over the voice's loudness. */
26
+ deess: DeesserOptions | false;
27
+ /** Threshold: dB over the voice's loudness. */
28
+ compress: CompressorOptions | false;
29
+ }
30
+ export declare const POST_PRESETS: Record<PostName, PostPreset>;
31
+ /** A setup as its preset gives it. */
32
+ export interface SetupPreset {
33
+ pattern: Pattern;
34
+ distance: number;
35
+ angle: number;
36
+ below: number;
37
+ response: (readonly [number, number])[];
38
+ band: readonly [number, number];
39
+ stereo: number | false;
40
+ room: RoomName | RoomOptions | false;
41
+ /** Its loudness under the voice's (LU), and its shape. */
42
+ noise: (NoiseShape & {
43
+ below: number;
44
+ }) | false;
45
+ /** Target: dB over the voice's loudness. */
46
+ agc: {
47
+ target: number;
48
+ most: number;
49
+ attack: number;
50
+ release: number;
51
+ /** The speech's level it follows is over this many seconds. */
52
+ window: number;
53
+ /** Under this (dB under the voice's loudness) the gain holds: a pause is not lifted. */
54
+ gate?: number;
55
+ } | false;
56
+ post: PostName | false;
57
+ }
58
+ export declare const SETUP_PRESETS: Record<VoiceSetup, SetupPreset>;
59
+ /** The dry voice's own microphone: a studio's cardioid 0.2 m away. */
60
+ export declare const SOURCE_DEFAULTS: {
61
+ pattern: Pattern;
62
+ distance: number;
63
+ };
64
+ //# sourceMappingURL=presets.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 ROOM_PRESETS={bedroom:{size:[3.4,2.6,4],walls:"plasterboard",floor:"carpet",ceiling:"plasterboard-ceiling",rt60:.4,talker:[1.5,1.2,1.5],order:3},"living-room":{size:[5,2.7,6],walls:"plasterboard",floor:"wood",ceiling:"plasterboard-ceiling",rt60:.55,talker:[2.2,1.2,2.5],order:3},office:{size:[4,2.8,5],walls:"plasterboard",floor:"carpet-thin",ceiling:"ceiling-tiles",rt60:.45,talker:[1.8,1.2,2],order:3},kitchen:{size:[3,2.6,4],walls:"tiles",floor:"tiles",ceiling:"plasterboard-ceiling",rt60:.75,talker:[1.4,1.6,1.6],order:3},treated:{size:[3,2.6,3.5],walls:"foam",floor:"carpet",ceiling:"foam",rt60:.2,talker:[1.4,1.2,1.4],order:3},car:{size:[1.4,1.15,1.9],walls:"glass",floor:"upholstery",ceiling:"upholstery",rt60:.08,talker:[.45,.85,.9],order:6},outdoor:{size:[60,30,60],walls:"hard",floor:"hard",ceiling:"hard",rt60:.4,talker:[30,1.6,30],open:!0,order:1}};const e={hz:5500,threshold:-12,ratio:3,attack:.002,release:.06};export const POST_PRESETS={finish:{highpass:70,eq:[],deess:e,compress:{threshold:-3,ratio:4,knee:6,attack:.005,release:.3,window:.01}},"phone-app":{highpass:90,eq:[{type:"peak",hz:300,db:-2,q:1},{type:"peak",hz:4e3,db:3,q:.8},{type:"highshelf",hz:1e4,db:1}],deess:e,compress:{threshold:0,ratio:3,knee:6,attack:.005,release:.12,window:.01}}};const r={tilt:-4,rumble:8,top:16e3};export const SETUP_PRESETS={studio:{pattern:"cardioid",distance:.2,angle:0,below:0,response:[[125,-3.5],[250,-3],[500,-.5],[1e3,0],[2e3,-2],[4e3,-1.5],[8e3,-4],[12500,-4]],band:[20,2e4],stereo:!1,room:!1,noise:!1,agc:!1,post:"finish"},phone:{pattern:"omni",distance:.35,angle:0,below:25,response:[[125,-8.5],[250,-3.5],[500,-.5],[1e3,0],[2e3,0],[4e3,0],[8e3,-3.5],[12500,-2.5]],band:[100,16e3],stereo:.1,room:{preset:"bedroom",rt60:.2},noise:{...r,below:42},agc:{target:0,most:10,attack:.3,release:1.5,window:2,gate:-25},post:!1},lav:{pattern:"omni",distance:.22,angle:0,below:70,response:[[125,-2],[250,-3],[500,.5],[1e3,0],[2e3,-1],[4e3,-1],[8e3,-3.5],[12500,-4]],band:[70,18e3],stereo:!1,room:{preset:"bedroom",rt60:.13},noise:{tilt:-4,rumble:4,top:18e3,below:50},agc:!1,post:"finish"}},SOURCE_DEFAULTS={pattern:"cardioid",distance:.2};
@@ -0,0 +1,78 @@
1
+ import { type Pattern } from "./mic.js";
2
+ import type { Vec3 } from "./vec.js";
3
+ /** Octave band centres, Hz, from 125. */
4
+ export declare function bandCentres(rate: number): number[];
5
+ /**
6
+ * Absorption coefficients (energy) at 125 Hz to 8 kHz, from
7
+ * pyroomacoustics' data/materials.json; values past what a source gives
8
+ * hold its last.
9
+ */
10
+ export declare const MATERIALS: Record<string, readonly number[]>;
11
+ /**
12
+ * Air absorption (energy, per metre) at 125 Hz to 8 kHz, 20 °C and 30–50 %
13
+ * humidity: Vorländer's Auralization, as pyroomacoustics has it.
14
+ */
15
+ export declare const AIR: number[];
16
+ /** A table at 125 Hz to 8 kHz read at the given band centres (log-linear, extrapolated past 8 kHz, kept in [0, 1]). */
17
+ export declare function atBands(table: readonly number[], centres: readonly number[]): number[];
18
+ /** A box room, its surfaces' absorption by band, the talker and the microphone. */
19
+ export interface RoomModel {
20
+ /** Width (x), height (y), depth (z), m. */
21
+ size: Vec3;
22
+ /** Absorption by band (at 125 Hz up) of the walls at x = 0 and x = W, y = 0 (the floor) and y = H, z = 0 and z = D. */
23
+ surfaces: readonly [
24
+ readonly number[],
25
+ readonly number[],
26
+ readonly number[],
27
+ readonly number[],
28
+ readonly number[],
29
+ readonly number[]
30
+ ];
31
+ /** Surfaces that are not there (outdoors: only the ground). */
32
+ open?: readonly boolean[];
33
+ talker: Vec3;
34
+ /** Where the talker faces. */
35
+ facing: Vec3;
36
+ mic: Vec3;
37
+ /** Where the microphone points. */
38
+ axis: Vec3;
39
+ pattern: Pattern;
40
+ /** The dry voice's own microphone: proximity is this setup's over it. */
41
+ source: {
42
+ pattern: Pattern;
43
+ distance: number;
44
+ };
45
+ /** Reflection order of the image sources; past it the statistical tail. */
46
+ order: number;
47
+ }
48
+ /** The reverberation time of each band, s (Eyring, with the air). */
49
+ export declare function reverberation(room: RoomModel, rate: number): number[];
50
+ /**
51
+ * Surfaces scaled by one factor so the room's reverberation time at
52
+ * 500 Hz–1 kHz is `rt60` (bisection on the factor; each coefficient kept
53
+ * under 0.99).
54
+ */
55
+ export declare function withReverberation(room: RoomModel, rt60: number, rate: number): RoomModel;
56
+ /** The impulse response's parts: the direct sound's delay and gain, and the rest. */
57
+ export interface RoomResponse {
58
+ /** Every reflection and the tail, the direct sound left out, at `lead` samples before the direct sound's arrival. */
59
+ reflections: Float64Array;
60
+ /** The direct sound: its amplitude (1/d, the pattern), and the talker's angle toward the microphone (cos). */
61
+ direct: {
62
+ gain: number;
63
+ cos: number;
64
+ distance: number;
65
+ };
66
+ /** Samples the response is ahead of the direct sound's arrival: the sinc's half. */
67
+ lead: number;
68
+ /** Each band's reverberation time, s. */
69
+ rt60: number[];
70
+ /** When the tail takes over, s after the direct sound. */
71
+ mixing: number;
72
+ }
73
+ /**
74
+ * The room's impulse response at `rate`, its time 0 the direct sound's
75
+ * arrival less `lead` samples, seeded for the tail.
76
+ */
77
+ export declare function roomResponse(room: RoomModel, rate: number, seed: number): RoomResponse;
78
+ //# sourceMappingURL=room.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{fft as nt,nextPow2 as ht}from"./fft.js";import{cosBetween as Q,patternGain as ot,proximity as st,talkerDb as lt}from"./mic.js";import{random as Mt}from"./noise.js";export function bandCentres(t){const n=Math.floor(Math.log2(t/125));return Array.from({length:n},(r,s)=>125*2**s)}export const MATERIALS={hard:[.02,.02,.03,.03,.04,.05,.05],plasterboard:[.15,.1,.06,.04,.04,.05,.05],"plasterboard-ceiling":[.2,.15,.1,.08,.04,.02,.02],tiles:[.01,.01,.01,.02,.02,.02,.02],concrete:[.01,.03,.05,.02,.02,.02,.02],wood:[.18,.12,.1,.09,.08,.07,.07],carpet:[.08,.08,.3,.6,.75,.8,.8],"carpet-thin":[.02,.04,.08,.2,.35,.4,.4],glass:[.1,.05,.04,.03,.03,.03,.03],curtains:[.05,.12,.35,.45,.38,.36,.36],"ceiling-tiles":[.49,.53,.53,.75,.92,.99,.99],foam:[.12,.33,.83,.97,.98,.95,.95],upholstery:[.44,.6,.77,.89,.82,.7,.7],grass:[.11,.26,.6,.69,.92,.99,.99]},AIR=[1e-4,3e-4,6e-4,.001,.0019,.0058,.0203];export function atBands(t,n){return n.map(r=>{const s=Math.log2(r/125),p=Math.min(Math.max(Math.floor(s),0),t.length-2),i=t[p]??0,M=t[p+1]??i;return Math.min(1,Math.max(0,i+(M-i)*(s-p)))})}const _=343;function ft(t){const[n,r,s]=t;return[r*s,r*s,n*s,n*s,n*r,n*r]}export function reverberation(t,n){const r=bandCentres(n),[s,p,i]=t.size,M=s*p*i,h=ft(t.size),a=h.reduce((m,g)=>m+g,0),e=atBands(AIR,r);return r.map((m,g)=>{let F=0;t.surfaces.forEach((I,R)=>{const k=t.open?.[R]===!0;F+=(h[R]??0)*(k?1:atBands(I,r)[g]??0)});const y=Math.min(F/a,.999);return 24*Math.LN10*M/(_*(-a*Math.log(1-y)+4*(e[g]??0)*M))})}export function withReverberation(t,n,r){const s=h=>({...t,surfaces:t.surfaces.map(a=>a.map(e=>Math.min(.99,e*h)))}),p=h=>{const a=reverberation(h,r);return((a[2]??0)+(a[3]??0))/2};let i=.001,M=1e3;for(let h=0;h<60;h++){const a=Math.sqrt(i*M);p(s(a))>n?i=a:M=a}return s(Math.sqrt(i*M))}function pt(t,n,r){const s=n/2+1,p=t.map(()=>new Float64Array(s)),i=t.map((a,e)=>e===0?0:Math.round(a/Math.SQRT2/r*n)),M=t.map(a=>Math.round(a/r*n)),h=t.map((a,e)=>e===t.length-1?s:Math.round(a*Math.SQRT2/r*n));t.forEach((a,e)=>{const m=p[e];if(m)for(let g=i[e]??0;g<Math.min(h[e]??s,s);g++)m[g]=1});for(let a=1;a<t.length;a++){const e=Math.max(1,Math.round(.5*((h[a]??0)-(M[a]??0)))),m=p[a-1],g=p[a];if(!(!m||!g))for(let F=-e;F<=e;F++){const y=(i[a]??0)+F;if(y<0||y>=s)continue;const I=(F/e+1)/2;m[y]=Math.cos(Math.PI*I/2),g[y]=Math.sin(Math.PI*I/2)}}return p}function ut(t,n,r){const s=Math.floor(n),p=n-s;for(let i=0;i<81;i++){const M=s-40+i;if(M<0||M>=t.length)continue;const h=i-40-p,a=Math.abs(h)<1e-9?1:Math.sin(Math.PI*h)/(Math.PI*h),e=.5-.5*Math.cos(2*Math.PI*i/80);t[M]=(t[M]??0)+r*e*a}}export function roomResponse(t,n,r){const s=bandCentres(n),p=s.length,[i,M,h]=t.size,a=[i,M,h],e=t.talker,m=t.mic,g=t.surfaces.map((f,u)=>t.open?.[u]===!0?s.map(()=>0):atBands(f,s).map(o=>Math.sqrt(1-o))),F=atBands(AIR,s),y=reverberation(t,n),I=[m[0]-e[0],m[1]-e[1],m[2]-e[2]],R=Math.hypot(...I),k=40,E=t.order,K=[];let q=1/0;for(let f=-(E+1);f<=E+1;f++)for(let u=-(E+1);u<=E+1;u++)for(let o=-(E+1);o<=E+1;o++){const b=Math.abs(f)+Math.abs(u)+Math.abs(o);if(b===0||b>E+1)continue;const d=[f,u,o],c=(S,v)=>{const x=a[v]??1,w=e[v];return S*x+(Math.abs(S)%2===1?x-w:w)},l=[c(f,0)-m[0],c(u,1)-m[1],c(o,2)-m[2]],P=Math.hypot(...l),N=(P-R)/_;if(b===E+1){d.every((v,x)=>v===0||!(t.open?.[x*2]===!0&&t.open[x*2+1]===!0))&&(q=Math.min(q,N));continue}let C=!1;const H=s.map((S,v)=>{let x=1;return d.forEach((w,X)=>{const Y=w>0?Math.floor(w/2):Math.ceil(-w/2),Z=w>0?Math.ceil(w/2):Math.floor(-w/2),$=g[X*2]?.[v]??0,tt=g[X*2+1]?.[v]??0;(Y>0&&$===0||Z>0&&tt===0)&&(C=!0),x*=$**Y*tt**Z}),x});if(C)continue;const V=[Math.abs(f)%2===1?l[0]:-l[0],Math.abs(u)%2===1?l[1]:-l[1],Math.abs(o)%2===1?l[2]:-l[2]],W=ot(t.pattern,Q(l,t.axis)),J=Q(V,t.facing);K.push({t:N,amp:H.map((S,v)=>{const x=s[v]??1e3,w=st(t.pattern,P,x)/st(t.source.pattern,t.source.distance,x);return S*W/P*Math.exp(-.5*(F[v]??0)*P)*10**(lt(x,J)/20)*w})})}Number.isFinite(q)||(q=.08);const at=Math.max(...y),z=Math.ceil((Math.min(Math.max(at,q+.05),3)+.01)*n)+2*k,A=ht(2*z),ct=pt(s,A,n),D=new Float64Array(A),j=new Float64Array(A),B=new Float64Array(A),T=new Float64Array(A),O=Math.round(q*n),[et,rt,it]=t.size,U=et*rt*it,G=t.open?.some(Boolean)===!0,L=new Float64Array(z);if(!G){const f=Mt(r);let u=q;for(;u*n<z-k;){const c=Math.floor(u*n)+k;L[c]=(L[c]??0)+(f()<.5?-1:1);const l=Math.min(4*Math.PI*_**3*(u+R/_)**2/U,1e4);u+=Math.log(1/Math.max(f(),1e-12))/l}const o=Math.max(1,Math.round(.004*n)),b=new Float64Array(z);let d=0;for(let c=0;c<z;c++)d+=(L[c]??0)**2,c>=o&&(d-=(L[c-o]??0)**2),b[c]=d/o;for(let c=0;c<z;c++){const l=b[Math.min(z-1,c+Math.floor(o/2))]??0;l>0&&(L[c]=(L[c]??0)/Math.sqrt(l))}}for(let f=0;f<p;f++){B.fill(0),T.fill(0);for(const o of K)!G&&o.t>q+.002||ut(B,o.t*n+k,o.amp[f]??0);if(!G){const o=y[f]??.4,b=Math.round(.01*n);for(let d=O+k-Math.round(.002*n);d<z;d++){const c=(d-k)/n,l=Math.sqrt(4*Math.PI*_/U/n*Math.exp(-6*Math.LN10*(c+R/_)/o)),P=d-(O+k-Math.round(.002*n)),N=P<b?.5-.5*Math.cos(Math.PI*P/b):1;T[d]=(L[d]??0)*l*N}}nt(B,T);const u=ct[f];if(u)for(let o=0;o<A;o++){const b=o<=A/2?o:A-o,d=(u[b]??0)**2,c=(A-o)%A,l=B[o]??0,P=T[o]??0,N=B[c]??0,C=T[c]??0,H=(l+N)/2,V=(P-C)/2,W=(P+C)/2,J=(N-l)/2;D[o]=(D[o]??0)+d*(H+W),j[o]=(j[o]??0)+d*(V+J)}}return nt(D,j,!0),{reflections:D.slice(0,z),direct:{gain:ot(t.pattern,Q([-I[0],-I[1],-I[2]],t.axis))/R,cos:Q(I,t.facing),distance:R},lead:k,rt60:y,mixing:q}}