mimium-web 3.0.0-alpha → 3.0.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.
package/README.md CHANGED
@@ -44,7 +44,7 @@ fn lpf(input,fb){
44
44
  Also, the language design is based on the call by value lambda calculus with multi-stage computation and the higher-order functions are supported to express generative signal graph like replicatiing multiple oscillators.
45
45
 
46
46
  ```rust
47
- //Sequentially connected oscillators
47
+ //10 Sequentially connected oscillators
48
48
  #stage(macro)
49
49
  fn cascade(n,gen){
50
50
  if (n>0.0){
@@ -58,7 +58,7 @@ fn cascade(n,gen){
58
58
  #stage(main)
59
59
  let osc = ...
60
60
  fn dsp(){
61
- let out = 50 |> cascade!(1000.0,`osc)
61
+ let out = 50 |> cascade!(10,`osc)
62
62
  (out,out)
63
63
  }
64
64
  ```
package/mimium_web.d.ts CHANGED
@@ -13,6 +13,7 @@ export class Context {
13
13
  free(): void;
14
14
  constructor(config: Config);
15
15
  compile(src: string): void;
16
+ recompile(src: string): void;
16
17
  get_input_channels(): number;
17
18
  get_output_channels(): number;
18
19
  /**
@@ -42,6 +43,7 @@ export interface InitOutput {
42
43
  readonly __wbg_context_free: (a: number, b: number) => void;
43
44
  readonly context_new: (a: number) => number;
44
45
  readonly context_compile: (a: number, b: number, c: number) => void;
46
+ readonly context_recompile: (a: number, b: number, c: number) => void;
45
47
  readonly context_get_input_channels: (a: number) => number;
46
48
  readonly context_get_output_channels: (a: number) => number;
47
49
  readonly context_process: (a: number, b: number, c: number, d: number, e: number, f: any) => bigint;
@@ -52,9 +54,9 @@ export interface InitOutput {
52
54
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
53
55
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
54
56
  readonly __wbindgen_export_6: WebAssembly.Table;
55
- readonly closure62_externref_shim: (a: number, b: number, c: any) => void;
56
- readonly closure71_externref_shim: (a: number, b: number, c: any) => void;
57
- readonly closure88_externref_shim: (a: number, b: number, c: any, d: any) => void;
57
+ readonly closure68_externref_shim: (a: number, b: number, c: any) => void;
58
+ readonly closure82_externref_shim: (a: number, b: number, c: any) => void;
59
+ readonly closure99_externref_shim: (a: number, b: number, c: any, d: any) => void;
58
60
  readonly __wbindgen_start: () => void;
59
61
  }
60
62
 
package/mimium_web.js CHANGED
@@ -1,4 +1,4 @@
1
- import { read_file } from './snippets/mimium-lang-26dcaacbe296fcc0/src/utils/fileloader.cjs';
1
+ import { read_file } from './snippets/mimium-lang-43114209b42a5c1b/src/utils/fileloader.cjs';
2
2
 
3
3
  let wasm;
4
4
 
@@ -234,15 +234,15 @@ function passArrayF32ToWasm0(arg, malloc) {
234
234
  return ptr;
235
235
  }
236
236
  function __wbg_adapter_18(arg0, arg1, arg2) {
237
- wasm.closure62_externref_shim(arg0, arg1, arg2);
237
+ wasm.closure68_externref_shim(arg0, arg1, arg2);
238
238
  }
239
239
 
240
240
  function __wbg_adapter_21(arg0, arg1, arg2) {
241
- wasm.closure71_externref_shim(arg0, arg1, arg2);
241
+ wasm.closure82_externref_shim(arg0, arg1, arg2);
242
242
  }
243
243
 
244
- function __wbg_adapter_72(arg0, arg1, arg2, arg3) {
245
- wasm.closure88_externref_shim(arg0, arg1, arg2, arg3);
244
+ function __wbg_adapter_73(arg0, arg1, arg2, arg3) {
245
+ wasm.closure99_externref_shim(arg0, arg1, arg2, arg3);
246
246
  }
247
247
 
248
248
  const ConfigFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -367,6 +367,14 @@ export class Context {
367
367
  const len0 = WASM_VECTOR_LEN;
368
368
  wasm.context_compile(this.__wbg_ptr, ptr0, len0);
369
369
  }
370
+ /**
371
+ * @param {string} src
372
+ */
373
+ recompile(src) {
374
+ const ptr0 = passStringToWasm0(src, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
375
+ const len0 = WASM_VECTOR_LEN;
376
+ wasm.context_recompile(this.__wbg_ptr, ptr0, len0);
377
+ }
370
378
  /**
371
379
  * @returns {number}
372
380
  */
@@ -464,7 +472,7 @@ function __wbg_get_imports() {
464
472
  const a = state0.a;
465
473
  state0.a = 0;
466
474
  try {
467
- return __wbg_adapter_72(a, state0.b, arg0, arg1);
475
+ return __wbg_adapter_73(a, state0.b, arg0, arg1);
468
476
  } finally {
469
477
  state0.a = a;
470
478
  }
@@ -542,7 +550,7 @@ function __wbg_get_imports() {
542
550
  const ret = arg0.open();
543
551
  return ret;
544
552
  };
545
- imports.wbg.__wbg_readfile_4315899bb6081982 = function() { return handleError(function (arg0, arg1, arg2) {
553
+ imports.wbg.__wbg_readfile_ac22441a85428bfc = function() { return handleError(function (arg0, arg1, arg2) {
546
554
  const ret = read_file(getStringFromWasm0(arg1, arg2));
547
555
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
548
556
  const len1 = WASM_VECTOR_LEN;
@@ -599,12 +607,12 @@ function __wbg_get_imports() {
599
607
  const ret = false;
600
608
  return ret;
601
609
  };
602
- imports.wbg.__wbindgen_closure_wrapper167 = function(arg0, arg1, arg2) {
603
- const ret = makeMutClosure(arg0, arg1, 63, __wbg_adapter_18);
610
+ imports.wbg.__wbindgen_closure_wrapper199 = function(arg0, arg1, arg2) {
611
+ const ret = makeMutClosure(arg0, arg1, 69, __wbg_adapter_18);
604
612
  return ret;
605
613
  };
606
- imports.wbg.__wbindgen_closure_wrapper183 = function(arg0, arg1, arg2) {
607
- const ret = makeMutClosure(arg0, arg1, 72, __wbg_adapter_21);
614
+ imports.wbg.__wbindgen_closure_wrapper232 = function(arg0, arg1, arg2) {
615
+ const ret = makeMutClosure(arg0, arg1, 83, __wbg_adapter_21);
608
616
  return ret;
609
617
  };
610
618
  imports.wbg.__wbindgen_copy_to_typed_array = function(arg0, arg1, arg2) {
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Tomoya Matsuura <me@matsuuratomoya.com>"
6
6
  ],
7
7
  "description": "mimium wasm binding package.",
8
- "version": "3.0.0-alpha",
8
+ "version": "3.0.0",
9
9
  "license": "MPL-2.0",
10
10
  "repository": {
11
11
  "type": "git",