@motionscript/audio 0.1.0-alpha.6 → 0.1.0-alpha.7

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @motionscript/audio
2
2
 
3
+ ## 0.1.0-alpha.7
4
+
3
5
  ## 0.1.0-alpha.6
4
6
 
5
7
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/audio",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-alpha.7",
4
4
  "exports": {
5
5
  ".": "dist/browser/index.js",
6
6
  "./kit": "dist/browser/kit.js"
@@ -84,7 +84,35 @@ export declare const FullWaveform: import("@motionscript/sdk").Component<"fullWa
84
84
  readonly fill: import("@motionscript/sdk").Type<Fill, FillResolved[], false>;
85
85
  /** …and the bars behind it. */
86
86
  readonly playedFill: import("@motionscript/sdk").Type<Fill, FillResolved[], false>;
87
- }>, null>>;
87
+ }>, null, import("@motionscript/sdk").BuiltNode<import("@motionscript/sdk").Merge<import("@motionscript/sdk").Box2DState, {
88
+ /** The baked recording. See {@link AudioEnvelope} for why it is baked. */
89
+ readonly envelope: import("@motionscript/sdk").Type<AudioEnvelope, AudioEnvelope, false>;
90
+ /** How many columns the whole file is drawn as. */
91
+ readonly bars: 120;
92
+ /** Space between bars, as a fraction of the pitch. See {@link layOutBars}. */
93
+ readonly gap: 0.3;
94
+ /** Corner radius of a bar, capped at half its width. */
95
+ readonly radius: 2;
96
+ /** How much of the file reads as played, `0`–`1`. Tweenable. */
97
+ readonly progress: 0;
98
+ /** Drive `progress` from the node's own clock instead of the prop. */
99
+ readonly follow: false;
100
+ /** Multiplies every magnitude — a quiet track pulled up to fill its box. */
101
+ readonly gain: 1;
102
+ /** How much of the box a silent bar still occupies, `0`–`1`. */
103
+ readonly floor: 0.015;
104
+ readonly align: import("@motionscript/sdk").Type<"center" | "bottom", "center" | "bottom", false>;
105
+ /** Colour each voice's turns rather than splitting on played / not played. */
106
+ readonly byVoice: false;
107
+ /** A colour per voice index. Short or empty falls back to the palette. */
108
+ readonly voiceColors: import("@motionscript/sdk").Type<string[], string[], false>;
109
+ /** The bars ahead of the playhead. */
110
+ readonly fill: import("@motionscript/sdk").Type<Fill, FillResolved[], false>;
111
+ /** …and the bars behind it. */
112
+ readonly playedFill: import("@motionscript/sdk").Type<Fill, FillResolved[], false>;
113
+ }>, {
114
+ readonly sweep: unknown;
115
+ }, _Node2D<_Node2DProps>>>>;
88
116
  export type FullWaveform = NodeOf<typeof FullWaveform>;
89
117
  export type FullWaveformProps = NonNullable<Parameters<typeof FullWaveform>[0]>;
90
118
  //# sourceMappingURL=full-waveform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"full-waveform.d.ts","sourceRoot":"","sources":["../../src/waveform/full-waveform.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,IAAI,EACT,KAAK,YAAY,EACjB,KAAK,MAAM,EAGX,KAAK,MAAM,IAAI,OAAO,EACtB,KAAK,WAAW,IAAI,YAAY,EACjC,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AAc/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,YAAY;IAGrB,0EAA0E;;IAE1E,mDAAmD;;IAEnD,8EAA8E;;IAE9E,wDAAwD;;IAExD,gEAAgE;;IAEhE,sEAAsE;;IAEtE,4EAA4E;;IAE5E,gEAAgE;;;IAGhE,8EAA8E;;IAE9E,0EAA0E;;IAE1E,sCAAsC;;IAEtC,+BAA+B;;;;;IAvB/B,0EAA0E;;IAE1E,mDAAmD;;IAEnD,8EAA8E;;IAE9E,wDAAwD;;IAExD,gEAAgE;;IAEhE,sEAAsE;;IAEtE,4EAA4E;;IAE5E,gEAAgE;;;IAGhE,8EAA8E;;IAE9E,0EAA0E;;IAE1E,sCAAsC;;IAEtC,+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AO,YAAY,CAAC,CAAA;AACtD,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
@@ -93,7 +93,37 @@ export declare const LiveWaveform: import("@motionscript/sdk").Component<"liveWa
93
93
  /** A colour per voice index. Short or empty falls back to the palette. */
94
94
  readonly voiceColors: import("@motionscript/sdk").Type<string[], string[], false>;
95
95
  readonly fill: import("@motionscript/sdk").Type<Fill, FillResolved[], false>;
96
- }>, null>>;
96
+ }>, null, import("@motionscript/sdk").BuiltNode<import("@motionscript/sdk").Merge<import("@motionscript/sdk").Box2DState, {
97
+ /** The baked recording. See {@link AudioEnvelope} for why it is baked. */
98
+ readonly envelope: import("@motionscript/sdk").Type<AudioEnvelope, AudioEnvelope, false>;
99
+ /** How many bars the visualiser is made of. */
100
+ readonly bars: 48;
101
+ /** Space between bars, as a fraction of the pitch. */
102
+ readonly gap: 0.35;
103
+ readonly radius: 4;
104
+ /** How many seconds of audio are on screen at once. */
105
+ readonly window: 3;
106
+ /** Seconds into the file the node's first frame shows. */
107
+ readonly offset: 0;
108
+ /** Advance with the scene clock. Off freezes the picture at `offset`. */
109
+ readonly playing: true;
110
+ /** Multiplies every magnitude before it is clamped. */
111
+ readonly gain: 1.4;
112
+ /** How much of the box a silent bar still occupies, `0`–`1`. */
113
+ readonly floor: 0.04;
114
+ readonly align: import("@motionscript/sdk").Type<"center" | "bottom", "center" | "bottom", false>;
115
+ readonly style: import("@motionscript/sdk").Type<"bars" | "line" | "blocks", "bars" | "line" | "blocks", false>;
116
+ /**
117
+ * Show only this voice's activity, by index into the recording's own
118
+ * numbering. `-1` — the default — is every voice.
119
+ */
120
+ readonly speaker: -1;
121
+ /** Colour each bar by whoever is speaking in it. */
122
+ readonly byVoice: false;
123
+ /** A colour per voice index. Short or empty falls back to the palette. */
124
+ readonly voiceColors: import("@motionscript/sdk").Type<string[], string[], false>;
125
+ readonly fill: import("@motionscript/sdk").Type<Fill, FillResolved[], false>;
126
+ }>, {}, _Node2D<_Node2DProps>>>>;
97
127
  export type LiveWaveform = NodeOf<typeof LiveWaveform>;
98
128
  export type LiveWaveformProps = NonNullable<Parameters<typeof LiveWaveform>[0]>;
99
129
  //# sourceMappingURL=live-waveform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"live-waveform.d.ts","sourceRoot":"","sources":["../../src/waveform/live-waveform.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,IAAI,EACT,KAAK,YAAY,EACjB,KAAK,MAAM,EAGX,KAAK,MAAM,IAAI,OAAO,EACtB,KAAK,WAAW,IAAI,YAAY,EACjC,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAIL,KAAK,aAAa,EAEnB,MAAM,YAAY,CAAA;AAYnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,YAAY;IAGrB,0EAA0E;;IAE1E,+CAA+C;;IAE/C,sDAAsD;;;IAGtD,uDAAuD;;IAEvD,0DAA0D;;IAE1D,yEAAyE;;IAEzE,uDAAuD;;IAEvD,gEAAgE;;;;IAIhE;;;OAGG;;IAEH,oDAAoD;;IAEpD,0EAA0E;;;;IA1B1E,0EAA0E;;IAE1E,+CAA+C;;IAE/C,sDAAsD;;;IAGtD,uDAAuD;;IAEvD,0DAA0D;;IAE1D,yEAAyE;;IAEzE,uDAAuD;;IAEvD,gEAAgE;;;;IAIhE;;;OAGG;;IAEH,oDAAoD;;IAEpD,0EAA0E;;;UAU5E,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,YAAY,CAAC,CAAA;AACtD,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"live-waveform.d.ts","sourceRoot":"","sources":["../../src/waveform/live-waveform.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,IAAI,EACT,KAAK,YAAY,EACjB,KAAK,MAAM,EAGX,KAAK,MAAM,IAAI,OAAO,EACtB,KAAK,WAAW,IAAI,YAAY,EACjC,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAIL,KAAK,aAAa,EAEnB,MAAM,YAAY,CAAA;AAYnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,YAAY;IAGrB,0EAA0E;;IAE1E,+CAA+C;;IAE/C,sDAAsD;;;IAGtD,uDAAuD;;IAEvD,0DAA0D;;IAE1D,yEAAyE;;IAEzE,uDAAuD;;IAEvD,gEAAgE;;;;IAIhE;;;OAGG;;IAEH,oDAAoD;;IAEpD,0EAA0E;;;;IA1B1E,0EAA0E;;IAE1E,+CAA+C;;IAE/C,sDAAsD;;;IAGtD,uDAAuD;;IAEvD,0DAA0D;;IAE1D,yEAAyE;;IAEzE,uDAAuD;;IAEvD,gEAAgE;;;;IAIhE;;;OAGG;;IAEH,oDAAoD;;IAEpD,0EAA0E;;;;IA1B1E,0EAA0E;;IAE1E,+CAA+C;;IAE/C,sDAAsD;;;IAGtD,uDAAuD;;IAEvD,0DAA0D;;IAE1D,yEAAyE;;IAEzE,uDAAuD;;IAEvD,gEAAgE;;;;IAIhE;;;OAGG;;IAEH,oDAAoD;;IAEpD,0EAA0E;;;gCAU5E,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,YAAY,CAAC,CAAA;AACtD,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/audio",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-alpha.7",
4
4
  "type": "module",
5
5
  "description": "Waveform components for Motion Script: a full recording drawn as bars, and a live meter that moves with playback. Both draw a loudness envelope the host supplies.",
6
6
  "repository": {
@@ -49,7 +49,7 @@
49
49
  ],
50
50
  "license": "Apache-2.0",
51
51
  "peerDependencies": {
52
- "@motionscript/sdk": "^0.1.0-alpha.6"
52
+ "@motionscript/sdk": "^0.1.0-alpha.7"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/node": "^25.6.2",
@@ -60,8 +60,8 @@
60
60
  "typescript": "^6.0.3",
61
61
  "typescript-eslint": "^8.48.0",
62
62
  "vitest": "^4.1.5",
63
- "@motionscript/sdk": "0.1.0-alpha.6",
64
- "@motionscript/core": "0.1.0-alpha.6"
63
+ "@motionscript/core": "0.1.0-alpha.7",
64
+ "@motionscript/sdk": "0.1.0-alpha.7"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json --resolve-full-paths && node ../../../scripts/build-browser.mjs",