Skip to content

Conversation

@sletz
Copy link
Contributor

@sletz sletz commented Jan 1, 2026

No description provided.

@b-ma
Copy link
Collaborator

b-ma commented Jan 6, 2026

Hey thanks!
Just let me now when it is stabilizing on your side and you want me to merge (and happy new year :)

@sletz
Copy link
Contributor Author

sletz commented Jan 6, 2026

Happy new year 2026 !

Yes "vibe-coding/working" a lot on this project https://github.com/sletz/faust-mcp, so heavily using the node-web-audio-api, really nice BTW. I'm using my fork right now, I've let you know when a merge can be done.

@sletz
Copy link
Contributor Author

sletz commented Jan 10, 2026

Can you possibly merge now ? And update https://www.npmjs.com/package/node-web-audio-api ? Thanks.

@orottier
Copy link
Collaborator

I might be mistaken but I don't think updating a devDependency has an effect on end users

@b-ma b-ma merged commit 829b07b into ircam-ismm:main Jan 16, 2026
1 check passed
@b-ma
Copy link
Collaborator

b-ma commented Jan 16, 2026

Thanks!

I might be mistaken but I don't think updating a devDependency has an effect on end users

No indeed, it doesn't

@sletz
Copy link
Contributor Author

sletz commented Jan 16, 2026

Reading here: https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file, and having faustwasm packagage in devDependency, what is expected work flow for user using NPM packaged version when Faust support is needed ?

@b-ma
Copy link
Collaborator

b-ma commented Jan 16, 2026

For a end user, the workflow would be to install both the node-web-audio-api and @grame/faustwasm packages, and then use them as follow:

import { AudioContext, AudioWorkletNode } from 'node-web-audio-api';

// Expose AudioWorkletNode globally so faustwasm can patch it into worklet factories.
if (typeof globalThis.AudioWorkletNode === 'undefined') {
  globalThis.AudioWorkletNode = AudioWorkletNode;
}

const {
  instantiateFaustModuleFromFile,
  LibFaust,
  FaustCompiler,
  FaustMonoDspGenerator,
} = await import('@grame/faustwasm/dist/esm/index.js');

This is a bit convoluted for now... but I'm thinking about exposing a register-global.js entry point that should allow to clean this to:

import 'node-web-audio-api/register-global.js';
import {
  instantiateFaustModuleFromFile,
  LibFaust,
  FaustCompiler,
  FaustMonoDspGenerator,
} from '@grame/faustwasm/dist/esm/index.js';

cf. #166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants