@grame/faustwasm 0.0.55 → 0.0.57
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/assets/standalone/faustwasm/index.d.ts +1 -1
- package/assets/standalone/faustwasm/index.js +4 -9
- package/assets/standalone/faustwasm/index.js.map +2 -2
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +4 -9
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs-bundle/index.d.ts +1 -1
- package/dist/cjs-bundle/index.js +5 -10
- package/dist/cjs-bundle/index.js.map +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +4 -9
- package/dist/esm/index.js.map +2 -2
- package/dist/esm-bundle/index.d.ts +1 -1
- package/dist/esm-bundle/index.js +5 -10
- package/dist/esm-bundle/index.js.map +2 -2
- package/libfaust-wasm/libfaust-wasm.wasm +0 -0
- package/package.json +1 -1
- package/src/FaustDspGenerator.ts +6 -15
- package/test/Sinusoide.dsp +60 -0
- package/test/faustlive-wasm/faustwasm/index.d.ts +1 -1
- package/test/faustlive-wasm/faustwasm/index.js +4 -9
- package/test/faustlive-wasm/faustwasm/index.js.map +2 -2
- package/test/bug.dsp +0 -18
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1278,7 +1278,7 @@ export declare class FaustPolyDspGenerator implements IFaustPolyDspGenerator {
|
|
|
1278
1278
|
mixerBuffer: Uint8Array;
|
|
1279
1279
|
mixerModule: WebAssembly.Module;
|
|
1280
1280
|
constructor();
|
|
1281
|
-
compile(compiler: IFaustCompiler, name: string,
|
|
1281
|
+
compile(compiler: IFaustCompiler, name: string, dspCode: string, args: string, effectCode?: string): Promise<this | null>;
|
|
1282
1282
|
createNode<SP extends boolean = false>(context: BaseAudioContext, voices: number, name?: string, voiceFactory?: LooseFaustDspFactory, mixerModule?: WebAssembly.Module, effectFactory?: LooseFaustDspFactory | null, sp?: SP, bufferSize?: number, processorName?: string): Promise<SP extends true ? FaustPolyScriptProcessorNode | null : FaustPolyAudioWorkletNode | null>;
|
|
1283
1283
|
createAudioWorkletProcessor(name?: string, voiceFactory?: LooseFaustDspFactory, effectFactory?: LooseFaustDspFactory | null, processorName?: string): Promise<{
|
|
1284
1284
|
new (options: AudioWorkletNodeOptions): AudioWorkletProcessor;
|
package/dist/cjs/index.js
CHANGED
|
@@ -3644,26 +3644,21 @@ const dependencies = {
|
|
|
3644
3644
|
this.voiceFactory = null;
|
|
3645
3645
|
this.effectFactory = null;
|
|
3646
3646
|
}
|
|
3647
|
-
async compile(compiler, name,
|
|
3648
|
-
dsp_code = environment{
|
|
3649
|
-
${dspCodeAux}
|
|
3650
|
-
};
|
|
3651
|
-
process = dsp_code.effect;`) {
|
|
3652
|
-
const dspCode = `
|
|
3647
|
+
async compile(compiler, name, dspCode, args, effectCode = `
|
|
3653
3648
|
adapt(1,1) = _;
|
|
3654
3649
|
adapt(2,2) = _,_;
|
|
3655
3650
|
adapt(1,2) = _ <: _,_;
|
|
3656
3651
|
adapt(2,1) = _,_ :> _;
|
|
3657
3652
|
adaptor(F,G) = adapt(outputs(F),inputs(G));
|
|
3658
3653
|
dsp_code = environment{
|
|
3659
|
-
${
|
|
3654
|
+
${dspCode}
|
|
3660
3655
|
};
|
|
3661
|
-
process =
|
|
3656
|
+
process = adaptor(dsp_code.process, dsp_code.effect) : dsp_code.effect;`) {
|
|
3662
3657
|
this.voiceFactory = await compiler.createPolyDSPFactory(name, dspCode, args);
|
|
3663
3658
|
if (!this.voiceFactory)
|
|
3664
3659
|
return null;
|
|
3665
3660
|
try {
|
|
3666
|
-
this.effectFactory = await compiler.createPolyDSPFactory(name, effectCode, args
|
|
3661
|
+
this.effectFactory = await compiler.createPolyDSPFactory(name, effectCode, args);
|
|
3667
3662
|
} catch (e) {
|
|
3668
3663
|
console.warn(e);
|
|
3669
3664
|
}
|