Csound Csound-dev Csound-tekno Search About

[Csnd] web audio on node.js

Date2025-11-12 23:17
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
Subject[Csnd] web audio on node.js

Has anyone tried this


I wonder if we could Csound on node.js with it.

Prof. Victor Lazzarini
Maynooth University
Ireland

Date2025-11-13 11:31
FromLovre Bogdanić
SubjectRe: [Csnd] web audio on node.js

Hi Victor!

 

I didn’t try that exactly but I did try something related that is maybe also interesting and that is Csound in Web Audio Modules (WAMs). If I’m not wrong, WAM is built on top of web audio api.

 

WAM api repo: https://github.com/webaudiomodules/api

Here is an easy to follow example from Steven how to build WAM with csound: https://github.com/webaudiomodules/wam-examples/tree/master/packages/csoundPitchShifter

And a nice tutorial also from Steven regarding Csound on Web: https://kunstmusik.github.io/icsc2022-csound-web/

 

I’ve developed a proof of concept for exporting a Cabbage 3 instrument as WAM: https://gitlab.gwdg.de/lovre.bogdanic/cabbage32wam. And also I developed a playground for WAMs in form of a browser based node editor called WANE: https://gitlab-pe.gwdg.de/lovre.bogdanic/wane and you can directly try it here: https://wane-3508d7.pages-pe.gwdguser.de/.

 

When it comes to cabbage32wam, its far from complete implementation but it works well for GUI to WebAudioNode communication (meaning changing gui widgets value propagates correctly to audio node) but other way around doesn’t work yet. Also currently only one instance of cabbage32wam can be loaded into WANE (bug in cabbage32wam).

 

If you (or anyone else ;) ) try it out, let me know what you think.

 

Hope this helps a bit.

 

Best,

Lovre



On Thu, Nov 13, 2025 at 12:17 AM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:

Has anyone tried this


I wonder if we could Csound on node.js with it.

Prof. Victor Lazzarini
Maynooth University
Ireland
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2025-11-13 13:30
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] [EXTERNAL] [Csnd] web audio on node.js
Nice! Thanks for sharing.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland






> On 13 Nov 2025, at 11:31, Lovre Bogdanić  wrote:
> 
> *Warning*
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> Hi Victor!
>  
> I didn’t try that exactly but I did try something related that is maybe also interesting and that is Csound in Web Audio Modules (WAMs). If I’m not wrong, WAM is built on top of web audio api.
>  
> WAM api repo: https://github.com/webaudiomodules/api
> Here is an easy to follow example from Steven how to build WAM with csound: https://github.com/webaudiomodules/wam-examples/tree/master/packages/csoundPitchShifter And a nice tutorial also from Steven regarding Csound on Web: https://kunstmusik.github.io/icsc2022-csound-web/
>  
> I’ve developed a proof of concept for exporting a Cabbage 3 instrument as WAM: https://gitlab.gwdg.de/lovre.bogdanic/cabbage32wam. And also I developed a playground for WAMs in form of a browser based node editor called WANE: https://gitlab-pe.gwdg.de/lovre.bogdanic/wane and you can directly try it here: https://wane-3508d7.pages-pe.gwdguser.de/. 
>  
> When it comes to cabbage32wam, its far from complete implementation but it works well for GUI to WebAudioNode communication (meaning changing gui widgets value propagates correctly to audio node) but other way around doesn’t work yet. Also currently only one instance of cabbage32wam can be loaded into WANE (bug in cabbage32wam).
>  
> If you (or anyone else ;) ) try it out, let me know what you think.
>  
> Hope this helps a bit.
>  
> Best,
> Lovre
> 
> 
> On Thu, Nov 13, 2025 at 12:17 AM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
> 
> Has anyone tried this
> 
> https://github.com/audiojs/web-audio-api
> 
> I wonder if we could Csound on node.js with it.
> 
> Prof. Victor Lazzarini 
> Maynooth University
> Ireland
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2025-11-13 16:21
FromSteven Yi
SubjectRe: [Csnd] web audio on node.js
Nice work Lovre!

Regarding running on node.js, Hlodver originally did a @csound/node
package that used the @csound/wasm-bin wasm binary, but that hasn't
been kept up to date. There's also Nate Whetsell's csound-api package
(https://www.npmjs.com/package/csound-api) that works with native
csound. I think both paths (wasm vs native) would be great to have for
Csound 7.

On Thu, Nov 13, 2025 at 6:33 AM Lovre Bogdanić  wrote:
>
> Hi Victor!
>
>
>
> I didn’t try that exactly but I did try something related that is maybe also interesting and that is Csound in Web Audio Modules (WAMs). If I’m not wrong, WAM is built on top of web audio api.
>
>
>
> WAM api repo: https://github.com/webaudiomodules/api
>
> Here is an easy to follow example from Steven how to build WAM with csound: https://github.com/webaudiomodules/wam-examples/tree/master/packages/csoundPitchShifter
>
> And a nice tutorial also from Steven regarding Csound on Web: https://kunstmusik.github.io/icsc2022-csound-web/
>
>
>
> I’ve developed a proof of concept for exporting a Cabbage 3 instrument as WAM: https://gitlab.gwdg.de/lovre.bogdanic/cabbage32wam. And also I developed a playground for WAMs in form of a browser based node editor called WANE: https://gitlab-pe.gwdg.de/lovre.bogdanic/wane and you can directly try it here: https://wane-3508d7.pages-pe.gwdguser.de/.
>
>
>
> When it comes to cabbage32wam, its far from complete implementation but it works well for GUI to WebAudioNode communication (meaning changing gui widgets value propagates correctly to audio node) but other way around doesn’t work yet. Also currently only one instance of cabbage32wam can be loaded into WANE (bug in cabbage32wam).
>
>
>
> If you (or anyone else ;) ) try it out, let me know what you think.
>
>
>
> Hope this helps a bit.
>
>
>
> Best,
>
> Lovre
>
>
>
> On Thu, Nov 13, 2025 at 12:17 AM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
>>
>>
>> Has anyone tried this
>>
>> https://github.com/audiojs/web-audio-api
>>
>> I wonder if we could Csound on node.js with it.
>>
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
>
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here