@nodetool-ai/timeline 0.8.19 → 0.8.21

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 (337) hide show
  1. package/dist/.nodetool-build-stamp +1 -1
  2. package/dist/autoCrossfade.d.ts +30 -0
  3. package/dist/autoCrossfade.d.ts.map +1 -0
  4. package/dist/autoCrossfade.js +130 -0
  5. package/dist/autoCrossfade.js.map +1 -0
  6. package/dist/automation.d.ts +32 -1
  7. package/dist/automation.d.ts.map +1 -1
  8. package/dist/automation.js +78 -1
  9. package/dist/automation.js.map +1 -1
  10. package/dist/automationRanges.d.ts +375 -0
  11. package/dist/automationRanges.d.ts.map +1 -0
  12. package/dist/automationRanges.js +375 -0
  13. package/dist/automationRanges.js.map +1 -0
  14. package/dist/clipAudio.d.ts +3 -1
  15. package/dist/clipAudio.d.ts.map +1 -1
  16. package/dist/clipAudio.js.map +1 -1
  17. package/dist/clipLoop.d.ts +67 -0
  18. package/dist/clipLoop.d.ts.map +1 -0
  19. package/dist/clipLoop.js +339 -0
  20. package/dist/clipLoop.js.map +1 -0
  21. package/dist/clipSpeed.d.ts.map +1 -1
  22. package/dist/clipSpeed.js +7 -0
  23. package/dist/clipSpeed.js.map +1 -1
  24. package/dist/defaults.d.ts.map +1 -1
  25. package/dist/defaults.js +9 -0
  26. package/dist/defaults.js.map +1 -1
  27. package/dist/dropResolve.d.ts.map +1 -1
  28. package/dist/dropResolve.js +56 -17
  29. package/dist/dropResolve.js.map +1 -1
  30. package/dist/harmony/chordChart.d.ts +25 -0
  31. package/dist/harmony/chordChart.d.ts.map +1 -0
  32. package/dist/harmony/chordChart.js +99 -0
  33. package/dist/harmony/chordChart.js.map +1 -0
  34. package/dist/harmony/chordRange.d.ts +9 -0
  35. package/dist/harmony/chordRange.d.ts.map +1 -0
  36. package/dist/harmony/chordRange.js +32 -0
  37. package/dist/harmony/chordRange.js.map +1 -0
  38. package/dist/harmony/chordSymbols.d.ts +28 -0
  39. package/dist/harmony/chordSymbols.d.ts.map +1 -0
  40. package/dist/harmony/chordSymbols.js +147 -0
  41. package/dist/harmony/chordSymbols.js.map +1 -0
  42. package/dist/harmony/chordTrack.d.ts +13 -0
  43. package/dist/harmony/chordTrack.d.ts.map +1 -0
  44. package/dist/harmony/chordTrack.js +11 -0
  45. package/dist/harmony/chordTrack.js.map +1 -0
  46. package/dist/harmony/detect.d.ts +35 -0
  47. package/dist/harmony/detect.d.ts.map +1 -0
  48. package/dist/harmony/detect.js +138 -0
  49. package/dist/harmony/detect.js.map +1 -0
  50. package/dist/harmony/detectAudio.d.ts +62 -0
  51. package/dist/harmony/detectAudio.d.ts.map +1 -0
  52. package/dist/harmony/detectAudio.js +226 -0
  53. package/dist/harmony/detectAudio.js.map +1 -0
  54. package/dist/harmony/expand.d.ts +7 -12
  55. package/dist/harmony/expand.d.ts.map +1 -1
  56. package/dist/harmony/expand.js +63 -11
  57. package/dist/harmony/expand.js.map +1 -1
  58. package/dist/harmony/index.d.ts +7 -0
  59. package/dist/harmony/index.d.ts.map +1 -1
  60. package/dist/harmony/index.js +7 -0
  61. package/dist/harmony/index.js.map +1 -1
  62. package/dist/harmony/progressionLibrary.d.ts +33 -0
  63. package/dist/harmony/progressionLibrary.d.ts.map +1 -0
  64. package/dist/harmony/progressionLibrary.js +71 -0
  65. package/dist/harmony/progressionLibrary.js.map +1 -0
  66. package/dist/harmony/summary.d.ts +4 -0
  67. package/dist/harmony/summary.d.ts.map +1 -0
  68. package/dist/harmony/summary.js +22 -0
  69. package/dist/harmony/summary.js.map +1 -0
  70. package/dist/index.d.ts +3 -0
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +3 -0
  73. package/dist/index.js.map +1 -1
  74. package/dist/interchange.d.ts.map +1 -1
  75. package/dist/interchange.js +72 -12
  76. package/dist/interchange.js.map +1 -1
  77. package/dist/loopWindow.d.ts +17 -0
  78. package/dist/loopWindow.d.ts.map +1 -0
  79. package/dist/loopWindow.js +34 -0
  80. package/dist/loopWindow.js.map +1 -0
  81. package/dist/midi/cacheKey.d.ts +11 -2
  82. package/dist/midi/cacheKey.d.ts.map +1 -1
  83. package/dist/midi/cacheKey.js +69 -9
  84. package/dist/midi/cacheKey.js.map +1 -1
  85. package/dist/midi/controllerEdit.d.ts +35 -0
  86. package/dist/midi/controllerEdit.d.ts.map +1 -0
  87. package/dist/midi/controllerEdit.js +94 -0
  88. package/dist/midi/controllerEdit.js.map +1 -0
  89. package/dist/midi/controllerRange.d.ts +13 -0
  90. package/dist/midi/controllerRange.d.ts.map +1 -0
  91. package/dist/midi/controllerRange.js +13 -0
  92. package/dist/midi/controllerRange.js.map +1 -0
  93. package/dist/midi/controllers.d.ts +95 -0
  94. package/dist/midi/controllers.d.ts.map +1 -0
  95. package/dist/midi/controllers.js +421 -0
  96. package/dist/midi/controllers.js.map +1 -0
  97. package/dist/midi/curveCut.d.ts +17 -0
  98. package/dist/midi/curveCut.d.ts.map +1 -0
  99. package/dist/midi/curveCut.js +45 -0
  100. package/dist/midi/curveCut.js.map +1 -0
  101. package/dist/midi/edit.d.ts +13 -1
  102. package/dist/midi/edit.d.ts.map +1 -1
  103. package/dist/midi/edit.js +19 -3
  104. package/dist/midi/edit.js.map +1 -1
  105. package/dist/midi/engines/bl1.d.ts +10 -1
  106. package/dist/midi/engines/bl1.d.ts.map +1 -1
  107. package/dist/midi/engines/bl1.js +26 -6
  108. package/dist/midi/engines/bl1.js.map +1 -1
  109. package/dist/midi/engines/dr1.d.ts +11 -1
  110. package/dist/midi/engines/dr1.d.ts.map +1 -1
  111. package/dist/midi/engines/dr1.js +21 -3
  112. package/dist/midi/engines/dr1.js.map +1 -1
  113. package/dist/midi/engines/dsp.d.ts +1 -1
  114. package/dist/midi/engines/dsp.d.ts.map +1 -1
  115. package/dist/midi/engines/dsp.js +10 -2
  116. package/dist/midi/engines/dsp.js.map +1 -1
  117. package/dist/midi/engines/wt1.d.ts +10 -1
  118. package/dist/midi/engines/wt1.d.ts.map +1 -1
  119. package/dist/midi/engines/wt1.js +28 -5
  120. package/dist/midi/engines/wt1.js.map +1 -1
  121. package/dist/midi/events.d.ts +13 -4
  122. package/dist/midi/events.d.ts.map +1 -1
  123. package/dist/midi/events.js +33 -6
  124. package/dist/midi/events.js.map +1 -1
  125. package/dist/midi/expression.d.ts +25 -0
  126. package/dist/midi/expression.d.ts.map +1 -0
  127. package/dist/midi/expression.js +69 -0
  128. package/dist/midi/expression.js.map +1 -0
  129. package/dist/midi/index.d.ts +8 -0
  130. package/dist/midi/index.d.ts.map +1 -1
  131. package/dist/midi/index.js +8 -0
  132. package/dist/midi/index.js.map +1 -1
  133. package/dist/midi/instrument.d.ts.map +1 -1
  134. package/dist/midi/instrument.js +4 -0
  135. package/dist/midi/instrument.js.map +1 -1
  136. package/dist/midi/noteFunctions.d.ts +29 -0
  137. package/dist/midi/noteFunctions.d.ts.map +1 -0
  138. package/dist/midi/noteFunctions.js +213 -0
  139. package/dist/midi/noteFunctions.js.map +1 -0
  140. package/dist/midi/notes.d.ts +7 -1
  141. package/dist/midi/notes.d.ts.map +1 -1
  142. package/dist/midi/notes.js +43 -1
  143. package/dist/midi/notes.js.map +1 -1
  144. package/dist/midi/notesEdit.d.ts +13 -0
  145. package/dist/midi/notesEdit.d.ts.map +1 -1
  146. package/dist/midi/notesEdit.js +73 -2
  147. package/dist/midi/notesEdit.js.map +1 -1
  148. package/dist/midi/presets.d.ts +1 -1
  149. package/dist/midi/regionParams.d.ts +41 -0
  150. package/dist/midi/regionParams.d.ts.map +1 -0
  151. package/dist/midi/regionParams.js +164 -0
  152. package/dist/midi/regionParams.js.map +1 -0
  153. package/dist/midi/sampler.d.ts +2 -2
  154. package/dist/midi/sampler.d.ts.map +1 -1
  155. package/dist/midi/sampler.js +99 -21
  156. package/dist/midi/sampler.js.map +1 -1
  157. package/dist/midi/stepEditor.d.ts +50 -0
  158. package/dist/midi/stepEditor.d.ts.map +1 -0
  159. package/dist/midi/stepEditor.js +118 -0
  160. package/dist/midi/stepEditor.js.map +1 -0
  161. package/dist/midi/stepPattern.d.ts +173 -0
  162. package/dist/midi/stepPattern.d.ts.map +1 -0
  163. package/dist/midi/stepPattern.js +1390 -0
  164. package/dist/midi/stepPattern.js.map +1 -0
  165. package/dist/midi/stepPatternExpand.d.ts +149 -0
  166. package/dist/midi/stepPatternExpand.d.ts.map +1 -0
  167. package/dist/midi/stepPatternExpand.js +1068 -0
  168. package/dist/midi/stepPatternExpand.js.map +1 -0
  169. package/dist/midi/stepPatternLibrary.d.ts +65 -0
  170. package/dist/midi/stepPatternLibrary.d.ts.map +1 -0
  171. package/dist/midi/stepPatternLibrary.js +640 -0
  172. package/dist/midi/stepPatternLibrary.js.map +1 -0
  173. package/dist/midi/tempo.d.ts.map +1 -1
  174. package/dist/midi/tempo.js +3 -0
  175. package/dist/midi/tempo.js.map +1 -1
  176. package/dist/midi/voice.d.ts +51 -5
  177. package/dist/midi/voice.d.ts.map +1 -1
  178. package/dist/midi/voice.js +191 -21
  179. package/dist/midi/voice.js.map +1 -1
  180. package/dist/model3dBake.d.ts +13 -0
  181. package/dist/model3dBake.d.ts.map +1 -1
  182. package/dist/model3dBake.js +25 -0
  183. package/dist/model3dBake.js.map +1 -1
  184. package/dist/model3dCameraDescription.d.ts +11 -6
  185. package/dist/model3dCameraDescription.d.ts.map +1 -1
  186. package/dist/model3dCameraDescription.js +112 -30
  187. package/dist/model3dCameraDescription.js.map +1 -1
  188. package/dist/model3dReference.d.ts +25 -4
  189. package/dist/model3dReference.d.ts.map +1 -1
  190. package/dist/model3dReference.js +19 -6
  191. package/dist/model3dReference.js.map +1 -1
  192. package/dist/music/align.d.ts +111 -0
  193. package/dist/music/align.d.ts.map +1 -0
  194. package/dist/music/align.js +282 -0
  195. package/dist/music/align.js.map +1 -0
  196. package/dist/music/cut.d.ts +33 -0
  197. package/dist/music/cut.d.ts.map +1 -0
  198. package/dist/music/cut.js +50 -0
  199. package/dist/music/cut.js.map +1 -0
  200. package/dist/music/frames.d.ts +51 -0
  201. package/dist/music/frames.d.ts.map +1 -0
  202. package/dist/music/frames.js +110 -0
  203. package/dist/music/frames.js.map +1 -0
  204. package/dist/music/gain.d.ts +24 -0
  205. package/dist/music/gain.d.ts.map +1 -0
  206. package/dist/music/gain.js +38 -0
  207. package/dist/music/gain.js.map +1 -0
  208. package/dist/music/index.d.ts +9 -0
  209. package/dist/music/index.d.ts.map +1 -0
  210. package/dist/music/index.js +9 -0
  211. package/dist/music/index.js.map +1 -0
  212. package/dist/music/plan.d.ts +104 -0
  213. package/dist/music/plan.d.ts.map +1 -0
  214. package/dist/music/plan.js +300 -0
  215. package/dist/music/plan.js.map +1 -0
  216. package/dist/music/process.d.ts +9 -0
  217. package/dist/music/process.d.ts.map +1 -0
  218. package/dist/music/process.js +9 -0
  219. package/dist/music/process.js.map +1 -0
  220. package/dist/music/roles.d.ts +14 -0
  221. package/dist/music/roles.d.ts.map +1 -0
  222. package/dist/music/roles.js +30 -0
  223. package/dist/music/roles.js.map +1 -0
  224. package/dist/music/splice.d.ts +37 -0
  225. package/dist/music/splice.d.ts.map +1 -0
  226. package/dist/music/splice.js +67 -0
  227. package/dist/music/splice.js.map +1 -0
  228. package/dist/music/tempoRules.d.ts +41 -0
  229. package/dist/music/tempoRules.d.ts.map +1 -0
  230. package/dist/music/tempoRules.js +59 -0
  231. package/dist/music/tempoRules.js.map +1 -0
  232. package/dist/ops/apply.d.ts.map +1 -1
  233. package/dist/ops/apply.js +856 -234
  234. package/dist/ops/apply.js.map +1 -1
  235. package/dist/ops/automation.d.ts +6 -0
  236. package/dist/ops/automation.d.ts.map +1 -0
  237. package/dist/ops/automation.js +217 -0
  238. package/dist/ops/automation.js.map +1 -0
  239. package/dist/ops/barTime.d.ts +14 -0
  240. package/dist/ops/barTime.d.ts.map +1 -0
  241. package/dist/ops/barTime.js +33 -0
  242. package/dist/ops/barTime.js.map +1 -0
  243. package/dist/ops/chords.d.ts +43 -0
  244. package/dist/ops/chords.d.ts.map +1 -0
  245. package/dist/ops/chords.js +691 -0
  246. package/dist/ops/chords.js.map +1 -0
  247. package/dist/ops/groupBake.d.ts +24 -0
  248. package/dist/ops/groupBake.d.ts.map +1 -0
  249. package/dist/ops/groupBake.js +81 -0
  250. package/dist/ops/groupBake.js.map +1 -0
  251. package/dist/ops/index.d.ts +7 -0
  252. package/dist/ops/index.d.ts.map +1 -1
  253. package/dist/ops/index.js +5 -0
  254. package/dist/ops/index.js.map +1 -1
  255. package/dist/ops/join.d.ts +20 -0
  256. package/dist/ops/join.d.ts.map +1 -0
  257. package/dist/ops/join.js +265 -0
  258. package/dist/ops/join.js.map +1 -0
  259. package/dist/ops/loop.d.ts +29 -0
  260. package/dist/ops/loop.d.ts.map +1 -0
  261. package/dist/ops/loop.js +107 -0
  262. package/dist/ops/loop.js.map +1 -0
  263. package/dist/ops/midiMix.d.ts +41 -0
  264. package/dist/ops/midiMix.d.ts.map +1 -0
  265. package/dist/ops/midiMix.js +522 -0
  266. package/dist/ops/midiMix.js.map +1 -0
  267. package/dist/ops/op.d.ts +61 -11
  268. package/dist/ops/op.d.ts.map +1 -1
  269. package/dist/ops/op.js +60 -1
  270. package/dist/ops/op.js.map +1 -1
  271. package/dist/ops/parse.d.ts.map +1 -1
  272. package/dist/ops/parse.js +308 -4
  273. package/dist/ops/parse.js.map +1 -1
  274. package/dist/ops/pasteRange.d.ts +46 -0
  275. package/dist/ops/pasteRange.d.ts.map +1 -0
  276. package/dist/ops/pasteRange.js +276 -0
  277. package/dist/ops/pasteRange.js.map +1 -0
  278. package/dist/ops/plugin.d.ts +57 -0
  279. package/dist/ops/plugin.d.ts.map +1 -0
  280. package/dist/ops/plugin.js +875 -0
  281. package/dist/ops/plugin.js.map +1 -0
  282. package/dist/ops/sections.d.ts +98 -0
  283. package/dist/ops/sections.d.ts.map +1 -0
  284. package/dist/ops/sections.js +930 -0
  285. package/dist/ops/sections.js.map +1 -0
  286. package/dist/ops/serialize.d.ts +79 -1
  287. package/dist/ops/serialize.d.ts.map +1 -1
  288. package/dist/ops/serialize.js +85 -3
  289. package/dist/ops/serialize.js.map +1 -1
  290. package/dist/ops/stepPattern.d.ts +44 -0
  291. package/dist/ops/stepPattern.d.ts.map +1 -0
  292. package/dist/ops/stepPattern.js +2106 -0
  293. package/dist/ops/stepPattern.js.map +1 -0
  294. package/dist/ops/stepPatternFolders.d.ts +54 -0
  295. package/dist/ops/stepPatternFolders.d.ts.map +1 -0
  296. package/dist/ops/stepPatternFolders.js +299 -0
  297. package/dist/ops/stepPatternFolders.js.map +1 -0
  298. package/dist/ops/types.d.ts +238 -2
  299. package/dist/ops/types.d.ts.map +1 -1
  300. package/dist/rippleEdit.d.ts +5 -1
  301. package/dist/rippleEdit.d.ts.map +1 -1
  302. package/dist/rippleEdit.js +24 -9
  303. package/dist/rippleEdit.js.map +1 -1
  304. package/dist/script.d.ts +2 -1
  305. package/dist/script.d.ts.map +1 -1
  306. package/dist/script.js +3 -2
  307. package/dist/script.js.map +1 -1
  308. package/dist/splitClip.d.ts +29 -1
  309. package/dist/splitClip.d.ts.map +1 -1
  310. package/dist/splitClip.js +231 -1
  311. package/dist/splitClip.js.map +1 -1
  312. package/dist/storyboard.d.ts +14 -0
  313. package/dist/storyboard.d.ts.map +1 -1
  314. package/dist/storyboard.js +31 -0
  315. package/dist/storyboard.js.map +1 -1
  316. package/dist/testing/host-ops.js +3 -3
  317. package/dist/testing/host-ops.js.map +1 -1
  318. package/dist/testing/ops.d.ts +6 -1
  319. package/dist/testing/ops.d.ts.map +1 -1
  320. package/dist/testing/ops.js +823 -11
  321. package/dist/testing/ops.js.map +1 -1
  322. package/dist/timeRemap.d.ts +2 -2
  323. package/dist/timeRemap.d.ts.map +1 -1
  324. package/dist/timeRemap.js +18 -0
  325. package/dist/timeRemap.js.map +1 -1
  326. package/dist/trimClip.d.ts +1 -1
  327. package/dist/trimClip.d.ts.map +1 -1
  328. package/dist/trimClip.js +41 -7
  329. package/dist/trimClip.js.map +1 -1
  330. package/dist/types.d.ts +307 -16
  331. package/dist/types.d.ts.map +1 -1
  332. package/dist/types.js.map +1 -1
  333. package/package.json +11 -5
  334. package/dist/render/curveFitting.d.ts +0 -28
  335. package/dist/render/curveFitting.d.ts.map +0 -1
  336. package/dist/render/curveFitting.js +0 -94
  337. package/dist/render/curveFitting.js.map +0 -1
package/dist/types.d.ts CHANGED
@@ -9,11 +9,12 @@ import type { BlendMode } from "@nodetool-ai/gpu";
9
9
  import type { ClipFadeShape } from "./audioFade.js";
10
10
  export type { BlendMode };
11
11
  import type { ClipAnimation } from "./animation/types.js";
12
- import type { TimelineBeat, TimelineSetup, TimelineSetupStage } from "@nodetool-ai/protocol/api-schemas/timeline.js";
12
+ import type { JuceMidiInstrument, ModalMidiInstrument, MusicGenerationRecord, MusicKey, MusicRole, MusicTask, TimelineBeat, TimelineMusic, TimelineSetup, TimelineSetupStage } from "@nodetool-ai/protocol/api-schemas/timeline.js";
13
13
  import type { ProductionCandidateResult, ProductionGenerationSnapshot } from "@nodetool-ai/protocol";
14
14
  import type { LineDeliveryRequest } from "./lineDelivery.js";
15
15
  export type { TimelineBeat, TimelineSetup, TimelineSetupStage };
16
16
  export type { ProductionGenerationSnapshot } from "@nodetool-ai/protocol";
17
+ export type { MusicGenerationRecord, MusicKey, MusicRole, MusicTask, TimelineMusic };
17
18
  export interface TimelineSequence {
18
19
  /**
19
20
  * The document schema version the stored revision was written in, on a
@@ -65,6 +66,8 @@ export interface TimelineSequence {
65
66
  tempo?: TimelineTempo;
66
67
  /** The mix bus. Absent means 0 dB with no effects. */
67
68
  master?: TimelineMasterChannel;
69
+ /** Marks a music project and holds its prompt history (MUSIC-MODE.md MD3). */
70
+ music?: TimelineMusic;
68
71
  /**
69
72
  * Guided video-flow state (PRD § 8.5). Absent on every sequence not built
70
73
  * through the flow, which is what makes those open straight in the editor.
@@ -376,23 +379,29 @@ export interface ClipModel3DStyle {
376
379
  /**
377
380
  * A Blender render of this clip at a given style. The scene model plays it
378
381
  * as video while `dependencyHash` matches the live style; a style edit makes
379
- * it stale and the live 3D layer draws again.
382
+ * it stale and the live 3D layer draws again. `assetRevision` is the glTF
383
+ * asset's `updated_at` at bake time: a set saved in place keeps its id, so
384
+ * only the revision shows the bake was rendered from an older set.
380
385
  */
381
386
  bake?: {
382
387
  assetId: string;
383
388
  dependencyHash: string;
389
+ assetRevision?: string;
384
390
  };
385
391
  /**
386
392
  * A grey render of this clip's span, kept as a video asset that a video
387
393
  * model follows when a storyboard shot is generated (Blockout 3D). It is
388
394
  * never drawn on the timeline. `dependencyHash` is
389
- * `computeModel3DReferenceHash` at render time, so an edit to the set, the
390
- * camera or the span marks it stale.
395
+ * `computeModel3DReferenceHash` at render time, so an edit to the camera,
396
+ * the span or the sequence marks it stale. `assetRevision` is the set
397
+ * asset's `updated_at` at render time: the set is saved in place under the
398
+ * same id, so the hash alone cannot see an edit to it.
391
399
  */
392
400
  reference?: {
393
401
  assetId: string;
394
402
  dependencyHash: string;
395
403
  pass: "clay" | "depth" | "normal";
404
+ assetRevision?: string;
396
405
  };
397
406
  }
398
407
  /**
@@ -454,7 +463,18 @@ export interface TimelineTrack {
454
463
  * strips it.
455
464
  */
456
465
  automation?: AutomationLane[];
457
- }
466
+ /**
467
+ * Automation mode. Missing means `read`.
468
+ * Must also exist on the protocol zod schema or PATCH strips it.
469
+ */
470
+ automationMode?: AutomationMode;
471
+ /** The stem this track holds in a music project (MUSIC-MODE.md MD4). */
472
+ musicRole?: MusicRole;
473
+ /** Default Step Sequencer template for new pattern regions on this track (SQ45). */
474
+ stepTemplate?: StepPattern;
475
+ }
476
+ /** `off` plays no lane, `read` plays them, the others also record a pass. */
477
+ export type AutomationMode = "off" | "read" | "touch" | "latch" | "write";
458
478
  /**
459
479
  * The control an automation lane drives.
460
480
  *
@@ -573,12 +593,135 @@ export interface ClipHarmony {
573
593
  /** Key root pitch class. Absent means the first chord's root, else C. */
574
594
  scaleKey?: number;
575
595
  }
596
+ /** Step lengths in note values, integer ticks at MIDI_PPQ = 960 (SQ6). */
597
+ export type StepRate = "4" | "2" | "1" | "1/2" | "1/4" | "1/8" | "1/16" | "1/32" | "1/64" | "1T" | "2T" | "4T" | "8T" | "16T" | "32T" | "1D" | "2D" | "4D" | "8D" | "16D" | "32D" | "64D";
598
+ export type StepPlaybackMode = "forward" | "backward" | "pingPong" | "pendulum" | "wander" | "shuffle" | "random";
599
+ export type StepEditMode = "onOff" | "velocity" | "value" | "gate" | "tie" | "note" | "octave" | "repeat" | "chance" | "offset" | "stepRate" | "skip" | "loop";
600
+ export type StepAutomationMode = "latch" | "slide";
601
+ export type StepSwingDivision = "1/8" | "1/16";
602
+ export type StepPitchSource = "off" | "key" | "chords";
603
+ export type StepRowSort = "none" | "typeAsc" | "typeDesc" | "typeAndNoteAsc" | "typeAndNoteDesc" | "typeAndNameAsc" | "typeAndNameDesc" | "typeAndKitPadAsc" | "typeAndKitPadDesc";
604
+ export type StepScaleId = HarmonyScaleId | "chromatic";
605
+ export interface StepKey {
606
+ /** Pitch class 0 (C) .. 11 (B). */
607
+ tonic: number;
608
+ mode: "major" | "minor";
609
+ }
610
+ export type StepDegree = "root" | "2nd" | "3rd" | "4th" | "5th" | "6th" | "7th";
611
+ export type StepAutomationTarget = {
612
+ kind: "cc";
613
+ cc: number;
614
+ } | {
615
+ kind: "pitchBend";
616
+ } | {
617
+ kind: "channelPressure";
618
+ } | {
619
+ kind: "device";
620
+ deviceId: string;
621
+ param: string;
622
+ };
623
+ export type StepRowAssignment = {
624
+ type: "note";
625
+ pitch: number;
626
+ } | {
627
+ type: "melodic";
628
+ pitch: number;
629
+ } | {
630
+ type: "kit";
631
+ pad: number;
632
+ } | {
633
+ type: "degree";
634
+ degree: StepDegree;
635
+ octave: number;
636
+ } | {
637
+ type: "automation";
638
+ target: StepAutomationTarget;
639
+ };
640
+ export type StepCondition = {
641
+ type: "always";
642
+ } | {
643
+ type: "recurrence";
644
+ iteration: number;
645
+ cycles: number;
646
+ } | {
647
+ type: "first";
648
+ } | {
649
+ type: "last";
650
+ };
651
+ /** One cell of a Step Sequencer row. Omitted fields take the SQ5 defaults. */
652
+ export interface Step {
653
+ on?: boolean;
654
+ velocity?: number;
655
+ gate?: number;
656
+ tie?: boolean;
657
+ note?: number;
658
+ octave?: number;
659
+ repeat?: number;
660
+ chance?: number;
661
+ offset?: number;
662
+ stepRate?: StepRate;
663
+ skip?: boolean;
664
+ value?: number;
665
+ condition?: StepCondition;
666
+ midiChannel?: number;
667
+ articulation?: number;
668
+ velocityRamp?: number;
669
+ velocityCurve?: number;
670
+ distribution?: number;
671
+ }
672
+ /** One row of a Step Sequencer pattern (SQ3). */
673
+ export interface StepRow {
674
+ id: string;
675
+ assignment: StepRowAssignment;
676
+ name?: string;
677
+ color?: string;
678
+ mute: boolean;
679
+ solo: boolean;
680
+ lengthSteps: number;
681
+ loopStart: number;
682
+ loopEnd: number;
683
+ stepRate: StepRate;
684
+ playback: StepPlaybackMode;
685
+ midiChannel: number;
686
+ automationMode: StepAutomationMode;
687
+ subrows: StepEditMode[];
688
+ subrowsExpanded?: boolean;
689
+ steps: Step[];
690
+ }
691
+ /**
692
+ * Step Sequencer pattern carried on a MIDI clip (SQ1, SQ2, D71).
693
+ * A clip with `pattern` does not store `notes` or `controllers`; every
694
+ * renderer derives them with `expandPattern`.
695
+ */
696
+ export interface StepPattern {
697
+ version: 1;
698
+ seed: number;
699
+ lengthSteps: number;
700
+ stepRate: StepRate;
701
+ playback: StepPlaybackMode;
702
+ legato: boolean;
703
+ swing: number;
704
+ swingDivision: StepSwingDivision;
705
+ pitchSource: StepPitchSource;
706
+ key?: StepKey;
707
+ scale: StepScaleId;
708
+ noTranspose: boolean;
709
+ scaleQuantize: boolean;
710
+ midiChannel: number;
711
+ automationMode: StepAutomationMode;
712
+ mono: boolean;
713
+ name: string;
714
+ rowSort?: StepRowSort;
715
+ rows: StepRow[];
716
+ }
576
717
  /**
577
718
  * The master channel every audio and midi track sums into. Absent means
578
- * 0 dB with no effects.
719
+ * 0 dB, centred, with no effects.
579
720
  */
580
721
  export interface TimelineMasterChannel {
581
722
  volumeDb: number;
723
+ /** Stereo balance, -1 (left) to 1 (right). Default 0. */
724
+ pan?: number;
582
725
  /** Audio effects on the summed mix, applied in order before the fader. */
583
726
  effects?: TrackEffect[];
584
727
  }
@@ -586,9 +729,9 @@ export interface TimelineTrackFolder {
586
729
  id: string;
587
730
  name: string;
588
731
  }
589
- export type TrackEffect = TrackGainEffect | TrackEq3Effect | TrackFilterEffect | TrackCompressorEffect | TrackFableEffect | TrackColorCorrectionEffect | TrackVideoBlurEffect | TrackSharpenEffect | TrackVignetteEffect | TrackChromaKeyEffect;
732
+ export type TrackEffect = TrackGainEffect | TrackEq3Effect | TrackFilterEffect | TrackCompressorEffect | TrackFableEffect | TrackVstEffect | TrackColorCorrectionEffect | TrackVideoBlurEffect | TrackSharpenEffect | TrackVignetteEffect | TrackChromaKeyEffect;
590
733
  /** Audio-side effect types. */
591
- export type AudioTrackEffectType = "gain" | "eq3" | "filter" | "compressor" | "fable";
734
+ export type AudioTrackEffectType = "gain" | "eq3" | "filter" | "compressor" | "fable" | "vst";
592
735
  /** Video-side effect types. */
593
736
  export type VideoTrackEffectType = "colorCorrection" | "videoBlur" | "sharpen" | "vignette" | "chromaKey";
594
737
  export interface TrackGainEffect {
@@ -833,6 +976,56 @@ export interface MidiNote {
833
976
  startTick: number;
834
977
  /** Held length in ticks (integer > 0). */
835
978
  durationTick: number;
979
+ /** A muted note is not played and emits no events. It stays editable. */
980
+ muted?: boolean;
981
+ /** MIDI channel 0..15. Absent means 0. The built-in synth ignores it. */
982
+ channel?: number;
983
+ /** Note-off velocity 0..127. Absent keeps the existing output. */
984
+ releaseVelocity?: number;
985
+ /** Per-note expression curves. Ticks count from the note's start. */
986
+ expression?: MidiNoteExpression;
987
+ }
988
+ /** One point of a per-note expression curve. */
989
+ export interface MidiExpressionPoint {
990
+ /** Ticks from the note's start, 0..durationTick. */
991
+ tick: number;
992
+ value: number;
993
+ }
994
+ /**
995
+ * Per-note expression. Pitch is in semitones (-48..48), volume a linear gain
996
+ * (0..4), pan -1..1 and brightness 0..1. Before the first point the value is
997
+ * neutral, between points it interpolates linearly, after the last it holds.
998
+ */
999
+ export interface MidiNoteExpression {
1000
+ pitch?: MidiExpressionPoint[];
1001
+ volume?: MidiExpressionPoint[];
1002
+ pan?: MidiExpressionPoint[];
1003
+ brightness?: MidiExpressionPoint[];
1004
+ }
1005
+ export type MidiControllerKind = "cc" | "pitchBend" | "channelPressure" | "polyPressure";
1006
+ /** One point of a controller lane, in clip content ticks. */
1007
+ export interface MidiControllerPoint {
1008
+ id: string;
1009
+ tick: number;
1010
+ value: number;
1011
+ }
1012
+ /**
1013
+ * A controller lane of a midi clip. Values are 0..127, except pitch bend
1014
+ * (-8192..8191, 0 is centre). Structurally identical to `MidiControllerLane`
1015
+ * in `@nodetool-ai/protocol`; pinned by `tests/midi.protocolCompat.test.ts`.
1016
+ */
1017
+ export interface MidiControllerLane {
1018
+ id: string;
1019
+ kind: MidiControllerKind;
1020
+ /** Required when `kind` is "cc", forbidden otherwise. */
1021
+ cc?: number;
1022
+ /** Required when `kind` is "polyPressure", forbidden otherwise. */
1023
+ pitch?: number;
1024
+ /** MIDI channel 0..15. Absent means 0. */
1025
+ channel?: number;
1026
+ /** Absent means "linear". */
1027
+ interpolation?: "linear" | "step";
1028
+ points: MidiControllerPoint[];
836
1029
  }
837
1030
  /**
838
1031
  * The voice a midi track plays.
@@ -843,15 +1036,31 @@ export interface MidiNote {
843
1036
  * recorded audio assets through MIDI key mappings. `vst` is a third-party VST3
844
1037
  * instrument that the desktop app hosts in a separate process.
845
1038
  */
846
- export type MidiInstrument = SubtractiveMidiInstrument | WavetableMidiInstrument | BassMidiInstrument | DrumMidiInstrument | SamplerMidiInstrument | VstMidiInstrument;
847
- /** Which VST3 plug-in a `vst` instrument loads, as the host's scan reported it. */
1039
+ export type MidiInstrument = SubtractiveMidiInstrument | ModalMidiInstrument | WavetableMidiInstrument | BassMidiInstrument | DrumMidiInstrument | SamplerMidiInstrument | VstMidiInstrument | JuceMidiInstrument;
1040
+ /** Plug-in format reported by the host scan (`vst3` on all platforms, `au` on macOS). */
1041
+ export type VstPluginFormat = "vst3" | "au";
1042
+ /** Which VST3/AU plug-in a `vst` instrument or insert effect loads, as the host's scan reported it. */
848
1043
  export interface VstPluginRef {
849
1044
  /** The host's identifier for the plug-in type inside its bundle. */
850
1045
  uid: string;
851
1046
  name: string;
852
1047
  vendor: string;
853
- /** The `.vst3` bundle on the machine that picked it. */
1048
+ /** The `.vst3` or `.component` bundle on the machine that picked it. */
854
1049
  path: string;
1050
+ /** Plug-in format (`vst3` or `au`). Absent on older VST3 documents. */
1051
+ format?: VstPluginFormat;
1052
+ }
1053
+ /** A third-party VST3/AU insert effect on an audio, MIDI, or master channel. */
1054
+ export interface TrackVstEffect {
1055
+ id: string;
1056
+ type: "vst";
1057
+ enabled: boolean;
1058
+ /** Null until a plug-in is chosen. */
1059
+ plugin: VstPluginRef | null;
1060
+ /** The plug-in's own saved state, base64. Null plays its default sound. */
1061
+ state: string | null;
1062
+ /** Dry/wet mix in 0..1. Default 1. */
1063
+ wet: number;
855
1064
  }
856
1065
  /**
857
1066
  * A VST3 instrument. Only the desktop app can play it: the plug-in is native
@@ -866,16 +1075,40 @@ export interface VstMidiInstrument {
866
1075
  state: string | null;
867
1076
  gainDb: number;
868
1077
  }
869
- /** Recorded audio mapped to MIDI key ranges. Overlapping zones layer. */
1078
+ /** Recorded audio mapped to MIDI key and velocity ranges. Overlapping zones layer. */
1079
+ export type SamplerLoopMode = "oneShot" | "sustain";
870
1080
  export interface SamplerZone {
871
1081
  id: string;
872
1082
  name: string;
873
- /** Persistent audio asset id. Hosts resolve it through their asset store. */
1083
+ /** Persistent audio asset id, or empty string when using a project-relative mediaPath. */
874
1084
  assetId: string;
1085
+ /** Optional project-relative audio file path (WAV/AIFF/FLAC/MP3). */
1086
+ mediaPath?: string;
875
1087
  rootNote: number;
876
1088
  lowNote: number;
877
1089
  highNote: number;
1090
+ /** Inclusive MIDI velocity range (0..127). Defaults to 0..127. */
1091
+ lowVelocity?: number;
1092
+ highVelocity?: number;
878
1093
  gainDb: number;
1094
+ /** Stereo pan in -1..+1. Defaults to 0. */
1095
+ pan?: number;
1096
+ /** Fine tuning offset in cents (-100..+100). Defaults to 0. */
1097
+ tuneCents?: number;
1098
+ /** Overrides instrument-level `oneShot` when present. */
1099
+ loopMode?: SamplerLoopMode;
1100
+ /** Normalized sustain loop start in [0, 1]. Defaults to 0. */
1101
+ loopStart?: number;
1102
+ /** Normalized sustain loop end in [0, 1]. Defaults to 1. */
1103
+ loopEnd?: number;
1104
+ /** Loop seam crossfade length in milliseconds (0..500). Defaults to 10. */
1105
+ loopCrossfadeMs?: number;
1106
+ /** Optional release-triggered audio asset id. */
1107
+ releaseAssetId?: string;
1108
+ /** Optional release-triggered project-relative audio file path. */
1109
+ releaseMediaPath?: string;
1110
+ /** Release sample gain trim in dB (-60..+12). Defaults to 0. */
1111
+ releaseGainDb?: number;
879
1112
  }
880
1113
  export interface SamplerMidiInstrument {
881
1114
  type: "sampler";
@@ -883,7 +1116,19 @@ export interface SamplerMidiInstrument {
883
1116
  /** Percussion ignores note-off and plays the complete recording. */
884
1117
  oneShot: boolean;
885
1118
  attackMs: number;
1119
+ /** Amp envelope decay in ms. Defaults to 100. */
1120
+ decayMs?: number;
1121
+ /** Amp envelope sustain level in 0..1. Defaults to 1. */
1122
+ sustain?: number;
886
1123
  releaseMs: number;
1124
+ /** Velocity response curve in -1..+1 (0 linear, >0 soft, <0 hard). Defaults to 0. */
1125
+ velocityCurve?: number;
1126
+ /** Pitch portamento glide time in ms (0..2000). Defaults to 0. */
1127
+ glideMs?: number;
1128
+ /** Maximum polyphonic voices (1..64). Defaults to 32. */
1129
+ voiceLimit?: number;
1130
+ /** Pitch bend range in semitones (1..24). Defaults to 2. */
1131
+ pitchBendRange?: number;
887
1132
  gainDb: number;
888
1133
  }
889
1134
  /** One oscillator through a lowpass filter and an ADSR envelope. */
@@ -900,6 +1145,12 @@ export interface SubtractiveMidiInstrument {
900
1145
  resonance: number;
901
1146
  gainDb: number;
902
1147
  }
1148
+ /** Resonator model for the physically modeled modal percussion/mallet synth (ported from RipplerX). */
1149
+ export type ModalModelName = "string" | "beam" | "squared" | "membrane" | "plate" | "drumhead" | "marimba" | "openTube" | "closedTube" | "marimba2" | "bell" | "djembe";
1150
+ export type ModalCouplingMode = "parallel" | "serial";
1151
+ export type ModalNoiseFilterMode = "lp" | "bp" | "hp";
1152
+ /** Physically modeled percussion/mallet instrument (dual modal/waveguide resonators, mallet & noise exciters). */
1153
+ export type { ModalMidiInstrument, JuceMidiInstrument };
903
1154
  /** An ADSR envelope, in milliseconds with a 0..1 sustain level. */
904
1155
  export interface MidiEnvelope {
905
1156
  attackMs: number;
@@ -909,7 +1160,7 @@ export interface MidiEnvelope {
909
1160
  releaseMs: number;
910
1161
  }
911
1162
  /** The filter shapes the FableSynth-derived voices offer. */
912
- export type MidiFilterType = "lp12" | "lp24" | "bp12" | "hp12" | "notch";
1163
+ export type MidiFilterType = "lp12" | "lp24" | "bp12" | "hp12" | "notch" | "hp24" | "bp24" | "none";
913
1164
  /** The tonal wavetables WT-1 and BL-1 play. */
914
1165
  export type MidiWavetableName = "prime" | "bloom" | "pulse" | "vox" | "chime" | "glitch";
915
1166
  /** DR-1's percussive tables. A pad can also play any tonal table. */
@@ -923,7 +1174,7 @@ export interface WavetableOscillator {
923
1174
  semitones: number;
924
1175
  /** Further offset in cents. */
925
1176
  fine: number;
926
- /** Output level, 0..1. */
1177
+ /** Output level, 0..1.2. */
927
1178
  level: number;
928
1179
  /** Detuned copies of the oscillator, 1..7. */
929
1180
  unison: number;
@@ -942,7 +1193,7 @@ export interface WavetableMidiInstrument {
942
1193
  oscB: WavetableOscillator;
943
1194
  /** Sine sub-oscillator level, 0..1. */
944
1195
  subLevel: number;
945
- /** Sub octave below the note: -1 or -2. */
1196
+ /** Sub octave below the note: -2, -1, or 0. */
946
1197
  subOctave: number;
947
1198
  /** White noise level, 0..1. */
948
1199
  noiseLevel: number;
@@ -1074,9 +1325,18 @@ export interface TimelineTempo {
1074
1325
  beatsPerBar: number;
1075
1326
  beatUnit: number;
1076
1327
  };
1328
+ /** Project key for music generation. Absent lets the model pick one. */
1329
+ key?: MusicKey;
1077
1330
  }
1078
1331
  /** Kind of sound on a clip. Mirrors `clipAudioRole` in the protocol schema. */
1079
1332
  export type ClipAudioRole = "dialogue" | "music" | "sfx" | "ambience";
1333
+ /** The grids a region quantize may use. Mirrors `QUANTIZE_DIVISIONS`. */
1334
+ export type MidiRegionGrid = "1/4" | "1/8" | "1/16" | "1/32" | "1/8T" | "1/16T";
1335
+ export interface MidiRegionQuantize {
1336
+ grid: MidiRegionGrid;
1337
+ /** 0..100. */
1338
+ strength: number;
1339
+ }
1080
1340
  export interface TimelineClip {
1081
1341
  id: string;
1082
1342
  trackId: string;
@@ -1085,6 +1345,21 @@ export interface TimelineClip {
1085
1345
  durationMs: number;
1086
1346
  inPointMs?: number;
1087
1347
  outPointMs?: number;
1348
+ /**
1349
+ * Region loop (CE3). When set and below `durationMs`, the window
1350
+ * `[inPointMs, inPointMs + loopLengthMs)` repeats until `durationMs`.
1351
+ * Midi and audio clips only. Absent means no loop.
1352
+ */
1353
+ loopLengthMs?: number;
1354
+ /**
1355
+ * Non-destructive midi region parameters (CE6, D53). They apply at playback,
1356
+ * export and in the note lines. The stored notes stay as written.
1357
+ * `transpose` is -48..48 semitones, `velocityOffset` -127..127.
1358
+ */
1359
+ transpose?: number;
1360
+ velocityOffset?: number;
1361
+ /** Snap onsets to `grid` by `strength` percent (0..100). */
1362
+ quantize?: MidiRegionQuantize;
1088
1363
  mediaType: ClipMediaType;
1089
1364
  sourceType: "imported" | "generated";
1090
1365
  /** Defaults to "workflow" when absent on legacy persisted data. */
@@ -1351,8 +1626,22 @@ export interface TimelineClip {
1351
1626
  * also exist on the protocol zod schema or PATCH strips it.
1352
1627
  */
1353
1628
  notes?: MidiNote[];
1629
+ /** Controller lanes of a `midi` clip, in content ticks. */
1630
+ controllers?: MidiControllerLane[];
1354
1631
  /** Arp, chord comping or scale snapping of a `midi` clip. */
1355
1632
  harmony?: ClipHarmony;
1633
+ /** Step Sequencer pattern carried by a pattern region (D71). Mutually exclusive with `notes`. */
1634
+ pattern?: StepPattern;
1635
+ /** Pattern phase in content ticks for split/left-trimmed pattern regions (SQ23, SQ25, D87). */
1636
+ patternPhaseTicks?: number;
1637
+ /** Per-row cycle state preserved across unrolled loop repeats (SQ13, SQ25). */
1638
+ patternRowCycles?: Record<string, PatternRowCycleState>;
1639
+ }
1640
+ /** Per-row cycle state carried across unrolled loop repeats (SQ13, SQ25). */
1641
+ export interface PatternRowCycleState {
1642
+ cycleOffset: number;
1643
+ lastCycle?: number;
1644
+ wanderPos?: number;
1356
1645
  }
1357
1646
  /**
1358
1647
  * A shape mask on one clip, in the layer's own normalized 0..1 space so it
@@ -2465,6 +2754,8 @@ export interface ClipVersion {
2465
2754
  strength?: number;
2466
2755
  resolution?: string;
2467
2756
  };
2757
+ /** Generation record of a music take (MUSIC-MODE.md MD5). */
2758
+ musicGeneration?: MusicGenerationRecord;
2468
2759
  }
2469
2760
  export interface TimelineMarker {
2470
2761
  id: string;