@scalable-vector-audio/sva-wasm 0.14.3 → 0.14.4

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 CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@scalable-vector-audio/sva-wasm",
3
3
  "type": "module",
4
4
  "description": "JS bindings: a composition a page fills node by node, rendered in the browser",
5
- "version": "0.14.3",
5
+ "version": "0.14.4",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
package/sva_wasm.d.ts CHANGED
@@ -185,6 +185,12 @@ export class Composition {
185
185
  * `AbortError` before its next block.
186
186
  */
187
187
  render(target: string, representations: string[] | null | undefined, options: any): Promise<Rendering>;
188
+ /**
189
+ * `target`'s placed notes as `sva-cli outline @score/song` lists them, under
190
+ * `options.set` as `render` takes it: `{ song, events }`, each with `at`, `sounds`,
191
+ * `len` (or null), `node`, `hz`, `file`, `line`, `params`. Nothing renders.
192
+ */
193
+ song(target: string, options: any): any;
188
194
  /**
189
195
  * `target` block by block. `options`: `rate`, `bits`, `until`, `live`, `channels`,
190
196
  * `threads` (as `open` takes it).
@@ -338,6 +344,7 @@ export interface InitOutput {
338
344
  readonly composition_persist: (a: number) => any;
339
345
  readonly composition_render: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
340
346
  readonly composition_set_cache_max_bytes: (a: number, b: number) => void;
347
+ readonly composition_song: (a: number, b: number, c: number, d: any) => [number, number, number];
341
348
  readonly composition_store_bytes: (a: number) => [number, number];
342
349
  readonly composition_store_max_bytes: (a: number) => [number, number];
343
350
  readonly composition_stream: (a: number, b: number, c: number, d: number, e: any) => any;
package/sva_wasm.js CHANGED
@@ -127,6 +127,23 @@ export class Composition {
127
127
  set cache_max_bytes(max_bytes) {
128
128
  wasm.composition_set_cache_max_bytes(this.__wbg_ptr, max_bytes);
129
129
  }
130
+ /**
131
+ * `target`'s placed notes as `sva-cli outline @score/song` lists them, under
132
+ * `options.set` as `render` takes it: `{ song, events }`, each with `at`, `sounds`,
133
+ * `len` (or null), `node`, `hz`, `file`, `line`, `params`. Nothing renders.
134
+ * @param {string} target
135
+ * @param {any} options
136
+ * @returns {any}
137
+ */
138
+ song(target, options) {
139
+ const ptr0 = passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
140
+ const len0 = WASM_VECTOR_LEN;
141
+ const ret = wasm.composition_song(this.__wbg_ptr, ptr0, len0, options);
142
+ if (ret[2]) {
143
+ throw takeFromExternrefTable0(ret[1]);
144
+ }
145
+ return takeFromExternrefTable0(ret[0]);
146
+ }
130
147
  /**
131
148
  * What the store holds by its index; undefined without one.
132
149
  * @returns {number | undefined}
@@ -612,7 +629,7 @@ function __wbg_get_imports(memory) {
612
629
  __wbg__wbg_cb_unref_997e73d32238e655: function(arg0) {
613
630
  arg0._wbg_cb_unref();
614
631
  },
615
- __wbg_arrayBuffer_584a2c2f5f78ef84: function(arg0) {
632
+ __wbg_arrayBuffer_fd284aa86c417e52: function(arg0) {
616
633
  const ret = arg0.arrayBuffer();
617
634
  return ret;
618
635
  },
@@ -632,18 +649,18 @@ function __wbg_get_imports(memory) {
632
649
  const ret = arg0.call(arg1, arg2);
633
650
  return ret;
634
651
  }, arguments); },
635
- __wbg_close_1b576e4ae57d3298: function(arg0) {
652
+ __wbg_close_bb3385f692f55d95: function(arg0) {
653
+ arg0.close();
654
+ },
655
+ __wbg_close_fe51cb0dcc60e28d: function(arg0) {
636
656
  const ret = arg0.close();
637
657
  return ret;
638
658
  },
639
- __wbg_close_41e8f3e39a5b8875: function(arg0) {
640
- arg0.close();
641
- },
642
659
  __wbg_composition_new: function(arg0) {
643
660
  const ret = Composition.__wrap(arg0);
644
661
  return ret;
645
662
  },
646
- __wbg_createWritable_49daf8acae0e2b1d: function(arg0) {
663
+ __wbg_createWritable_71686e63d9ed36bb: function(arg0) {
647
664
  const ret = arg0.createWritable();
648
665
  return ret;
649
666
  },
@@ -659,15 +676,15 @@ function __wbg_get_imports(memory) {
659
676
  const ret = Array.from(arg0);
660
677
  return ret;
661
678
  },
662
- __wbg_getDirectoryHandle_7e2a9bca7ca80cbd: function(arg0, arg1, arg2, arg3) {
679
+ __wbg_getDirectoryHandle_53f2672a3dffa66f: function(arg0, arg1, arg2, arg3) {
663
680
  const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
664
681
  return ret;
665
682
  },
666
- __wbg_getFileHandle_95d84a366b334b5a: function(arg0, arg1, arg2, arg3) {
683
+ __wbg_getFileHandle_509b533576e19d13: function(arg0, arg1, arg2, arg3) {
667
684
  const ret = arg0.getFileHandle(getStringFromWasm0(arg1, arg2), arg3);
668
685
  return ret;
669
686
  },
670
- __wbg_getFile_75621fba32b0dec0: function(arg0) {
687
+ __wbg_getFile_c0c3bff4de3ee6f2: function(arg0) {
671
688
  const ret = arg0.getFile();
672
689
  return ret;
673
690
  },
@@ -711,7 +728,7 @@ function __wbg_get_imports(memory) {
711
728
  const ret = Array.isArray(arg0);
712
729
  return ret;
713
730
  },
714
- __wbg_keys_e3dd97a5e19c4cae: function(arg0) {
731
+ __wbg_keys_02fb9bb7c56e830a: function(arg0) {
715
732
  const ret = arg0.keys();
716
733
  return ret;
717
734
  },
@@ -727,11 +744,11 @@ function __wbg_get_imports(memory) {
727
744
  const ret = arg0.length;
728
745
  return ret;
729
746
  },
730
- __wbg_move_ab4e127f501301c4: function(arg0, arg1, arg2, arg3) {
747
+ __wbg_move_dfdbfe968d5c5fc7: function(arg0, arg1, arg2, arg3) {
731
748
  const ret = arg0.move(arg1, getStringFromWasm0(arg2, arg3));
732
749
  return ret;
733
750
  },
734
- __wbg_name_930f2c67b8bad29a: function(arg0, arg1) {
751
+ __wbg_name_ad2e481f74daa099: function(arg0, arg1) {
735
752
  const ret = arg1.name;
736
753
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
737
754
  const len1 = WASM_VECTOR_LEN;
@@ -742,10 +759,18 @@ function __wbg_get_imports(memory) {
742
759
  const ret = new Int32Array(arg0);
743
760
  return ret;
744
761
  },
762
+ __wbg_new_159f186999a4366a: function() {
763
+ const ret = new MessageChannel();
764
+ return ret;
765
+ },
745
766
  __wbg_new_1da3429bc3c4541c: function(arg0) {
746
767
  const ret = new Uint8Array(arg0);
747
768
  return ret;
748
769
  },
770
+ __wbg_new_73d050b3195e05ac: function(arg0, arg1) {
771
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
772
+ return ret;
773
+ },
749
774
  __wbg_new_8f72ed7c652bf5a2: function(arg0, arg1) {
750
775
  try {
751
776
  var state0 = {a: arg0, b: arg1};
@@ -768,14 +793,6 @@ function __wbg_get_imports(memory) {
768
793
  const ret = new Object();
769
794
  return ret;
770
795
  },
771
- __wbg_new_dd0206ef96d1bcc1: function() {
772
- const ret = new MessageChannel();
773
- return ret;
774
- },
775
- __wbg_new_f62a9348551d57fd: function(arg0, arg1) {
776
- const ret = new Error(getStringFromWasm0(arg0, arg1));
777
- return ret;
778
- },
779
796
  __wbg_new_ffa92086ea89f79c: function() {
780
797
  const ret = new Array();
781
798
  return ret;
@@ -806,7 +823,7 @@ function __wbg_get_imports(memory) {
806
823
  const ret = new Worker(getStringFromWasm0(arg0, arg1));
807
824
  return ret;
808
825
  },
809
- __wbg_next_2209ca31a7e1bcbe: function(arg0) {
826
+ __wbg_next_95af7c9a29ae4d7f: function(arg0) {
810
827
  const ret = arg0.next();
811
828
  return ret;
812
829
  },
@@ -814,22 +831,22 @@ function __wbg_get_imports(memory) {
814
831
  const ret = Array.of(arg0, arg1, arg2);
815
832
  return ret;
816
833
  },
817
- __wbg_parse_c78fbc1cbf33c424: function() { return handleError(function (arg0, arg1) {
834
+ __wbg_parse_a40c98d0ba0aa437: function() { return handleError(function (arg0, arg1) {
818
835
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
819
836
  return ret;
820
837
  }, arguments); },
821
- __wbg_port1_560463e8f74b6c50: function(arg0) {
838
+ __wbg_port1_28047b8a7af83292: function(arg0) {
822
839
  const ret = arg0.port1;
823
840
  return ret;
824
841
  },
825
- __wbg_port2_284543d4b4320f3e: function(arg0) {
842
+ __wbg_port2_860fc2535b873ea0: function(arg0) {
826
843
  const ret = arg0.port2;
827
844
  return ret;
828
845
  },
829
846
  __wbg_postMessage_8105a302ed002474: function() { return handleError(function (arg0, arg1) {
830
847
  arg0.postMessage(arg1);
831
848
  }, arguments); },
832
- __wbg_postMessage_e7bfcb3dd10c91ee: function(arg0, arg1) {
849
+ __wbg_postMessage_bcc1c319908dca6c: function(arg0, arg1) {
833
850
  arg0.postMessage(arg1);
834
851
  },
835
852
  __wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
@@ -839,7 +856,7 @@ function __wbg_get_imports(memory) {
839
856
  const ret = arg0.push(arg1);
840
857
  return ret;
841
858
  },
842
- __wbg_query_05d352ce2ad6372e: function(arg0) {
859
+ __wbg_query_a9a452c64cf67a64: function(arg0) {
843
860
  const ret = arg0.query();
844
861
  return ret;
845
862
  },
@@ -854,11 +871,11 @@ function __wbg_get_imports(memory) {
854
871
  const ret = Math.random();
855
872
  return ret;
856
873
  },
857
- __wbg_removeEntry_320a9d5830994a86: function(arg0, arg1, arg2) {
874
+ __wbg_removeEntry_72f325a6f5eda8bc: function(arg0, arg1, arg2) {
858
875
  const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
859
876
  return ret;
860
877
  },
861
- __wbg_removeEntry_4c7cdd8a3a483780: function(arg0, arg1, arg2, arg3) {
878
+ __wbg_removeEntry_9c117e6e60147898: function(arg0, arg1, arg2, arg3) {
862
879
  const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2), arg3);
863
880
  return ret;
864
881
  },
@@ -866,7 +883,7 @@ function __wbg_get_imports(memory) {
866
883
  const ret = Rendering.__wrap(arg0);
867
884
  return ret;
868
885
  },
869
- __wbg_request_4b101b6c9bfb7a55: function(arg0, arg1, arg2, arg3) {
886
+ __wbg_request_8afa451f45ac03cd: function(arg0, arg1, arg2, arg3) {
870
887
  const ret = arg0.request(getStringFromWasm0(arg1, arg2), arg3);
871
888
  return ret;
872
889
  },
@@ -881,23 +898,23 @@ function __wbg_get_imports(memory) {
881
898
  __wbg_set_c41f8dbc07a2190f: function(arg0, arg1, arg2) {
882
899
  arg0.set(getArrayF32FromWasm0(arg1, arg2));
883
900
  },
884
- __wbg_set_name_49466436ca5d4b93: function(arg0, arg1, arg2) {
901
+ __wbg_set_name_e3b626342d83eed5: function(arg0, arg1, arg2) {
885
902
  arg0.name = getStringFromWasm0(arg1, arg2);
886
903
  },
887
904
  __wbg_set_onmessage_2244c2525c4e0c38: function(arg0, arg1) {
888
905
  arg0.onmessage = arg1;
889
906
  },
890
- __wbg_set_onmessage_f281247738eca4b8: function(arg0, arg1) {
907
+ __wbg_set_onmessage_8e00b5de1c540756: function(arg0, arg1) {
891
908
  arg0.onmessage = arg1;
892
909
  },
893
- __wbg_set_refusal_576c658eea51b586: function(arg0, arg1) {
910
+ __wbg_set_refusal_43271084741856dd: function(arg0, arg1) {
894
911
  arg0.refusal = arg1;
895
912
  },
896
- __wbg_size_3b4ef7baacb06164: function(arg0) {
913
+ __wbg_size_1232ca385e3013b9: function(arg0) {
897
914
  const ret = arg0.size;
898
915
  return ret;
899
916
  },
900
- __wbg_slice_fa7b8824d8d0c292: function(arg0, arg1, arg2) {
917
+ __wbg_slice_cb2a2c8323a60c0e: function(arg0, arg1, arg2) {
901
918
  const ret = arg0.slice(arg1, arg2);
902
919
  return ret;
903
920
  },
@@ -957,10 +974,10 @@ function __wbg_get_imports(memory) {
957
974
  const ret = Atomics.waitAsync;
958
975
  return ret;
959
976
  },
960
- __wbg_warn_d0be1ed651126b7f: function(arg0, arg1) {
977
+ __wbg_warn_345bf156b47885e2: function(arg0, arg1) {
961
978
  console.warn(getStringFromWasm0(arg0, arg1));
962
979
  },
963
- __wbg_write_0353e8c4b08a4cc1: function(arg0, arg1) {
980
+ __wbg_write_1c824520bee3b935: function(arg0, arg1) {
964
981
  const ret = arg0.write(arg1);
965
982
  return ret;
966
983
  },
@@ -970,12 +987,12 @@ function __wbg_get_imports(memory) {
970
987
  return ret;
971
988
  },
972
989
  __wbindgen_generic_0000000000000002: function(arg0, arg1) {
973
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 551, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
990
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 553, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
974
991
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d3a5247b0aa3f0ac___convert__closures_____invoke___wasm_bindgen_d3a5247b0aa3f0ac___JsValue__core_ea519e494776717c___result__Result_____wasm_bindgen_d3a5247b0aa3f0ac___JsError___true_);
975
992
  return ret;
976
993
  },
977
994
  __wbindgen_generic_0000000000000003: function(arg0, arg1) {
978
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 553, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
995
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 555, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
979
996
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d3a5247b0aa3f0ac___convert__closures_____invoke___js_sys_2b088e2931f41c5___futures__task__wait_async_polyfill__MessageEvent______true_);
980
997
  return ret;
981
998
  },
package/sva_wasm_bg.wasm CHANGED
Binary file