@nodetool-ai/timeline 0.8.19 → 0.8.20

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