{"id":21951045,"url":"https://github.com/fr0stbyter/faust2webaudio","last_synced_at":"2025-08-02T02:11:57.812Z","repository":{"id":42215696,"uuid":"174610746","full_name":"Fr0stbyteR/faust2webaudio","owner":"Fr0stbyteR","description":"faust2webaudio for npm","archived":false,"fork":false,"pushed_at":"2023-03-14T17:56:02.000Z","size":114630,"stargazers_count":10,"open_issues_count":5,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T03:34:12.845Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fr0stbyteR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-08T21:16:03.000Z","updated_at":"2024-10-17T19:25:09.000Z","dependencies_parsed_at":"2025-04-23T03:39:09.273Z","dependency_job_id":null,"html_url":"https://github.com/Fr0stbyteR/faust2webaudio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Fr0stbyteR/faust2webaudio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fr0stbyteR%2Ffaust2webaudio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fr0stbyteR%2Ffaust2webaudio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fr0stbyteR%2Ffaust2webaudio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fr0stbyteR%2Ffaust2webaudio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fr0stbyteR","download_url":"https://codeload.github.com/Fr0stbyteR/faust2webaudio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fr0stbyteR%2Ffaust2webaudio/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268326739,"owners_count":24232496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T06:11:34.728Z","updated_at":"2025-08-02T02:11:57.776Z","avatar_url":"https://github.com/Fr0stbyteR.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Faust2WebAudio\n\nThe repository is now maintained by [Grame-CNCM](https://github.com/grame-cncm/faust2webaudio). Please check that fork for the latest version.\n\nProduce a ScriptProcessorNode or an AudioWorkletNode with Faust .dsp code using the libfaust WebAssembly compiler.\n\nSupported Platforms: Chrome \u003e= 49, Firefox \u003e= 45, Edge \u003e= 13, Safari \u003e= 10, iOS \u003e= 10, Android \u003e= 68\n\n## Testing\n\nClone a copy of the repo:\n\n```bash\ngit clone https://github.com/grame-cncm/faust2webaudio\n```\nPut the directory in a local server, then open following pages:\n\nFor Mono ScriptProcessor: `./test/mono.html`\n\nFor Poly ScriptProcessor: `./test/poly.html`\n\nFor Mono AudioWorklet: `./test/wmono.html`\n\nFor Poly AudioWorklet: `./test/wpoly.html`\n\n## Installing as npm package\n\n```bash\nnpm install -D grame-cncm/faust2webaudio\n```\n\nExample: \n\n```JavaScript\nimport { Faust } from \"faust2webaudio\";\nconst audioCtx = new (window.AudioContext || window.webkitAudioContext)();\nconst code = `\nimport(\"stdfaust.lib\");\nprocess = ba.pulsen(1, 10000) : pm.djembe(60, 0.3, 0.4, 1) \u003c: dm.freeverb_demo;`;\nconst polycode = `\nimport(\"stdfaust.lib\");\nprocess = ba.pulsen(1, 10000) : pm.djembe(ba.hz2midikey(freq), 0.3, 0.4, 1) * gate * gain with {\n    freq = hslider(\"freq\", 440, 40, 8000, 1);\n    gain = hslider(\"gain\", 0.5, 0, 1, 0.01);\n    gate = button(\"gate\");\n};\neffect = dm.freeverb_demo;`;\nnew Faust2WebAudio.Faust().ready.then((faust) =\u003e {\n    faust.getNode(polycode, { audioCtx, useWorklet: window.AudioWorklet ? true : false, voices: 4, args: { \"-I\": \"https://faust.grame.fr/tools/editor/libraries/\" } })\n    .then(node =\u003e node.connect(audioCtx.destination));\n    faust.getNode(code, { audioCtx, useWorklet: window.AudioWorklet ? true : false, args: { \"-I\": \"https://faust.grame.fr/tools/editor/libraries/\" } })\n    .then(node =\u003e node.connect(audioCtx.destination));\n});\n```\n\n## Building\n\nFirstly ensure that you have [Git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/) installed.\n\nClone a copy of the repo then change to the directory:\n\n```bash\ngit clone https://github.com/grame-cncm/faust2webaudio\ncd faust2webaudio\n```\nInstall dev dependencies:\n\n```bash\nnpm install\n```\n\nPossibly:\n\n```bash\nnpm update\n```\n\nTo upgrade Libfaust version: replace `src/libfaust-wasm.js`, `dist/libfaust-wasm.wasm` and `dist/libfaust-wasm.data` with the new files\n\nTo build everything (using Webpack 4, Babel 7, TypeScript), this will produce `dist/index.js` and `dist/index.min.js` (this command must be done before commit + push on GitHub):\n```bash\nnpm run dist\n```\n\nIf you don't want to build the minified js for testing purpose:\n```bash\nnpm run build\n```\nTo test, put the directory in a local server, then open the following pages:\n\nFor Mono ScriptProcessor: `./test/mono.html`\nFor Poly ScriptProcessor: `./test/poly.html`\nFor Mono AudioWorklet: `./test/wmono.html`\nFor Poly AudioWorklet: `./test/wpoly.html`\n\n## Versioning \n\nYou'll have to raise the package version number in `package.json` for `npm run update` to properly work.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffr0stbyter%2Ffaust2webaudio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffr0stbyter%2Ffaust2webaudio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffr0stbyter%2Ffaust2webaudio/lists"}