mimium-web 4.0.0-alpha.1 → 4.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
@@ -67,11 +67,11 @@ mimium is a statically typed language but the most of type annotations can be om
67
67
 
68
68
  ### Live Coding
69
69
 
70
- mimium can describe digital signal processing algorithm from very low-level, like Faust. Moreover, mimium can update source code without audio interruption, which enables **full-scratch dsp livecoding** performance.
70
+ mimium can describe digital signal processing algorithm from very low-level, like Faust. Moreover, mimium can update source code without an audio discontinuity and keeps tail of delay and reverb, which enables **full-scratch dsp livecoding** performance.
71
71
 
72
72
  ### Extensibility
73
73
 
74
- mimium's VM design is inspired by Lua, that can be easily embedded on Rust application through the plugin system. External functions(closures) defined in Rust can be easily called from mimium.
74
+ mimium's VM design is inspired by Lua, that can be easily embedded on Rust application through the plugin system. External functions (closures) defined in Rust can be easily called from mimium.
75
75
 
76
76
  ## Installation
77
77
 
@@ -87,7 +87,7 @@ See [Development](./Development) section.
87
87
 
88
88
  ## Contributing
89
89
 
90
- There's no concrete way for contributing to the mimium project for now but any type of contribution (bugfix, code refactoring, documentation, showing the usecases, etc).
90
+ Any type of contribution (bugfix, code refactoring, documentation, showing the usecases, etc) are welcome.
91
91
 
92
92
  (However, because the mimium is still early stage of the development and there's much things to do, the proposal or request for new feature without Pull Request may not be accepted.)
93
93
 
@@ -123,6 +123,7 @@ This list contains the contributers from v1 development, documentation and finan
123
123
  - [kyo](https://github.com/syougikakugenn)
124
124
  - [Inqb8tr-jp](https://github.com/Inqb8tr-jp)
125
125
  - [zakuro9715](https://github.com/zakuro9715)
126
+ - [kuroboshi](https://github.com/kuroboshi)
126
127
 
127
128
  #### Other forms of Contributions
128
129
 
package/mimium_web.d.ts CHANGED
@@ -1,85 +1,105 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+
3
4
  export class Config {
4
- private constructor();
5
- free(): void;
6
- static new(): Config;
7
- sample_rate: number;
8
- input_channels: number;
9
- output_channels: number;
10
- buffer_size: number;
5
+ private constructor();
6
+ free(): void;
7
+ [Symbol.dispose](): void;
8
+ static new(): Config;
9
+ buffer_size: number;
10
+ input_channels: number;
11
+ output_channels: number;
12
+ sample_rate: number;
11
13
  }
14
+
12
15
  export class Context {
13
- free(): void;
14
- get_input_channels(): number;
15
- get_output_channels(): number;
16
- init_github_lib_cache(): Promise<void>;
17
- constructor(config: Config);
18
- compile(src: string): Promise<void>;
19
- /**
20
- * .
21
- *
22
- * # Safety
23
- * Array size of input and output must be equal to `input_channels * buffer_size` and `output_channels * buffer_size` respectively.
24
- * .
25
- */
26
- process(input: Float32Array, output: Float32Array): bigint;
27
- recompile(src: string): Promise<void>;
16
+ free(): void;
17
+ [Symbol.dispose](): void;
18
+ clear_virtual_file_cache(): void;
19
+ compile(src: string): Promise<void>;
20
+ compile_direct(src: string): void;
21
+ export_virtual_file_cache_json(): string;
22
+ get_input_channels(): number;
23
+ get_output_channels(): number;
24
+ import_virtual_file_cache_json(payload: string): void;
25
+ init_github_lib_cache(): Promise<void>;
26
+ init_lib_cache_with_base_url(base_url: string): Promise<void>;
27
+ constructor(config: Config);
28
+ /**
29
+ * .
30
+ *
31
+ * # Safety
32
+ * Array size of input and output must be equal to `input_channels * buffer_size` and `output_channels * buffer_size` respectively.
33
+ * .
34
+ */
35
+ process(input: Float32Array, output: Float32Array): bigint;
36
+ put_virtual_file_cache(path: string, content: string): void;
37
+ recompile(src: string): Promise<void>;
38
+ recompile_direct(src: string): void;
39
+ set_module_base_url(base_url: string): void;
28
40
  }
29
41
 
30
42
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
31
43
 
32
44
  export interface InitOutput {
33
- readonly memory: WebAssembly.Memory;
34
- readonly __wbg_config_free: (a: number, b: number) => void;
35
- readonly __wbg_context_free: (a: number, b: number) => void;
36
- readonly __wbg_get_config_buffer_size: (a: number) => number;
37
- readonly __wbg_get_config_input_channels: (a: number) => number;
38
- readonly __wbg_get_config_output_channels: (a: number) => number;
39
- readonly __wbg_get_config_sample_rate: (a: number) => number;
40
- readonly __wbg_set_config_buffer_size: (a: number, b: number) => void;
41
- readonly __wbg_set_config_input_channels: (a: number, b: number) => void;
42
- readonly __wbg_set_config_output_channels: (a: number, b: number) => void;
43
- readonly __wbg_set_config_sample_rate: (a: number, b: number) => void;
44
- readonly config_new: () => number;
45
- readonly context_compile: (a: number, b: number, c: number) => any;
46
- readonly context_get_input_channels: (a: number) => number;
47
- readonly context_get_output_channels: (a: number) => number;
48
- readonly context_init_github_lib_cache: (a: number) => any;
49
- readonly context_new: (a: number) => number;
50
- readonly context_process: (a: number, b: number, c: number, d: number, e: number, f: any) => bigint;
51
- readonly context_recompile: (a: number, b: number, c: number) => any;
52
- readonly __wbindgen_exn_store: (a: number) => void;
53
- readonly __externref_table_alloc: () => number;
54
- readonly __wbindgen_export_2: WebAssembly.Table;
55
- readonly __wbindgen_malloc: (a: number, b: number) => number;
56
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
57
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
58
- readonly __wbindgen_export_6: WebAssembly.Table;
59
- readonly closure80_externref_shim: (a: number, b: number, c: any) => void;
60
- readonly closure93_externref_shim: (a: number, b: number, c: any) => void;
61
- readonly closure649_externref_shim: (a: number, b: number, c: any) => void;
62
- readonly closure662_externref_shim: (a: number, b: number, c: any, d: any) => void;
63
- readonly __wbindgen_start: () => void;
45
+ readonly memory: WebAssembly.Memory;
46
+ readonly __wbg_config_free: (a: number, b: number) => void;
47
+ readonly __wbg_context_free: (a: number, b: number) => void;
48
+ readonly __wbg_get_config_buffer_size: (a: number) => number;
49
+ readonly __wbg_get_config_input_channels: (a: number) => number;
50
+ readonly __wbg_get_config_output_channels: (a: number) => number;
51
+ readonly __wbg_get_config_sample_rate: (a: number) => number;
52
+ readonly __wbg_set_config_buffer_size: (a: number, b: number) => void;
53
+ readonly __wbg_set_config_input_channels: (a: number, b: number) => void;
54
+ readonly __wbg_set_config_output_channels: (a: number, b: number) => void;
55
+ readonly __wbg_set_config_sample_rate: (a: number, b: number) => void;
56
+ readonly config_new: () => number;
57
+ readonly context_clear_virtual_file_cache: (a: number) => [number, number];
58
+ readonly context_compile: (a: number, b: number, c: number) => any;
59
+ readonly context_compile_direct: (a: number, b: number, c: number) => [number, number];
60
+ readonly context_export_virtual_file_cache_json: (a: number) => [number, number, number, number];
61
+ readonly context_get_input_channels: (a: number) => number;
62
+ readonly context_get_output_channels: (a: number) => number;
63
+ readonly context_import_virtual_file_cache_json: (a: number, b: number, c: number) => [number, number];
64
+ readonly context_init_github_lib_cache: (a: number) => any;
65
+ readonly context_init_lib_cache_with_base_url: (a: number, b: number, c: number) => any;
66
+ readonly context_new: (a: number) => number;
67
+ readonly context_process: (a: number, b: number, c: number, d: number, e: number, f: any) => bigint;
68
+ readonly context_put_virtual_file_cache: (a: number, b: number, c: number, d: number, e: number) => [number, number];
69
+ readonly context_recompile: (a: number, b: number, c: number) => any;
70
+ readonly context_recompile_direct: (a: number, b: number, c: number) => [number, number];
71
+ readonly context_set_module_base_url: (a: number, b: number, c: number) => [number, number];
72
+ readonly wasm_bindgen__closure__destroy__hbd36d0a93d842323: (a: number, b: number) => void;
73
+ readonly wasm_bindgen__convert__closures_____invoke__h1e1f82066e0a305f: (a: number, b: number, c: any) => [number, number];
74
+ readonly wasm_bindgen__convert__closures_____invoke__h88f23ffac03dc2c6: (a: number, b: number, c: any, d: any) => void;
75
+ readonly __wbindgen_exn_store: (a: number) => void;
76
+ readonly __externref_table_alloc: () => number;
77
+ readonly __wbindgen_externrefs: WebAssembly.Table;
78
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
79
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
80
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
81
+ readonly __externref_table_dealloc: (a: number) => void;
82
+ readonly __wbindgen_start: () => void;
64
83
  }
65
84
 
66
85
  export type SyncInitInput = BufferSource | WebAssembly.Module;
86
+
67
87
  /**
68
- * Instantiates the given `module`, which can either be bytes or
69
- * a precompiled `WebAssembly.Module`.
70
- *
71
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
72
- *
73
- * @returns {InitOutput}
74
- */
88
+ * Instantiates the given `module`, which can either be bytes or
89
+ * a precompiled `WebAssembly.Module`.
90
+ *
91
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
92
+ *
93
+ * @returns {InitOutput}
94
+ */
75
95
  export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
76
96
 
77
97
  /**
78
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
79
- * for everything else, calls `WebAssembly.instantiate` directly.
80
- *
81
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
82
- *
83
- * @returns {Promise<InitOutput>}
84
- */
98
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
99
+ * for everything else, calls `WebAssembly.instantiate` directly.
100
+ *
101
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
102
+ *
103
+ * @returns {Promise<InitOutput>}
104
+ */
85
105
  export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;