@grame/faustwasm 0.0.65 → 0.0.67
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/TODO.md +5 -0
- package/assets/standalone/faustwasm/index.d.ts +6 -4
- package/assets/standalone/faustwasm/index.js +4 -4
- package/assets/standalone/faustwasm/index.js.map +2 -2
- package/dist/cjs/index.d.ts +6 -4
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs-bundle/index.d.ts +6 -4
- package/dist/cjs-bundle/index.js +4 -4
- package/dist/cjs-bundle/index.js.map +2 -2
- package/dist/esm/index.d.ts +6 -4
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +2 -2
- package/dist/esm-bundle/index.d.ts +6 -4
- package/dist/esm-bundle/index.js +4 -4
- package/dist/esm-bundle/index.js.map +2 -2
- package/package.json +2 -2
- package/src/FaustCmajor.ts +6 -6
- package/src/types.ts +5 -4
- package/test/faustlive-wasm/faustwasm/index.d.ts +6 -4
- package/test/faustlive-wasm/faustwasm/index.js +4 -4
- package/test/faustlive-wasm/faustwasm/index.js.map +2 -2
- package/test/tp0.dsp +17 -0
- package/test/tp0.dsp.json +30 -0
- package/test/tp0_local.dsp +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grame/faustwasm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.67",
|
|
4
4
|
"description": "WebAssembly version of Faust Compiler",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"types": "dist/esm/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"homepage": "https://github.com/grame-cncm/faustwasm#readme",
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@aws-crypto/sha256-js": "^2.0.1",
|
|
42
|
-
"@shren/faust-ui": "^1.1.
|
|
42
|
+
"@shren/faust-ui": "^1.1.8",
|
|
43
43
|
"@types/emscripten": "^1.39.5",
|
|
44
44
|
"@types/node": "^16.11.7",
|
|
45
45
|
"@types/webmidi": "^2.0.6",
|
package/src/FaustCmajor.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type LibFaust from "./LibFaust";
|
|
2
2
|
|
|
3
3
|
interface IFaustCmajor {
|
|
4
4
|
/**
|
|
@@ -13,15 +13,15 @@ interface IFaustCmajor {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
class FaustCmajor implements IFaustCmajor {
|
|
16
|
-
private
|
|
16
|
+
private fLibFaust: LibFaust;
|
|
17
17
|
|
|
18
|
-
constructor(
|
|
19
|
-
this.
|
|
18
|
+
constructor(libfaust: LibFaust) {
|
|
19
|
+
this.fLibFaust = libfaust;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
compile(name: string, code: string, args: string) {
|
|
23
|
-
const fs = this.
|
|
24
|
-
const success = this.
|
|
23
|
+
const fs = this.fLibFaust.fs();
|
|
24
|
+
const success = this.fLibFaust.generateAuxFiles(name, code, `-lang cmajor-hybrid -cn ${name} -o ${name}.cmajor`);
|
|
25
25
|
return (success) ? fs.readFile(`${name}.cmajor`, { encoding: "utf8" }) as string : "";
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/types.ts
CHANGED
|
@@ -112,7 +112,7 @@ export interface LibFaustWasm {
|
|
|
112
112
|
* json: the compiled DSP JSON description
|
|
113
113
|
* poly: whether the factory is a polyphonic one or not
|
|
114
114
|
*/
|
|
115
|
-
export interface FaustDspFactory extends Required<LooseFaustDspFactory> {}
|
|
115
|
+
export interface FaustDspFactory extends Required<LooseFaustDspFactory> { }
|
|
116
116
|
|
|
117
117
|
export interface LooseFaustDspFactory {
|
|
118
118
|
cfactory?: number;
|
|
@@ -143,6 +143,7 @@ export interface FaustUIInputItem {
|
|
|
143
143
|
type: FaustUIInputType;
|
|
144
144
|
label: string;
|
|
145
145
|
address: string;
|
|
146
|
+
url: string;
|
|
146
147
|
index: number;
|
|
147
148
|
init?: number;
|
|
148
149
|
min?: number;
|
|
@@ -170,7 +171,7 @@ export interface FaustUIMeta {
|
|
|
170
171
|
}
|
|
171
172
|
export type FaustUIGroupType = "vgroup" | "hgroup" | "tgroup";
|
|
172
173
|
export type FaustUIOutputType = "hbargraph" | "vbargraph";
|
|
173
|
-
export type FaustUIInputType = "vslider" | "hslider" | "button" | "checkbox" | "nentry";
|
|
174
|
+
export type FaustUIInputType = "vslider" | "hslider" | "button" | "checkbox" | "nentry" | "soundfile";
|
|
174
175
|
export interface FaustUIGroup {
|
|
175
176
|
type: FaustUIGroupType;
|
|
176
177
|
label: string;
|
|
@@ -193,7 +194,7 @@ export interface AudioWorkletProcessor {
|
|
|
193
194
|
export declare const AudioWorkletProcessor: {
|
|
194
195
|
prototype: AudioWorkletProcessor;
|
|
195
196
|
parameterDescriptors: AudioParamDescriptor[];
|
|
196
|
-
new
|
|
197
|
+
new(options: AudioWorkletNodeOptions): AudioWorkletProcessor;
|
|
197
198
|
};
|
|
198
199
|
|
|
199
200
|
export interface AudioWorkletGlobalScope {
|
|
@@ -212,7 +213,7 @@ export interface InterfaceFFT {
|
|
|
212
213
|
dispose(): void;
|
|
213
214
|
}
|
|
214
215
|
export declare const InterfaceFFT: {
|
|
215
|
-
new
|
|
216
|
+
new(size: number): InterfaceFFT;
|
|
216
217
|
}
|
|
217
218
|
|
|
218
219
|
export type TWindowFunction = (index: number, length: number, ...args: any[]) => number;
|
|
@@ -131,6 +131,7 @@ export interface FaustUIInputItem {
|
|
|
131
131
|
type: FaustUIInputType;
|
|
132
132
|
label: string;
|
|
133
133
|
address: string;
|
|
134
|
+
url: string;
|
|
134
135
|
index: number;
|
|
135
136
|
init?: number;
|
|
136
137
|
min?: number;
|
|
@@ -158,7 +159,7 @@ export interface FaustUIMeta {
|
|
|
158
159
|
}
|
|
159
160
|
export type FaustUIGroupType = "vgroup" | "hgroup" | "tgroup";
|
|
160
161
|
export type FaustUIOutputType = "hbargraph" | "vbargraph";
|
|
161
|
-
export type FaustUIInputType = "vslider" | "hslider" | "button" | "checkbox" | "nentry";
|
|
162
|
+
export type FaustUIInputType = "vslider" | "hslider" | "button" | "checkbox" | "nentry" | "soundfile";
|
|
162
163
|
export interface FaustUIGroup {
|
|
163
164
|
type: FaustUIGroupType;
|
|
164
165
|
label: string;
|
|
@@ -767,7 +768,8 @@ export interface FaustFFTAudioWorkletProcessorOptions {
|
|
|
767
768
|
}
|
|
768
769
|
export declare const getFaustFFTAudioWorkletProcessor: (dependencies: FaustFFTAudioWorkletProcessorDependencies, faustData: FaustFFTData, register?: boolean) => {
|
|
769
770
|
new (options: AudioWorkletNodeOptions): AudioWorkletProcessor;
|
|
770
|
-
|
|
771
|
+
/** Generated from the current window function */
|
|
772
|
+
prototype: AudioWorkletProcessor;
|
|
771
773
|
parameterDescriptors: AudioParamDescriptor[];
|
|
772
774
|
};
|
|
773
775
|
export interface ILibFaust extends LibFaustWasm {
|
|
@@ -1000,8 +1002,8 @@ export interface IFaustCmajor {
|
|
|
1000
1002
|
compile(name: string, code: string, args: string): string;
|
|
1001
1003
|
}
|
|
1002
1004
|
export declare class FaustCmajor implements IFaustCmajor {
|
|
1003
|
-
private
|
|
1004
|
-
constructor(
|
|
1005
|
+
private fLibFaust;
|
|
1006
|
+
constructor(libfaust: LibFaust);
|
|
1005
1007
|
compile(name: string, code: string, args: string): string;
|
|
1006
1008
|
}
|
|
1007
1009
|
export interface WavEncoderOptions {
|
|
@@ -2753,12 +2753,12 @@ var FaustSvgDiagrams_default = FaustSvgDiagrams;
|
|
|
2753
2753
|
|
|
2754
2754
|
// src/FaustCmajor.ts
|
|
2755
2755
|
var FaustCmajor = class {
|
|
2756
|
-
constructor(
|
|
2757
|
-
this.
|
|
2756
|
+
constructor(libfaust) {
|
|
2757
|
+
this.fLibFaust = libfaust;
|
|
2758
2758
|
}
|
|
2759
2759
|
compile(name, code, args) {
|
|
2760
|
-
const fs = this.
|
|
2761
|
-
const success = this.
|
|
2760
|
+
const fs = this.fLibFaust.fs();
|
|
2761
|
+
const success = this.fLibFaust.generateAuxFiles(name, code, `-lang cmajor-hybrid -cn ${name} -o ${name}.cmajor`);
|
|
2762
2762
|
return success ? fs.readFile(`${name}.cmajor`, { encoding: "utf8" }) : "";
|
|
2763
2763
|
}
|
|
2764
2764
|
};
|