@m4l-jweb/surface 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.ts +24 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l-jweb/surface",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "m4l-jweb: declare a device's Live parameters as code - the surface Push actually sees - plus a mocked-Live dev harness.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "peerDependencies": {
26
26
  "react": ">=18",
27
- "@m4l-jweb/bridge": "1.1.0"
27
+ "@m4l-jweb/bridge": "1.2.0"
28
28
  },
29
29
  "peerDependenciesMeta": {
30
30
  "react": {
package/src/index.ts CHANGED
@@ -164,6 +164,30 @@ export interface WindowSpec {
164
164
  * primitive rather than changing the first.
165
165
  */
166
166
  audio?: boolean;
167
+ /**
168
+ * Output latency of the sounding window's `[jweb~]`, in milliseconds - the ring
169
+ * buffer between Chromium's audio thread and MSP. Max 9 documents 0 as the
170
+ * minimum (~23 ms at 44.1kHz, ~21 ms at 48kHz), warns that the minimum "may
171
+ * result in occasional drop-outs or distortion", and caps the maximum at three
172
+ * times the minimum. Unset leaves the object's own default.
173
+ *
174
+ * Only meaningful with `audio: true`; ignored otherwise.
175
+ */
176
+ latency?: number;
177
+ /**
178
+ * The `rendermode` attribute stamped on the window's jweb object:
179
+ * 0 = onscreen, 1 = offscreen. The Max reference notes offscreen "is slower".
180
+ * Default is 1, which is what every generated window has shipped with so far.
181
+ */
182
+ rendermode?: 0 | 1;
183
+ /**
184
+ * Report interval of the window's level tap (`[peakamp~ N]`), in milliseconds.
185
+ * Default 10, which is 100 float messages per second per channel into the
186
+ * wrapper's [js]. Raise it to trade meter smoothness for message traffic.
187
+ *
188
+ * Only meaningful with `audio: true`; ignored otherwise.
189
+ */
190
+ levelInterval?: number;
167
191
  /**
168
192
  * Window content from a PREBUILT static directory rather than a component of
169
193
  * ours - a whole site, built by something else (its own Astro/vite build), and