@scalable-vector-audio/sva-wasm 0.7.11 → 0.7.13
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/sva_wasm.d.ts +4 -15
- package/sva_wasm.js +35 -75
- package/sva_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/sva_wasm.d.ts
CHANGED
|
@@ -27,29 +27,21 @@ export class Composition {
|
|
|
27
27
|
prune(policy: string): void;
|
|
28
28
|
/**
|
|
29
29
|
* `target` as `sva-cli render` takes it, `@piano([0, 2b], f0=C4)`; `representations`
|
|
30
|
-
* what `representations()` answers,
|
|
31
|
-
*
|
|
32
|
-
* `
|
|
30
|
+
* what `representations()` answers, each a call as `--representation` writes it.
|
|
31
|
+
* `options`: `rate`, `bits`, `flop_budget`, `until`, `volatile`, and `out: null`, which
|
|
32
|
+
* hands back no samples and reads only `representations`, `samples` otherwise.
|
|
33
33
|
*/
|
|
34
34
|
render(target: string, representations: string[] | null | undefined, options: any): Promise<Rendering>;
|
|
35
35
|
set_cache_policy(policy: string): void;
|
|
36
|
-
set_prune_policy(policy: string): void;
|
|
37
36
|
/**
|
|
38
37
|
* `target` block by block. `options`: `rate`, `bits`, `until`, `live`, `channels`.
|
|
39
38
|
*/
|
|
40
39
|
stream(target: string, block: number, options: any): Promise<Stream>;
|
|
41
|
-
/**
|
|
42
|
-
* `target` computed into memory as `render` would; `{ stats, representations }`, the
|
|
43
|
-
* latter `representations()` for `readings`. Options: `rate`, `bits`, `flop_budget`,
|
|
44
|
-
* `readings`.
|
|
45
|
-
*/
|
|
46
|
-
warm(target: string, options: any): Promise<any>;
|
|
47
40
|
readonly cache_bytes: number;
|
|
48
41
|
readonly cache_entries: number;
|
|
49
42
|
readonly cache_evictions: number;
|
|
50
43
|
cache_max_bytes: number;
|
|
51
44
|
readonly cache_policy: string;
|
|
52
|
-
readonly prune_policy: string;
|
|
53
45
|
}
|
|
54
46
|
|
|
55
47
|
export class Rendering {
|
|
@@ -160,13 +152,10 @@ export interface InitOutput {
|
|
|
160
152
|
readonly composition_open: (a: number, b: number, c: number) => any;
|
|
161
153
|
readonly composition_persist: (a: number) => any;
|
|
162
154
|
readonly composition_prune: (a: number, b: number, c: number) => [number, number];
|
|
163
|
-
readonly composition_prune_policy: (a: number) => [number, number];
|
|
164
155
|
readonly composition_render: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
|
|
165
156
|
readonly composition_set_cache_max_bytes: (a: number, b: number) => void;
|
|
166
157
|
readonly composition_set_cache_policy: (a: number, b: number, c: number) => [number, number];
|
|
167
|
-
readonly composition_set_prune_policy: (a: number, b: number, c: number) => [number, number];
|
|
168
158
|
readonly composition_stream: (a: number, b: number, c: number, d: number, e: any) => any;
|
|
169
|
-
readonly composition_warm: (a: number, b: number, c: number, d: any) => any;
|
|
170
159
|
readonly outline: (a: number, b: number) => [number, number, number];
|
|
171
160
|
readonly rendering_channels: (a: number) => number;
|
|
172
161
|
readonly rendering_duration_secs: (a: number) => number;
|
|
@@ -195,7 +184,7 @@ export interface InitOutput {
|
|
|
195
184
|
readonly stream_work: (a: number) => [number, number, number];
|
|
196
185
|
readonly wasm_bindgen__convert__closures_____invoke__h76bd71bceeca2b95: (a: number, b: number, c: any, d: any) => void;
|
|
197
186
|
readonly wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150: (a: number, b: number, c: any) => [number, number];
|
|
198
|
-
readonly
|
|
187
|
+
readonly wasm_bindgen__convert__closures_____invoke__h689718c76906d64d: (a: number, b: number) => any;
|
|
199
188
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
200
189
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
201
190
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/sva_wasm.js
CHANGED
|
@@ -130,26 +130,11 @@ export class Composition {
|
|
|
130
130
|
throw takeFromExternrefTable0(ret[0]);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
/**
|
|
134
|
-
* @returns {string}
|
|
135
|
-
*/
|
|
136
|
-
get prune_policy() {
|
|
137
|
-
let deferred1_0;
|
|
138
|
-
let deferred1_1;
|
|
139
|
-
try {
|
|
140
|
-
const ret = wasm.composition_prune_policy(this.__wbg_ptr);
|
|
141
|
-
deferred1_0 = ret[0];
|
|
142
|
-
deferred1_1 = ret[1];
|
|
143
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
144
|
-
} finally {
|
|
145
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
133
|
/**
|
|
149
134
|
* `target` as `sva-cli render` takes it, `@piano([0, 2b], f0=C4)`; `representations`
|
|
150
|
-
* what `representations()` answers,
|
|
151
|
-
*
|
|
152
|
-
* `
|
|
135
|
+
* what `representations()` answers, each a call as `--representation` writes it.
|
|
136
|
+
* `options`: `rate`, `bits`, `flop_budget`, `until`, `volatile`, and `out: null`, which
|
|
137
|
+
* hands back no samples and reads only `representations`, `samples` otherwise.
|
|
153
138
|
* @param {string} target
|
|
154
139
|
* @param {string[] | null | undefined} representations
|
|
155
140
|
* @param {any} options
|
|
@@ -180,17 +165,6 @@ export class Composition {
|
|
|
180
165
|
throw takeFromExternrefTable0(ret[0]);
|
|
181
166
|
}
|
|
182
167
|
}
|
|
183
|
-
/**
|
|
184
|
-
* @param {string} policy
|
|
185
|
-
*/
|
|
186
|
-
set_prune_policy(policy) {
|
|
187
|
-
const ptr0 = passStringToWasm0(policy, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
188
|
-
const len0 = WASM_VECTOR_LEN;
|
|
189
|
-
const ret = wasm.composition_set_prune_policy(this.__wbg_ptr, ptr0, len0);
|
|
190
|
-
if (ret[1]) {
|
|
191
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
168
|
/**
|
|
195
169
|
* `target` block by block. `options`: `rate`, `bits`, `until`, `live`, `channels`.
|
|
196
170
|
* @param {string} target
|
|
@@ -204,20 +178,6 @@ export class Composition {
|
|
|
204
178
|
const ret = wasm.composition_stream(this.__wbg_ptr, ptr0, len0, block, options);
|
|
205
179
|
return ret;
|
|
206
180
|
}
|
|
207
|
-
/**
|
|
208
|
-
* `target` computed into memory as `render` would; `{ stats, representations }`, the
|
|
209
|
-
* latter `representations()` for `readings`. Options: `rate`, `bits`, `flop_budget`,
|
|
210
|
-
* `readings`.
|
|
211
|
-
* @param {string} target
|
|
212
|
-
* @param {any} options
|
|
213
|
-
* @returns {Promise<any>}
|
|
214
|
-
*/
|
|
215
|
-
warm(target, options) {
|
|
216
|
-
const ptr0 = passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
217
|
-
const len0 = WASM_VECTOR_LEN;
|
|
218
|
-
const ret = wasm.composition_warm(this.__wbg_ptr, ptr0, len0, options);
|
|
219
|
-
return ret;
|
|
220
|
-
}
|
|
221
181
|
}
|
|
222
182
|
if (Symbol.dispose) Composition.prototype[Symbol.dispose] = Composition.prototype.free;
|
|
223
183
|
|
|
@@ -587,7 +547,7 @@ function __wbg_get_imports() {
|
|
|
587
547
|
__wbg__wbg_cb_unref_997e73d32238e655: function(arg0) {
|
|
588
548
|
arg0._wbg_cb_unref();
|
|
589
549
|
},
|
|
590
|
-
|
|
550
|
+
__wbg_arrayBuffer_a3dafcc55fa30b9e: function(arg0) {
|
|
591
551
|
const ret = arg0.arrayBuffer();
|
|
592
552
|
return ret;
|
|
593
553
|
},
|
|
@@ -599,7 +559,7 @@ function __wbg_get_imports() {
|
|
|
599
559
|
const ret = arg0.call(arg1, arg2);
|
|
600
560
|
return ret;
|
|
601
561
|
}, arguments); },
|
|
602
|
-
|
|
562
|
+
__wbg_close_962a535e22219c15: function(arg0) {
|
|
603
563
|
const ret = arg0.close();
|
|
604
564
|
return ret;
|
|
605
565
|
},
|
|
@@ -607,7 +567,7 @@ function __wbg_get_imports() {
|
|
|
607
567
|
const ret = Composition.__wrap(arg0);
|
|
608
568
|
return ret;
|
|
609
569
|
},
|
|
610
|
-
|
|
570
|
+
__wbg_createWritable_047fe5dcf83b8270: function(arg0) {
|
|
611
571
|
const ret = arg0.createWritable();
|
|
612
572
|
return ret;
|
|
613
573
|
},
|
|
@@ -619,15 +579,15 @@ function __wbg_get_imports() {
|
|
|
619
579
|
const ret = Array.from(arg0);
|
|
620
580
|
return ret;
|
|
621
581
|
},
|
|
622
|
-
|
|
582
|
+
__wbg_getDirectoryHandle_8ea075102315dedb: function(arg0, arg1, arg2, arg3) {
|
|
623
583
|
const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
624
584
|
return ret;
|
|
625
585
|
},
|
|
626
|
-
|
|
586
|
+
__wbg_getFileHandle_a667b7b975dae50c: function(arg0, arg1, arg2, arg3) {
|
|
627
587
|
const ret = arg0.getFileHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
628
588
|
return ret;
|
|
629
589
|
},
|
|
630
|
-
|
|
590
|
+
__wbg_getFile_25bd443a7fa8eb13: function(arg0) {
|
|
631
591
|
const ret = arg0.getFile();
|
|
632
592
|
return ret;
|
|
633
593
|
},
|
|
@@ -657,7 +617,7 @@ function __wbg_get_imports() {
|
|
|
657
617
|
const ret = Array.isArray(arg0);
|
|
658
618
|
return ret;
|
|
659
619
|
},
|
|
660
|
-
|
|
620
|
+
__wbg_keys_7d2ec5c33e384a9d: function(arg0) {
|
|
661
621
|
const ret = arg0.keys();
|
|
662
622
|
return ret;
|
|
663
623
|
},
|
|
@@ -673,11 +633,11 @@ function __wbg_get_imports() {
|
|
|
673
633
|
const ret = arg0.length;
|
|
674
634
|
return ret;
|
|
675
635
|
},
|
|
676
|
-
|
|
636
|
+
__wbg_move_4e68ceb4815f08aa: function(arg0, arg1, arg2, arg3) {
|
|
677
637
|
const ret = arg0.move(arg1, getStringFromWasm0(arg2, arg3));
|
|
678
638
|
return ret;
|
|
679
639
|
},
|
|
680
|
-
|
|
640
|
+
__wbg_name_fd30486e06aca4c0: function(arg0, arg1) {
|
|
681
641
|
const ret = arg1.name;
|
|
682
642
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
683
643
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -688,6 +648,10 @@ function __wbg_get_imports() {
|
|
|
688
648
|
const ret = new Uint8Array(arg0);
|
|
689
649
|
return ret;
|
|
690
650
|
},
|
|
651
|
+
__wbg_new_5648ee30adfb07f7: function(arg0, arg1) {
|
|
652
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
653
|
+
return ret;
|
|
654
|
+
},
|
|
691
655
|
__wbg_new_8f72ed7c652bf5a2: function(arg0, arg1) {
|
|
692
656
|
try {
|
|
693
657
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -706,10 +670,6 @@ function __wbg_get_imports() {
|
|
|
706
670
|
state0.a = 0;
|
|
707
671
|
}
|
|
708
672
|
},
|
|
709
|
-
__wbg_new_94977a6bac8d2087: function(arg0, arg1) {
|
|
710
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
711
|
-
return ret;
|
|
712
|
-
},
|
|
713
673
|
__wbg_new_bebc3f4757acf305: function() {
|
|
714
674
|
const ret = new Object();
|
|
715
675
|
return ret;
|
|
@@ -736,18 +696,18 @@ function __wbg_get_imports() {
|
|
|
736
696
|
state0.a = 0;
|
|
737
697
|
}
|
|
738
698
|
},
|
|
739
|
-
|
|
699
|
+
__wbg_next_8ccc5a0b15032c66: function(arg0) {
|
|
740
700
|
const ret = arg0.next();
|
|
741
701
|
return ret;
|
|
742
702
|
},
|
|
743
|
-
|
|
703
|
+
__wbg_parse_cf0c1a0b40c9c0c4: function() { return handleError(function (arg0, arg1) {
|
|
744
704
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
745
705
|
return ret;
|
|
746
706
|
}, arguments); },
|
|
747
707
|
__wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
|
|
748
708
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
749
709
|
},
|
|
750
|
-
|
|
710
|
+
__wbg_query_a37af126f3515f80: function(arg0) {
|
|
751
711
|
const ret = arg0.query();
|
|
752
712
|
return ret;
|
|
753
713
|
},
|
|
@@ -762,19 +722,19 @@ function __wbg_get_imports() {
|
|
|
762
722
|
const ret = Math.random();
|
|
763
723
|
return ret;
|
|
764
724
|
},
|
|
765
|
-
|
|
766
|
-
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2)
|
|
725
|
+
__wbg_removeEntry_49e9f7e77fc0ce3b: function(arg0, arg1, arg2) {
|
|
726
|
+
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
|
|
767
727
|
return ret;
|
|
768
728
|
},
|
|
769
|
-
|
|
770
|
-
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
|
|
729
|
+
__wbg_removeEntry_b2130b8a1e9b1251: function(arg0, arg1, arg2, arg3) {
|
|
730
|
+
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2), arg3);
|
|
771
731
|
return ret;
|
|
772
732
|
},
|
|
773
733
|
__wbg_rendering_new: function(arg0) {
|
|
774
734
|
const ret = Rendering.__wrap(arg0);
|
|
775
735
|
return ret;
|
|
776
736
|
},
|
|
777
|
-
|
|
737
|
+
__wbg_request_5cc3d5864152dd9a: function(arg0, arg1, arg2, arg3) {
|
|
778
738
|
const ret = arg0.request(getStringFromWasm0(arg1, arg2), arg3);
|
|
779
739
|
return ret;
|
|
780
740
|
},
|
|
@@ -789,17 +749,17 @@ function __wbg_get_imports() {
|
|
|
789
749
|
__wbg_set_c41f8dbc07a2190f: function(arg0, arg1, arg2) {
|
|
790
750
|
arg0.set(getArrayF32FromWasm0(arg1, arg2));
|
|
791
751
|
},
|
|
792
|
-
|
|
752
|
+
__wbg_set_name_ae5d5ea203303243: function(arg0, arg1, arg2) {
|
|
793
753
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
794
754
|
},
|
|
795
|
-
|
|
755
|
+
__wbg_set_refusal_6021b963b4ac7bcc: function(arg0, arg1) {
|
|
796
756
|
arg0.refusal = arg1;
|
|
797
757
|
},
|
|
798
|
-
|
|
758
|
+
__wbg_size_d3fef205e56c3476: function(arg0) {
|
|
799
759
|
const ret = arg0.size;
|
|
800
760
|
return ret;
|
|
801
761
|
},
|
|
802
|
-
|
|
762
|
+
__wbg_slice_641bc9b842b3e04d: function(arg0, arg1, arg2) {
|
|
803
763
|
const ret = arg0.slice(arg1, arg2);
|
|
804
764
|
return ret;
|
|
805
765
|
},
|
|
@@ -835,21 +795,21 @@ function __wbg_get_imports() {
|
|
|
835
795
|
const ret = arg0.then(arg1);
|
|
836
796
|
return ret;
|
|
837
797
|
},
|
|
838
|
-
|
|
798
|
+
__wbg_warn_71ddfbed6ba54cea: function(arg0, arg1) {
|
|
839
799
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
840
800
|
},
|
|
841
|
-
|
|
801
|
+
__wbg_write_41ae5ee49eb0e832: function(arg0, arg1) {
|
|
842
802
|
const ret = arg0.write(arg1);
|
|
843
803
|
return ret;
|
|
844
804
|
},
|
|
845
805
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
846
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
806
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 535, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
847
807
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150);
|
|
848
808
|
return ret;
|
|
849
809
|
},
|
|
850
810
|
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
851
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
852
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
811
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 94, ret: NamedExternref("Promise<any>"), inner_ret: Some(NamedExternref("Promise<any>")) }, mutable: true }) -> Externref`.
|
|
812
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h689718c76906d64d);
|
|
853
813
|
return ret;
|
|
854
814
|
},
|
|
855
815
|
__wbindgen_generic_0000000000000003: function(arg0) {
|
|
@@ -878,8 +838,8 @@ function __wbg_get_imports() {
|
|
|
878
838
|
};
|
|
879
839
|
}
|
|
880
840
|
|
|
881
|
-
function
|
|
882
|
-
const ret = wasm.
|
|
841
|
+
function wasm_bindgen__convert__closures_____invoke__h689718c76906d64d(arg0, arg1) {
|
|
842
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h689718c76906d64d(arg0, arg1);
|
|
883
843
|
return ret;
|
|
884
844
|
}
|
|
885
845
|
|
package/sva_wasm_bg.wasm
CHANGED
|
Binary file
|