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 +4 -3
- package/mimium_web.d.ts +87 -67
- package/mimium_web.js +597 -599
- package/mimium_web_bg.wasm +0 -0
- package/package.json +1 -1
- package/snippets/mimium-lang-c46ac7897e913134/src/utils/fileloader.mjs +391 -0
- package/snippets/mimium-lang-53ba5794920c42b3/inline0.js +0 -181
- package/snippets/mimium-lang-53ba5794920c42b3/src/utils/fileloader.cjs +0 -189
- package/snippets/mimium-lang-bc3c111c42789f9d/src/utils/fileloader.cjs +0 -189
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
|
|
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
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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>;
|