@octoseq/visualiser 0.1.0-main.ef9b77a → 0.1.0-main.f485112
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/package.json +1 -1
- package/pkg/visualiser.d.ts +174 -6
- package/pkg/visualiser.js +330 -14
- package/pkg/visualiser_bg.wasm +0 -0
- package/pkg/visualiser_bg.wasm.d.ts +26 -6
package/package.json
CHANGED
package/pkg/visualiser.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ export class WasmVisualiser {
|
|
|
8
8
|
* Check if a script is currently loaded.
|
|
9
9
|
*/
|
|
10
10
|
has_script(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Check if a signal variable exists in the current script.
|
|
13
|
+
*/
|
|
14
|
+
has_signal(name: string): boolean;
|
|
11
15
|
/**
|
|
12
16
|
* Load a Rhai script for controlling the visualiser.
|
|
13
17
|
* Returns true if the script was loaded successfully.
|
|
@@ -89,6 +93,18 @@ export class WasmVisualiser {
|
|
|
89
93
|
* - `sample_rate`: Sample rate of the signal.
|
|
90
94
|
*/
|
|
91
95
|
push_band_signal(band_id: string, band_label: string, feature: string, samples: Float32Array, sample_rate: number): void;
|
|
96
|
+
/**
|
|
97
|
+
* Push a stem-scoped signal for use in scripts.
|
|
98
|
+
* The signal will be available as `inputs.stems[stem_id].{feature}` in Rhai scripts.
|
|
99
|
+
* Stores under both stem_id and stem_label for dual-access support.
|
|
100
|
+
*
|
|
101
|
+
* - `stem_id`: The unique ID of the stem.
|
|
102
|
+
* - `stem_label`: The user-visible label of the stem.
|
|
103
|
+
* - `feature`: Signal type ("energy", "onset", "flux").
|
|
104
|
+
* - `samples`: Signal data.
|
|
105
|
+
* - `sample_rate`: Sample rate of the signal.
|
|
106
|
+
*/
|
|
107
|
+
push_stem_signal(stem_id: string, stem_label: string, feature: string, samples: Float32Array, sample_rate: number): void;
|
|
92
108
|
/**
|
|
93
109
|
* Set the musical time structure for beat-aware signal processing.
|
|
94
110
|
* The JSON format matches the TypeScript MusicalTimeStructure type.
|
|
@@ -128,11 +144,30 @@ export class WasmVisualiser {
|
|
|
128
144
|
* Beat-aware operations will fall back to 120 BPM default.
|
|
129
145
|
*/
|
|
130
146
|
clear_musical_time(): void;
|
|
147
|
+
/**
|
|
148
|
+
* Clear all stem signals.
|
|
149
|
+
*/
|
|
150
|
+
clear_stem_signals(): void;
|
|
131
151
|
/**
|
|
132
152
|
* Get frequency bounds for all active bands at a given time.
|
|
133
153
|
* Returns a JSON array of { bandId, label, lowHz, highHz, enabled } objects.
|
|
134
154
|
*/
|
|
135
155
|
get_band_bounds_at(time: number): string;
|
|
156
|
+
/**
|
|
157
|
+
* Get all Signal variables from the current script.
|
|
158
|
+
* Returns a JSON array of ScriptSignalInfo objects.
|
|
159
|
+
*/
|
|
160
|
+
get_script_signals(): string;
|
|
161
|
+
/**
|
|
162
|
+
* Push a custom signal for use in scripts.
|
|
163
|
+
* The signal will be available as `inputs.customSignals["signal_id"]` in Rhai scripts.
|
|
164
|
+
*
|
|
165
|
+
* - `signal_id`: The unique ID of the custom signal.
|
|
166
|
+
* - `label`: The user-visible label of the signal.
|
|
167
|
+
* - `samples`: Signal data.
|
|
168
|
+
* - `sample_rate`: Sample rate of the signal.
|
|
169
|
+
*/
|
|
170
|
+
push_custom_signal(signal_id: string, label: string, samples: Float32Array, sample_rate: number): void;
|
|
136
171
|
push_rotation_data(samples: Float32Array, sample_rate: number): void;
|
|
137
172
|
/**
|
|
138
173
|
* Render with a frame budget timeout.
|
|
@@ -157,12 +192,41 @@ export class WasmVisualiser {
|
|
|
157
192
|
* Returns true if successful, false if parsing failed.
|
|
158
193
|
*/
|
|
159
194
|
register_mesh_asset(asset_id: string, obj_content: string): boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Set available stems for script namespace generation.
|
|
197
|
+
* This registers stem IDs and labels so the script engine can generate
|
|
198
|
+
* `inputs.stems["stem_id"]` and `inputs.stems["label"]` accessors.
|
|
199
|
+
*
|
|
200
|
+
* The JSON format should be an array of [id, label] pairs:
|
|
201
|
+
* `[["stem-abc123", "Drums"], ["stem-def456", "Bass"]]`
|
|
202
|
+
*
|
|
203
|
+
* Returns true if successful, false if parsing failed.
|
|
204
|
+
*/
|
|
205
|
+
set_available_stems(json: string): boolean;
|
|
160
206
|
/**
|
|
161
207
|
* Set the frequency band structure for band-aware processing.
|
|
162
208
|
* The JSON format matches the TypeScript FrequencyBandStructure type.
|
|
163
209
|
* Returns true if successful, false if parsing failed.
|
|
164
210
|
*/
|
|
165
211
|
set_frequency_bands(json: string): boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Analyze a signal chain with localized sampling.
|
|
214
|
+
*
|
|
215
|
+
* Returns JSON with either:
|
|
216
|
+
* - SignalChainAnalysis on success
|
|
217
|
+
* - { "error": "message" } on failure
|
|
218
|
+
*
|
|
219
|
+
* Parameters:
|
|
220
|
+
* - signal_name: Name of the signal variable in the script
|
|
221
|
+
* - center_time: Time to center analysis around (seconds)
|
|
222
|
+
* - window_beats: Number of beats before/after center to sample
|
|
223
|
+
* - sample_count: Number of samples to take
|
|
224
|
+
*/
|
|
225
|
+
analyze_signal_chain(signal_name: string, center_time: number, window_beats: number, sample_count: number): string;
|
|
226
|
+
/**
|
|
227
|
+
* Clear all custom signals.
|
|
228
|
+
*/
|
|
229
|
+
clear_custom_signals(): void;
|
|
166
230
|
/**
|
|
167
231
|
* Get the number of events for a specific band.
|
|
168
232
|
* Returns 0 if no events are stored for this band.
|
|
@@ -173,15 +237,52 @@ export class WasmVisualiser {
|
|
|
173
237
|
* Returns a JSON array of strings.
|
|
174
238
|
*/
|
|
175
239
|
get_band_signal_keys(): string;
|
|
240
|
+
/**
|
|
241
|
+
* Get list of stem keys (IDs and labels) that have signals.
|
|
242
|
+
* Returns a JSON array of strings.
|
|
243
|
+
*/
|
|
244
|
+
get_stem_signal_keys(): string;
|
|
245
|
+
/**
|
|
246
|
+
* Check if performance profiling is currently enabled.
|
|
247
|
+
*/
|
|
248
|
+
is_profiling_enabled(): boolean;
|
|
249
|
+
/**
|
|
250
|
+
* Push a composed signal for use in scripts.
|
|
251
|
+
* The signal will be available as `inputs.composedSignals["name"]` in Rhai scripts.
|
|
252
|
+
*
|
|
253
|
+
* - `name`: The composed signal name (composed signals are keyed by name only).
|
|
254
|
+
* - `samples`: Signal data.
|
|
255
|
+
* - `sample_rate`: Sample rate of the signal.
|
|
256
|
+
*/
|
|
257
|
+
push_composed_signal(name: string, samples: Float32Array, sample_rate: number): void;
|
|
176
258
|
/**
|
|
177
259
|
* Clear the frequency band structure.
|
|
178
260
|
*/
|
|
179
261
|
clear_frequency_bands(): void;
|
|
262
|
+
/**
|
|
263
|
+
* Get camera state as JSON for inspector.
|
|
264
|
+
* Returns current position, rotation, target, fov, near, far, mode, and signal flags.
|
|
265
|
+
*/
|
|
266
|
+
get_camera_state_json(): string;
|
|
267
|
+
/**
|
|
268
|
+
* Enable or disable performance profiling.
|
|
269
|
+
* When enabled, console timing and collection size logging will be active.
|
|
270
|
+
*/
|
|
271
|
+
set_profiling_enabled(enabled: boolean): void;
|
|
180
272
|
/**
|
|
181
273
|
* Unregister a mesh asset.
|
|
182
274
|
* Returns true if the asset was unregistered, false if it didn't exist.
|
|
183
275
|
*/
|
|
184
276
|
unregister_mesh_asset(asset_id: string): boolean;
|
|
277
|
+
/**
|
|
278
|
+
* Clear all composed signals.
|
|
279
|
+
*/
|
|
280
|
+
clear_composed_signals(): void;
|
|
281
|
+
/**
|
|
282
|
+
* Get list of custom signal keys (IDs and labels).
|
|
283
|
+
* Returns a JSON array of strings.
|
|
284
|
+
*/
|
|
285
|
+
get_custom_signal_keys(): string;
|
|
185
286
|
/**
|
|
186
287
|
* Get the number of events in a named event stream.
|
|
187
288
|
* Returns 0 if no events are stored for this name.
|
|
@@ -206,6 +307,37 @@ export class WasmVisualiser {
|
|
|
206
307
|
* Returns a JSON array of objects with id, type, and position fields.
|
|
207
308
|
*/
|
|
208
309
|
get_entity_positions_json(): string;
|
|
310
|
+
/**
|
|
311
|
+
* Push an authored event stream for script access.
|
|
312
|
+
*
|
|
313
|
+
* The event stream will be available as `inputs.authored["name"]` in Rhai scripts.
|
|
314
|
+
* This is used for user-authored events (promoted or manually created).
|
|
315
|
+
*
|
|
316
|
+
* The JSON format should be an array of event objects with:
|
|
317
|
+
* - time: f32
|
|
318
|
+
* - weight: f32
|
|
319
|
+
* - beat_position: Option<f32>
|
|
320
|
+
* - beat_phase: Option<f32>
|
|
321
|
+
* - cluster_id: Option<u32>
|
|
322
|
+
*
|
|
323
|
+
* Returns true if successful, false if parsing failed.
|
|
324
|
+
*/
|
|
325
|
+
push_authored_event_stream(name: string, events_json: string): boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Clear all authored event streams.
|
|
328
|
+
*/
|
|
329
|
+
clear_authored_event_streams(): void;
|
|
330
|
+
/**
|
|
331
|
+
* Set available custom signals for script namespace generation.
|
|
332
|
+
* This registers custom signal IDs and labels so the script engine can generate
|
|
333
|
+
* `inputs.customSignals["signal_id"]` accessors.
|
|
334
|
+
*
|
|
335
|
+
* The JSON format should be an array of [id, label] pairs:
|
|
336
|
+
* `[["signal-abc123", "My Signal"], ["signal-def456", "Another Signal"]]`
|
|
337
|
+
*
|
|
338
|
+
* Returns true if successful, false if parsing failed.
|
|
339
|
+
*/
|
|
340
|
+
set_available_custom_signals(json: string): boolean;
|
|
209
341
|
/**
|
|
210
342
|
* Drain and return any pending structured script diagnostics as JSON.
|
|
211
343
|
*
|
|
@@ -213,6 +345,22 @@ export class WasmVisualiser {
|
|
|
213
345
|
* queue so repeated polling does not duplicate messages.
|
|
214
346
|
*/
|
|
215
347
|
take_script_diagnostics_json(): string;
|
|
348
|
+
/**
|
|
349
|
+
* Set available composed signals for script namespace generation.
|
|
350
|
+
* This registers composed signal IDs and labels so the script engine can generate
|
|
351
|
+
* `inputs.composedSignals["name"]` accessors.
|
|
352
|
+
*
|
|
353
|
+
* The JSON format should be an array of [id, label] pairs:
|
|
354
|
+
* `[["intensity", "intensity"], ["buildup", "buildup"]]`
|
|
355
|
+
*
|
|
356
|
+
* Returns true if successful, false if parsing failed.
|
|
357
|
+
*/
|
|
358
|
+
set_available_composed_signals(json: string): boolean;
|
|
359
|
+
/**
|
|
360
|
+
* Get the number of events in an authored event stream.
|
|
361
|
+
* Returns 0 if no events are stored for this name.
|
|
362
|
+
*/
|
|
363
|
+
get_authored_event_stream_count(name: string): number;
|
|
216
364
|
constructor();
|
|
217
365
|
render(dt: number): void;
|
|
218
366
|
resize(width: number, height: number): void;
|
|
@@ -240,33 +388,50 @@ export interface InitOutput {
|
|
|
240
388
|
readonly __wbg_wasmvisualiser_free: (a: number, b: number) => void;
|
|
241
389
|
readonly create_visualiser: (a: any) => any;
|
|
242
390
|
readonly get_script_api_metadata_json: () => [number, number];
|
|
391
|
+
readonly wasmvisualiser_analyze_signal_chain: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
392
|
+
readonly wasmvisualiser_clear_authored_event_streams: (a: number) => void;
|
|
243
393
|
readonly wasmvisualiser_clear_band_events: (a: number) => void;
|
|
244
394
|
readonly wasmvisualiser_clear_band_signals: (a: number) => void;
|
|
395
|
+
readonly wasmvisualiser_clear_composed_signals: (a: number) => void;
|
|
396
|
+
readonly wasmvisualiser_clear_custom_signals: (a: number) => void;
|
|
245
397
|
readonly wasmvisualiser_clear_event_streams: (a: number) => void;
|
|
246
398
|
readonly wasmvisualiser_clear_frequency_bands: (a: number) => void;
|
|
247
399
|
readonly wasmvisualiser_clear_isolation: (a: number) => void;
|
|
248
400
|
readonly wasmvisualiser_clear_musical_time: (a: number) => void;
|
|
249
401
|
readonly wasmvisualiser_clear_signals: (a: number) => void;
|
|
402
|
+
readonly wasmvisualiser_clear_stem_signals: (a: number) => void;
|
|
403
|
+
readonly wasmvisualiser_get_authored_event_stream_count: (a: number, b: number, c: number) => number;
|
|
250
404
|
readonly wasmvisualiser_get_band_bounds_at: (a: number, b: number) => [number, number];
|
|
251
405
|
readonly wasmvisualiser_get_band_event_count: (a: number, b: number, c: number) => number;
|
|
252
406
|
readonly wasmvisualiser_get_band_signal_keys: (a: number) => [number, number];
|
|
407
|
+
readonly wasmvisualiser_get_camera_state_json: (a: number) => [number, number];
|
|
253
408
|
readonly wasmvisualiser_get_current_vals: (a: number) => [number, number];
|
|
409
|
+
readonly wasmvisualiser_get_custom_signal_keys: (a: number) => [number, number];
|
|
254
410
|
readonly wasmvisualiser_get_entity_positions_json: (a: number) => [number, number];
|
|
255
411
|
readonly wasmvisualiser_get_event_stream_count: (a: number, b: number, c: number) => number;
|
|
256
412
|
readonly wasmvisualiser_get_frequency_band_count: (a: number) => number;
|
|
257
413
|
readonly wasmvisualiser_get_script_error: (a: number) => [number, number];
|
|
414
|
+
readonly wasmvisualiser_get_script_signals: (a: number) => [number, number];
|
|
258
415
|
readonly wasmvisualiser_get_signal_names: (a: number) => [number, number];
|
|
416
|
+
readonly wasmvisualiser_get_stem_signal_keys: (a: number) => [number, number];
|
|
259
417
|
readonly wasmvisualiser_has_frequency_bands: (a: number) => number;
|
|
260
418
|
readonly wasmvisualiser_has_script: (a: number) => number;
|
|
419
|
+
readonly wasmvisualiser_has_signal: (a: number, b: number, c: number) => number;
|
|
420
|
+
readonly wasmvisualiser_is_profiling_enabled: (a: number) => number;
|
|
261
421
|
readonly wasmvisualiser_isolate_entity: (a: number, b: bigint) => void;
|
|
262
422
|
readonly wasmvisualiser_list_mesh_assets: (a: number) => [number, number];
|
|
263
423
|
readonly wasmvisualiser_load_script: (a: number, b: number, c: number) => number;
|
|
264
424
|
readonly wasmvisualiser_new: () => number;
|
|
425
|
+
readonly wasmvisualiser_push_authored_event_stream: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
265
426
|
readonly wasmvisualiser_push_band_events: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
266
427
|
readonly wasmvisualiser_push_band_signal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
428
|
+
readonly wasmvisualiser_push_composed_signal: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
429
|
+
readonly wasmvisualiser_push_custom_signal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
267
430
|
readonly wasmvisualiser_push_data: (a: number, b: number, c: number, d: number) => void;
|
|
268
431
|
readonly wasmvisualiser_push_event_stream: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
432
|
+
readonly wasmvisualiser_push_rotation_data: (a: number, b: number, c: number, d: number) => void;
|
|
269
433
|
readonly wasmvisualiser_push_signal: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
434
|
+
readonly wasmvisualiser_push_stem_signal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
270
435
|
readonly wasmvisualiser_push_zoom_data: (a: number, b: number, c: number, d: number) => void;
|
|
271
436
|
readonly wasmvisualiser_register_mesh_asset: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
272
437
|
readonly wasmvisualiser_render: (a: number, b: number) => void;
|
|
@@ -274,20 +439,23 @@ export interface InitOutput {
|
|
|
274
439
|
readonly wasmvisualiser_resize: (a: number, b: number, c: number) => void;
|
|
275
440
|
readonly wasmvisualiser_run_analysis: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
276
441
|
readonly wasmvisualiser_run_analysis_with_events: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
442
|
+
readonly wasmvisualiser_set_available_composed_signals: (a: number, b: number, c: number) => number;
|
|
443
|
+
readonly wasmvisualiser_set_available_custom_signals: (a: number, b: number, c: number) => number;
|
|
444
|
+
readonly wasmvisualiser_set_available_stems: (a: number, b: number, c: number) => number;
|
|
277
445
|
readonly wasmvisualiser_set_debug_options: (a: number, b: number, c: number) => void;
|
|
278
446
|
readonly wasmvisualiser_set_frequency_bands: (a: number, b: number, c: number) => number;
|
|
279
447
|
readonly wasmvisualiser_set_musical_time: (a: number, b: number, c: number) => number;
|
|
448
|
+
readonly wasmvisualiser_set_profiling_enabled: (a: number, b: number) => void;
|
|
280
449
|
readonly wasmvisualiser_set_sigmoid_k: (a: number, b: number) => void;
|
|
281
450
|
readonly wasmvisualiser_set_time: (a: number, b: number) => void;
|
|
282
451
|
readonly wasmvisualiser_take_script_diagnostics_json: (a: number) => [number, number];
|
|
283
452
|
readonly wasmvisualiser_unregister_mesh_asset: (a: number, b: number, c: number) => number;
|
|
284
453
|
readonly init_panic_hook: () => void;
|
|
285
|
-
readonly
|
|
286
|
-
readonly
|
|
287
|
-
readonly
|
|
288
|
-
readonly
|
|
289
|
-
readonly
|
|
290
|
-
readonly wasm_bindgen__convert__closures_____invoke__h320f3d825d3712ba: (a: number, b: number, c: any, d: any) => void;
|
|
454
|
+
readonly wasm_bindgen__convert__closures_____invoke__h21c634b0b0f83d75: (a: number, b: number, c: any) => void;
|
|
455
|
+
readonly wasm_bindgen__closure__destroy__hbe34fa9c2b795850: (a: number, b: number) => void;
|
|
456
|
+
readonly wasm_bindgen__convert__closures_____invoke__h99981589310a7d61: (a: number, b: number, c: any) => void;
|
|
457
|
+
readonly wasm_bindgen__closure__destroy__hbe29fa491d28c510: (a: number, b: number) => void;
|
|
458
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4dbe1f4cd0045c74: (a: number, b: number, c: any, d: any) => void;
|
|
291
459
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
292
460
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
293
461
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/pkg/visualiser.js
CHANGED
|
@@ -241,16 +241,16 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
241
241
|
|
|
242
242
|
let WASM_VECTOR_LEN = 0;
|
|
243
243
|
|
|
244
|
-
function
|
|
245
|
-
wasm.
|
|
244
|
+
function wasm_bindgen__convert__closures_____invoke__h21c634b0b0f83d75(arg0, arg1, arg2) {
|
|
245
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h21c634b0b0f83d75(arg0, arg1, arg2);
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
function
|
|
249
|
-
wasm.
|
|
248
|
+
function wasm_bindgen__convert__closures_____invoke__h99981589310a7d61(arg0, arg1, arg2) {
|
|
249
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h99981589310a7d61(arg0, arg1, arg2);
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
function
|
|
253
|
-
wasm.
|
|
252
|
+
function wasm_bindgen__convert__closures_____invoke__h4dbe1f4cd0045c74(arg0, arg1, arg2, arg3) {
|
|
253
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h4dbe1f4cd0045c74(arg0, arg1, arg2, arg3);
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
const __wbindgen_enum_GpuCompilationMessageType = ["error", "warning", "info"];
|
|
@@ -293,6 +293,17 @@ export class WasmVisualiser {
|
|
|
293
293
|
const ret = wasm.wasmvisualiser_has_script(this.__wbg_ptr);
|
|
294
294
|
return ret !== 0;
|
|
295
295
|
}
|
|
296
|
+
/**
|
|
297
|
+
* Check if a signal variable exists in the current script.
|
|
298
|
+
* @param {string} name
|
|
299
|
+
* @returns {boolean}
|
|
300
|
+
*/
|
|
301
|
+
has_signal(name) {
|
|
302
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
303
|
+
const len0 = WASM_VECTOR_LEN;
|
|
304
|
+
const ret = wasm.wasmvisualiser_has_signal(this.__wbg_ptr, ptr0, len0);
|
|
305
|
+
return ret !== 0;
|
|
306
|
+
}
|
|
296
307
|
/**
|
|
297
308
|
* Load a Rhai script for controlling the visualiser.
|
|
298
309
|
* Returns true if the script was loaded successfully.
|
|
@@ -491,6 +502,33 @@ export class WasmVisualiser {
|
|
|
491
502
|
const len3 = WASM_VECTOR_LEN;
|
|
492
503
|
wasm.wasmvisualiser_push_band_signal(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, sample_rate);
|
|
493
504
|
}
|
|
505
|
+
/**
|
|
506
|
+
* Push a stem-scoped signal for use in scripts.
|
|
507
|
+
* The signal will be available as `inputs.stems[stem_id].{feature}` in Rhai scripts.
|
|
508
|
+
* Stores under both stem_id and stem_label for dual-access support.
|
|
509
|
+
*
|
|
510
|
+
* - `stem_id`: The unique ID of the stem.
|
|
511
|
+
* - `stem_label`: The user-visible label of the stem.
|
|
512
|
+
* - `feature`: Signal type ("energy", "onset", "flux").
|
|
513
|
+
* - `samples`: Signal data.
|
|
514
|
+
* - `sample_rate`: Sample rate of the signal.
|
|
515
|
+
* @param {string} stem_id
|
|
516
|
+
* @param {string} stem_label
|
|
517
|
+
* @param {string} feature
|
|
518
|
+
* @param {Float32Array} samples
|
|
519
|
+
* @param {number} sample_rate
|
|
520
|
+
*/
|
|
521
|
+
push_stem_signal(stem_id, stem_label, feature, samples, sample_rate) {
|
|
522
|
+
const ptr0 = passStringToWasm0(stem_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
523
|
+
const len0 = WASM_VECTOR_LEN;
|
|
524
|
+
const ptr1 = passStringToWasm0(stem_label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
525
|
+
const len1 = WASM_VECTOR_LEN;
|
|
526
|
+
const ptr2 = passStringToWasm0(feature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
527
|
+
const len2 = WASM_VECTOR_LEN;
|
|
528
|
+
const ptr3 = passArrayF32ToWasm0(samples, wasm.__wbindgen_malloc);
|
|
529
|
+
const len3 = WASM_VECTOR_LEN;
|
|
530
|
+
wasm.wasmvisualiser_push_stem_signal(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, sample_rate);
|
|
531
|
+
}
|
|
494
532
|
/**
|
|
495
533
|
* Set the musical time structure for beat-aware signal processing.
|
|
496
534
|
* The JSON format matches the TypeScript MusicalTimeStructure type.
|
|
@@ -557,6 +595,12 @@ export class WasmVisualiser {
|
|
|
557
595
|
clear_musical_time() {
|
|
558
596
|
wasm.wasmvisualiser_clear_musical_time(this.__wbg_ptr);
|
|
559
597
|
}
|
|
598
|
+
/**
|
|
599
|
+
* Clear all stem signals.
|
|
600
|
+
*/
|
|
601
|
+
clear_stem_signals() {
|
|
602
|
+
wasm.wasmvisualiser_clear_stem_signals(this.__wbg_ptr);
|
|
603
|
+
}
|
|
560
604
|
/**
|
|
561
605
|
* Get frequency bounds for all active bands at a given time.
|
|
562
606
|
* Returns a JSON array of { bandId, label, lowHz, highHz, enabled } objects.
|
|
@@ -575,6 +619,45 @@ export class WasmVisualiser {
|
|
|
575
619
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
576
620
|
}
|
|
577
621
|
}
|
|
622
|
+
/**
|
|
623
|
+
* Get all Signal variables from the current script.
|
|
624
|
+
* Returns a JSON array of ScriptSignalInfo objects.
|
|
625
|
+
* @returns {string}
|
|
626
|
+
*/
|
|
627
|
+
get_script_signals() {
|
|
628
|
+
let deferred1_0;
|
|
629
|
+
let deferred1_1;
|
|
630
|
+
try {
|
|
631
|
+
const ret = wasm.wasmvisualiser_get_script_signals(this.__wbg_ptr);
|
|
632
|
+
deferred1_0 = ret[0];
|
|
633
|
+
deferred1_1 = ret[1];
|
|
634
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
635
|
+
} finally {
|
|
636
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Push a custom signal for use in scripts.
|
|
641
|
+
* The signal will be available as `inputs.customSignals["signal_id"]` in Rhai scripts.
|
|
642
|
+
*
|
|
643
|
+
* - `signal_id`: The unique ID of the custom signal.
|
|
644
|
+
* - `label`: The user-visible label of the signal.
|
|
645
|
+
* - `samples`: Signal data.
|
|
646
|
+
* - `sample_rate`: Sample rate of the signal.
|
|
647
|
+
* @param {string} signal_id
|
|
648
|
+
* @param {string} label
|
|
649
|
+
* @param {Float32Array} samples
|
|
650
|
+
* @param {number} sample_rate
|
|
651
|
+
*/
|
|
652
|
+
push_custom_signal(signal_id, label, samples, sample_rate) {
|
|
653
|
+
const ptr0 = passStringToWasm0(signal_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
654
|
+
const len0 = WASM_VECTOR_LEN;
|
|
655
|
+
const ptr1 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
656
|
+
const len1 = WASM_VECTOR_LEN;
|
|
657
|
+
const ptr2 = passArrayF32ToWasm0(samples, wasm.__wbindgen_malloc);
|
|
658
|
+
const len2 = WASM_VECTOR_LEN;
|
|
659
|
+
wasm.wasmvisualiser_push_custom_signal(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, sample_rate);
|
|
660
|
+
}
|
|
578
661
|
/**
|
|
579
662
|
* @param {Float32Array} samples
|
|
580
663
|
* @param {number} sample_rate
|
|
@@ -582,7 +665,7 @@ export class WasmVisualiser {
|
|
|
582
665
|
push_rotation_data(samples, sample_rate) {
|
|
583
666
|
const ptr0 = passArrayF32ToWasm0(samples, wasm.__wbindgen_malloc);
|
|
584
667
|
const len0 = WASM_VECTOR_LEN;
|
|
585
|
-
wasm.
|
|
668
|
+
wasm.wasmvisualiser_push_rotation_data(this.__wbg_ptr, ptr0, len0, sample_rate);
|
|
586
669
|
}
|
|
587
670
|
/**
|
|
588
671
|
* Render with a frame budget timeout.
|
|
@@ -629,6 +712,24 @@ export class WasmVisualiser {
|
|
|
629
712
|
const ret = wasm.wasmvisualiser_register_mesh_asset(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
630
713
|
return ret !== 0;
|
|
631
714
|
}
|
|
715
|
+
/**
|
|
716
|
+
* Set available stems for script namespace generation.
|
|
717
|
+
* This registers stem IDs and labels so the script engine can generate
|
|
718
|
+
* `inputs.stems["stem_id"]` and `inputs.stems["label"]` accessors.
|
|
719
|
+
*
|
|
720
|
+
* The JSON format should be an array of [id, label] pairs:
|
|
721
|
+
* `[["stem-abc123", "Drums"], ["stem-def456", "Bass"]]`
|
|
722
|
+
*
|
|
723
|
+
* Returns true if successful, false if parsing failed.
|
|
724
|
+
* @param {string} json
|
|
725
|
+
* @returns {boolean}
|
|
726
|
+
*/
|
|
727
|
+
set_available_stems(json) {
|
|
728
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
729
|
+
const len0 = WASM_VECTOR_LEN;
|
|
730
|
+
const ret = wasm.wasmvisualiser_set_available_stems(this.__wbg_ptr, ptr0, len0);
|
|
731
|
+
return ret !== 0;
|
|
732
|
+
}
|
|
632
733
|
/**
|
|
633
734
|
* Set the frequency band structure for band-aware processing.
|
|
634
735
|
* The JSON format matches the TypeScript FrequencyBandStructure type.
|
|
@@ -642,6 +743,44 @@ export class WasmVisualiser {
|
|
|
642
743
|
const ret = wasm.wasmvisualiser_set_frequency_bands(this.__wbg_ptr, ptr0, len0);
|
|
643
744
|
return ret !== 0;
|
|
644
745
|
}
|
|
746
|
+
/**
|
|
747
|
+
* Analyze a signal chain with localized sampling.
|
|
748
|
+
*
|
|
749
|
+
* Returns JSON with either:
|
|
750
|
+
* - SignalChainAnalysis on success
|
|
751
|
+
* - { "error": "message" } on failure
|
|
752
|
+
*
|
|
753
|
+
* Parameters:
|
|
754
|
+
* - signal_name: Name of the signal variable in the script
|
|
755
|
+
* - center_time: Time to center analysis around (seconds)
|
|
756
|
+
* - window_beats: Number of beats before/after center to sample
|
|
757
|
+
* - sample_count: Number of samples to take
|
|
758
|
+
* @param {string} signal_name
|
|
759
|
+
* @param {number} center_time
|
|
760
|
+
* @param {number} window_beats
|
|
761
|
+
* @param {number} sample_count
|
|
762
|
+
* @returns {string}
|
|
763
|
+
*/
|
|
764
|
+
analyze_signal_chain(signal_name, center_time, window_beats, sample_count) {
|
|
765
|
+
let deferred2_0;
|
|
766
|
+
let deferred2_1;
|
|
767
|
+
try {
|
|
768
|
+
const ptr0 = passStringToWasm0(signal_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
769
|
+
const len0 = WASM_VECTOR_LEN;
|
|
770
|
+
const ret = wasm.wasmvisualiser_analyze_signal_chain(this.__wbg_ptr, ptr0, len0, center_time, window_beats, sample_count);
|
|
771
|
+
deferred2_0 = ret[0];
|
|
772
|
+
deferred2_1 = ret[1];
|
|
773
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
774
|
+
} finally {
|
|
775
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Clear all custom signals.
|
|
780
|
+
*/
|
|
781
|
+
clear_custom_signals() {
|
|
782
|
+
wasm.wasmvisualiser_clear_custom_signals(this.__wbg_ptr);
|
|
783
|
+
}
|
|
645
784
|
/**
|
|
646
785
|
* Get the number of events for a specific band.
|
|
647
786
|
* Returns 0 if no events are stored for this band.
|
|
@@ -671,12 +810,80 @@ export class WasmVisualiser {
|
|
|
671
810
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
672
811
|
}
|
|
673
812
|
}
|
|
813
|
+
/**
|
|
814
|
+
* Get list of stem keys (IDs and labels) that have signals.
|
|
815
|
+
* Returns a JSON array of strings.
|
|
816
|
+
* @returns {string}
|
|
817
|
+
*/
|
|
818
|
+
get_stem_signal_keys() {
|
|
819
|
+
let deferred1_0;
|
|
820
|
+
let deferred1_1;
|
|
821
|
+
try {
|
|
822
|
+
const ret = wasm.wasmvisualiser_get_stem_signal_keys(this.__wbg_ptr);
|
|
823
|
+
deferred1_0 = ret[0];
|
|
824
|
+
deferred1_1 = ret[1];
|
|
825
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
826
|
+
} finally {
|
|
827
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Check if performance profiling is currently enabled.
|
|
832
|
+
* @returns {boolean}
|
|
833
|
+
*/
|
|
834
|
+
is_profiling_enabled() {
|
|
835
|
+
const ret = wasm.wasmvisualiser_is_profiling_enabled(this.__wbg_ptr);
|
|
836
|
+
return ret !== 0;
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* Push a composed signal for use in scripts.
|
|
840
|
+
* The signal will be available as `inputs.composedSignals["name"]` in Rhai scripts.
|
|
841
|
+
*
|
|
842
|
+
* - `name`: The composed signal name (composed signals are keyed by name only).
|
|
843
|
+
* - `samples`: Signal data.
|
|
844
|
+
* - `sample_rate`: Sample rate of the signal.
|
|
845
|
+
* @param {string} name
|
|
846
|
+
* @param {Float32Array} samples
|
|
847
|
+
* @param {number} sample_rate
|
|
848
|
+
*/
|
|
849
|
+
push_composed_signal(name, samples, sample_rate) {
|
|
850
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
851
|
+
const len0 = WASM_VECTOR_LEN;
|
|
852
|
+
const ptr1 = passArrayF32ToWasm0(samples, wasm.__wbindgen_malloc);
|
|
853
|
+
const len1 = WASM_VECTOR_LEN;
|
|
854
|
+
wasm.wasmvisualiser_push_composed_signal(this.__wbg_ptr, ptr0, len0, ptr1, len1, sample_rate);
|
|
855
|
+
}
|
|
674
856
|
/**
|
|
675
857
|
* Clear the frequency band structure.
|
|
676
858
|
*/
|
|
677
859
|
clear_frequency_bands() {
|
|
678
860
|
wasm.wasmvisualiser_clear_frequency_bands(this.__wbg_ptr);
|
|
679
861
|
}
|
|
862
|
+
/**
|
|
863
|
+
* Get camera state as JSON for inspector.
|
|
864
|
+
* Returns current position, rotation, target, fov, near, far, mode, and signal flags.
|
|
865
|
+
* @returns {string}
|
|
866
|
+
*/
|
|
867
|
+
get_camera_state_json() {
|
|
868
|
+
let deferred1_0;
|
|
869
|
+
let deferred1_1;
|
|
870
|
+
try {
|
|
871
|
+
const ret = wasm.wasmvisualiser_get_camera_state_json(this.__wbg_ptr);
|
|
872
|
+
deferred1_0 = ret[0];
|
|
873
|
+
deferred1_1 = ret[1];
|
|
874
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
875
|
+
} finally {
|
|
876
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
/**
|
|
880
|
+
* Enable or disable performance profiling.
|
|
881
|
+
* When enabled, console timing and collection size logging will be active.
|
|
882
|
+
* @param {boolean} enabled
|
|
883
|
+
*/
|
|
884
|
+
set_profiling_enabled(enabled) {
|
|
885
|
+
wasm.wasmvisualiser_set_profiling_enabled(this.__wbg_ptr, enabled);
|
|
886
|
+
}
|
|
680
887
|
/**
|
|
681
888
|
* Unregister a mesh asset.
|
|
682
889
|
* Returns true if the asset was unregistered, false if it didn't exist.
|
|
@@ -689,6 +896,29 @@ export class WasmVisualiser {
|
|
|
689
896
|
const ret = wasm.wasmvisualiser_unregister_mesh_asset(this.__wbg_ptr, ptr0, len0);
|
|
690
897
|
return ret !== 0;
|
|
691
898
|
}
|
|
899
|
+
/**
|
|
900
|
+
* Clear all composed signals.
|
|
901
|
+
*/
|
|
902
|
+
clear_composed_signals() {
|
|
903
|
+
wasm.wasmvisualiser_clear_composed_signals(this.__wbg_ptr);
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* Get list of custom signal keys (IDs and labels).
|
|
907
|
+
* Returns a JSON array of strings.
|
|
908
|
+
* @returns {string}
|
|
909
|
+
*/
|
|
910
|
+
get_custom_signal_keys() {
|
|
911
|
+
let deferred1_0;
|
|
912
|
+
let deferred1_1;
|
|
913
|
+
try {
|
|
914
|
+
const ret = wasm.wasmvisualiser_get_custom_signal_keys(this.__wbg_ptr);
|
|
915
|
+
deferred1_0 = ret[0];
|
|
916
|
+
deferred1_1 = ret[1];
|
|
917
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
918
|
+
} finally {
|
|
919
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
692
922
|
/**
|
|
693
923
|
* Get the number of events in a named event stream.
|
|
694
924
|
* Returns 0 if no events are stored for this name.
|
|
@@ -753,6 +983,56 @@ export class WasmVisualiser {
|
|
|
753
983
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
754
984
|
}
|
|
755
985
|
}
|
|
986
|
+
/**
|
|
987
|
+
* Push an authored event stream for script access.
|
|
988
|
+
*
|
|
989
|
+
* The event stream will be available as `inputs.authored["name"]` in Rhai scripts.
|
|
990
|
+
* This is used for user-authored events (promoted or manually created).
|
|
991
|
+
*
|
|
992
|
+
* The JSON format should be an array of event objects with:
|
|
993
|
+
* - time: f32
|
|
994
|
+
* - weight: f32
|
|
995
|
+
* - beat_position: Option<f32>
|
|
996
|
+
* - beat_phase: Option<f32>
|
|
997
|
+
* - cluster_id: Option<u32>
|
|
998
|
+
*
|
|
999
|
+
* Returns true if successful, false if parsing failed.
|
|
1000
|
+
* @param {string} name
|
|
1001
|
+
* @param {string} events_json
|
|
1002
|
+
* @returns {boolean}
|
|
1003
|
+
*/
|
|
1004
|
+
push_authored_event_stream(name, events_json) {
|
|
1005
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1006
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1007
|
+
const ptr1 = passStringToWasm0(events_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1008
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1009
|
+
const ret = wasm.wasmvisualiser_push_authored_event_stream(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1010
|
+
return ret !== 0;
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Clear all authored event streams.
|
|
1014
|
+
*/
|
|
1015
|
+
clear_authored_event_streams() {
|
|
1016
|
+
wasm.wasmvisualiser_clear_authored_event_streams(this.__wbg_ptr);
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* Set available custom signals for script namespace generation.
|
|
1020
|
+
* This registers custom signal IDs and labels so the script engine can generate
|
|
1021
|
+
* `inputs.customSignals["signal_id"]` accessors.
|
|
1022
|
+
*
|
|
1023
|
+
* The JSON format should be an array of [id, label] pairs:
|
|
1024
|
+
* `[["signal-abc123", "My Signal"], ["signal-def456", "Another Signal"]]`
|
|
1025
|
+
*
|
|
1026
|
+
* Returns true if successful, false if parsing failed.
|
|
1027
|
+
* @param {string} json
|
|
1028
|
+
* @returns {boolean}
|
|
1029
|
+
*/
|
|
1030
|
+
set_available_custom_signals(json) {
|
|
1031
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1032
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1033
|
+
const ret = wasm.wasmvisualiser_set_available_custom_signals(this.__wbg_ptr, ptr0, len0);
|
|
1034
|
+
return ret !== 0;
|
|
1035
|
+
}
|
|
756
1036
|
/**
|
|
757
1037
|
* Drain and return any pending structured script diagnostics as JSON.
|
|
758
1038
|
*
|
|
@@ -772,6 +1052,36 @@ export class WasmVisualiser {
|
|
|
772
1052
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
773
1053
|
}
|
|
774
1054
|
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Set available composed signals for script namespace generation.
|
|
1057
|
+
* This registers composed signal IDs and labels so the script engine can generate
|
|
1058
|
+
* `inputs.composedSignals["name"]` accessors.
|
|
1059
|
+
*
|
|
1060
|
+
* The JSON format should be an array of [id, label] pairs:
|
|
1061
|
+
* `[["intensity", "intensity"], ["buildup", "buildup"]]`
|
|
1062
|
+
*
|
|
1063
|
+
* Returns true if successful, false if parsing failed.
|
|
1064
|
+
* @param {string} json
|
|
1065
|
+
* @returns {boolean}
|
|
1066
|
+
*/
|
|
1067
|
+
set_available_composed_signals(json) {
|
|
1068
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1069
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1070
|
+
const ret = wasm.wasmvisualiser_set_available_composed_signals(this.__wbg_ptr, ptr0, len0);
|
|
1071
|
+
return ret !== 0;
|
|
1072
|
+
}
|
|
1073
|
+
/**
|
|
1074
|
+
* Get the number of events in an authored event stream.
|
|
1075
|
+
* Returns 0 if no events are stored for this name.
|
|
1076
|
+
* @param {string} name
|
|
1077
|
+
* @returns {number}
|
|
1078
|
+
*/
|
|
1079
|
+
get_authored_event_stream_count(name) {
|
|
1080
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1081
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1082
|
+
const ret = wasm.wasmvisualiser_get_authored_event_stream_count(this.__wbg_ptr, ptr0, len0);
|
|
1083
|
+
return ret >>> 0;
|
|
1084
|
+
}
|
|
775
1085
|
constructor() {
|
|
776
1086
|
const ret = wasm.wasmvisualiser_new();
|
|
777
1087
|
this.__wbg_ptr = ret >>> 0;
|
|
@@ -1459,7 +1769,7 @@ function __wbg_get_imports() {
|
|
|
1459
1769
|
const a = state0.a;
|
|
1460
1770
|
state0.a = 0;
|
|
1461
1771
|
try {
|
|
1462
|
-
return
|
|
1772
|
+
return wasm_bindgen__convert__closures_____invoke__h4dbe1f4cd0045c74(a, state0.b, arg0, arg1);
|
|
1463
1773
|
} finally {
|
|
1464
1774
|
state0.a = a;
|
|
1465
1775
|
}
|
|
@@ -1665,6 +1975,12 @@ function __wbg_get_imports() {
|
|
|
1665
1975
|
const ret = arg0.then(arg1);
|
|
1666
1976
|
return ret;
|
|
1667
1977
|
};
|
|
1978
|
+
imports.wbg.__wbg_timeEnd_46ed224117e5f2d2 = function(arg0, arg1) {
|
|
1979
|
+
console.timeEnd(getStringFromWasm0(arg0, arg1));
|
|
1980
|
+
};
|
|
1981
|
+
imports.wbg.__wbg_time_c49415b636fbbf3f = function(arg0, arg1) {
|
|
1982
|
+
console.time(getStringFromWasm0(arg0, arg1));
|
|
1983
|
+
};
|
|
1668
1984
|
imports.wbg.__wbg_type_c0d5d83032e9858a = function(arg0) {
|
|
1669
1985
|
const ret = arg0.type;
|
|
1670
1986
|
return (__wbindgen_enum_GpuCompilationMessageType.indexOf(ret) + 1 || 4) - 1;
|
|
@@ -1702,14 +2018,14 @@ function __wbg_get_imports() {
|
|
|
1702
2018
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1703
2019
|
return ret;
|
|
1704
2020
|
};
|
|
1705
|
-
imports.wbg.
|
|
1706
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1707
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
2021
|
+
imports.wbg.__wbindgen_cast_6e1a5c3e219620cc = function(arg0, arg1) {
|
|
2022
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 3569, function: Function { arguments: [Externref], shim_idx: 3570, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2023
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hbe29fa491d28c510, wasm_bindgen__convert__closures_____invoke__h99981589310a7d61);
|
|
1708
2024
|
return ret;
|
|
1709
2025
|
};
|
|
1710
|
-
imports.wbg.
|
|
1711
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1712
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
2026
|
+
imports.wbg.__wbindgen_cast_77ea2f6a269d2527 = function(arg0, arg1) {
|
|
2027
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 3560, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 3561, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2028
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hbe34fa9c2b795850, wasm_bindgen__convert__closures_____invoke__h21c634b0b0f83d75);
|
|
1713
2029
|
return ret;
|
|
1714
2030
|
};
|
|
1715
2031
|
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
package/pkg/visualiser_bg.wasm
CHANGED
|
Binary file
|
|
@@ -4,33 +4,50 @@ export const memory: WebAssembly.Memory;
|
|
|
4
4
|
export const __wbg_wasmvisualiser_free: (a: number, b: number) => void;
|
|
5
5
|
export const create_visualiser: (a: any) => any;
|
|
6
6
|
export const get_script_api_metadata_json: () => [number, number];
|
|
7
|
+
export const wasmvisualiser_analyze_signal_chain: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
8
|
+
export const wasmvisualiser_clear_authored_event_streams: (a: number) => void;
|
|
7
9
|
export const wasmvisualiser_clear_band_events: (a: number) => void;
|
|
8
10
|
export const wasmvisualiser_clear_band_signals: (a: number) => void;
|
|
11
|
+
export const wasmvisualiser_clear_composed_signals: (a: number) => void;
|
|
12
|
+
export const wasmvisualiser_clear_custom_signals: (a: number) => void;
|
|
9
13
|
export const wasmvisualiser_clear_event_streams: (a: number) => void;
|
|
10
14
|
export const wasmvisualiser_clear_frequency_bands: (a: number) => void;
|
|
11
15
|
export const wasmvisualiser_clear_isolation: (a: number) => void;
|
|
12
16
|
export const wasmvisualiser_clear_musical_time: (a: number) => void;
|
|
13
17
|
export const wasmvisualiser_clear_signals: (a: number) => void;
|
|
18
|
+
export const wasmvisualiser_clear_stem_signals: (a: number) => void;
|
|
19
|
+
export const wasmvisualiser_get_authored_event_stream_count: (a: number, b: number, c: number) => number;
|
|
14
20
|
export const wasmvisualiser_get_band_bounds_at: (a: number, b: number) => [number, number];
|
|
15
21
|
export const wasmvisualiser_get_band_event_count: (a: number, b: number, c: number) => number;
|
|
16
22
|
export const wasmvisualiser_get_band_signal_keys: (a: number) => [number, number];
|
|
23
|
+
export const wasmvisualiser_get_camera_state_json: (a: number) => [number, number];
|
|
17
24
|
export const wasmvisualiser_get_current_vals: (a: number) => [number, number];
|
|
25
|
+
export const wasmvisualiser_get_custom_signal_keys: (a: number) => [number, number];
|
|
18
26
|
export const wasmvisualiser_get_entity_positions_json: (a: number) => [number, number];
|
|
19
27
|
export const wasmvisualiser_get_event_stream_count: (a: number, b: number, c: number) => number;
|
|
20
28
|
export const wasmvisualiser_get_frequency_band_count: (a: number) => number;
|
|
21
29
|
export const wasmvisualiser_get_script_error: (a: number) => [number, number];
|
|
30
|
+
export const wasmvisualiser_get_script_signals: (a: number) => [number, number];
|
|
22
31
|
export const wasmvisualiser_get_signal_names: (a: number) => [number, number];
|
|
32
|
+
export const wasmvisualiser_get_stem_signal_keys: (a: number) => [number, number];
|
|
23
33
|
export const wasmvisualiser_has_frequency_bands: (a: number) => number;
|
|
24
34
|
export const wasmvisualiser_has_script: (a: number) => number;
|
|
35
|
+
export const wasmvisualiser_has_signal: (a: number, b: number, c: number) => number;
|
|
36
|
+
export const wasmvisualiser_is_profiling_enabled: (a: number) => number;
|
|
25
37
|
export const wasmvisualiser_isolate_entity: (a: number, b: bigint) => void;
|
|
26
38
|
export const wasmvisualiser_list_mesh_assets: (a: number) => [number, number];
|
|
27
39
|
export const wasmvisualiser_load_script: (a: number, b: number, c: number) => number;
|
|
28
40
|
export const wasmvisualiser_new: () => number;
|
|
41
|
+
export const wasmvisualiser_push_authored_event_stream: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
29
42
|
export const wasmvisualiser_push_band_events: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
30
43
|
export const wasmvisualiser_push_band_signal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
44
|
+
export const wasmvisualiser_push_composed_signal: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
45
|
+
export const wasmvisualiser_push_custom_signal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
31
46
|
export const wasmvisualiser_push_data: (a: number, b: number, c: number, d: number) => void;
|
|
32
47
|
export const wasmvisualiser_push_event_stream: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
48
|
+
export const wasmvisualiser_push_rotation_data: (a: number, b: number, c: number, d: number) => void;
|
|
33
49
|
export const wasmvisualiser_push_signal: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
50
|
+
export const wasmvisualiser_push_stem_signal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
34
51
|
export const wasmvisualiser_push_zoom_data: (a: number, b: number, c: number, d: number) => void;
|
|
35
52
|
export const wasmvisualiser_register_mesh_asset: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
36
53
|
export const wasmvisualiser_render: (a: number, b: number) => void;
|
|
@@ -38,20 +55,23 @@ export const wasmvisualiser_render_with_budget: (a: number, b: number, c: number
|
|
|
38
55
|
export const wasmvisualiser_resize: (a: number, b: number, c: number) => void;
|
|
39
56
|
export const wasmvisualiser_run_analysis: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
40
57
|
export const wasmvisualiser_run_analysis_with_events: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
58
|
+
export const wasmvisualiser_set_available_composed_signals: (a: number, b: number, c: number) => number;
|
|
59
|
+
export const wasmvisualiser_set_available_custom_signals: (a: number, b: number, c: number) => number;
|
|
60
|
+
export const wasmvisualiser_set_available_stems: (a: number, b: number, c: number) => number;
|
|
41
61
|
export const wasmvisualiser_set_debug_options: (a: number, b: number, c: number) => void;
|
|
42
62
|
export const wasmvisualiser_set_frequency_bands: (a: number, b: number, c: number) => number;
|
|
43
63
|
export const wasmvisualiser_set_musical_time: (a: number, b: number, c: number) => number;
|
|
64
|
+
export const wasmvisualiser_set_profiling_enabled: (a: number, b: number) => void;
|
|
44
65
|
export const wasmvisualiser_set_sigmoid_k: (a: number, b: number) => void;
|
|
45
66
|
export const wasmvisualiser_set_time: (a: number, b: number) => void;
|
|
46
67
|
export const wasmvisualiser_take_script_diagnostics_json: (a: number) => [number, number];
|
|
47
68
|
export const wasmvisualiser_unregister_mesh_asset: (a: number, b: number, c: number) => number;
|
|
48
69
|
export const init_panic_hook: () => void;
|
|
49
|
-
export const
|
|
50
|
-
export const
|
|
51
|
-
export const
|
|
52
|
-
export const
|
|
53
|
-
export const
|
|
54
|
-
export const wasm_bindgen__convert__closures_____invoke__h320f3d825d3712ba: (a: number, b: number, c: any, d: any) => void;
|
|
70
|
+
export const wasm_bindgen__convert__closures_____invoke__h21c634b0b0f83d75: (a: number, b: number, c: any) => void;
|
|
71
|
+
export const wasm_bindgen__closure__destroy__hbe34fa9c2b795850: (a: number, b: number) => void;
|
|
72
|
+
export const wasm_bindgen__convert__closures_____invoke__h99981589310a7d61: (a: number, b: number, c: any) => void;
|
|
73
|
+
export const wasm_bindgen__closure__destroy__hbe29fa491d28c510: (a: number, b: number) => void;
|
|
74
|
+
export const wasm_bindgen__convert__closures_____invoke__h4dbe1f4cd0045c74: (a: number, b: number, c: any, d: any) => void;
|
|
55
75
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
56
76
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
57
77
|
export const __wbindgen_exn_store: (a: number) => void;
|