Csound Csound-dev Csound-tekno Search About

[Csnd] Use WASM Csound to create an audio file in the browser

Date2024-09-19 17:40
FromIain Duncan
Subject[Csnd] Use WASM Csound to create an audio file in the browser
Hi folks, what I would like to do is have a pure client side web script create an audio file that can be downloaded by the user *without* a trip to the server (after the original page load, I mean). The file would be made based on my WASM Scheme engine, which is integrated already with the web audio api and also WASM audio worklets. It seems like Csound would be good for handling the scoring side, as it would be dead easy for the scheme engine to produce a csound score. So I hope:
- user make some settings choices
- engine creates score, renders wav file
- user can download said file as a typical link

I'm curious if anyone has done this or something similar?

thanks!
iain
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

Date2024-09-19 20:53
FromMichael Gogins
SubjectRe: [Csnd] Use WASM Csound to create an audio file in the browser

This piece of mine does what you ask. You can see how it works by inspecting the handler for the Record button.

https://gogins.github.io/cloud_music_no_14.html


On Thu, Sep 19, 2024, 18:41 Iain Duncan <iainduncanlists@gmail.com> wrote:
Hi folks, what I would like to do is have a pure client side web script create an audio file that can be downloaded by the user *without* a trip to the server (after the original page load, I mean). The file would be made based on my WASM Scheme engine, which is integrated already with the web audio api and also WASM audio worklets. It seems like Csound would be good for handling the scoring side, as it would be dead easy for the scheme engine to produce a csound score. So I hope:
- user make some settings choices
- engine creates score, renders wav file
- user can download said file as a typical link

I'm curious if anyone has done this or something similar?

thanks!
iain
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

Date2024-09-19 21:30
FromIain Duncan
SubjectRe: [Csnd] Use WASM Csound to create an audio file in the browser
Fantastic, thanks Michael! :-)

iain

On Thu, Sep 19, 2024 at 12:53 PM Michael Gogins <michael.gogins@gmail.com> wrote:

This piece of mine does what you ask. You can see how it works by inspecting the handler for the Record button.

https://gogins.github.io/cloud_music_no_14.html


On Thu, Sep 19, 2024, 18:41 Iain Duncan <iainduncanlists@gmail.com> wrote:
Hi folks, what I would like to do is have a pure client side web script create an audio file that can be downloaded by the user *without* a trip to the server (after the original page load, I mean). The file would be made based on my WASM Scheme engine, which is integrated already with the web audio api and also WASM audio worklets. It seems like Csound would be good for handling the scoring side, as it would be dead easy for the scheme engine to produce a csound score. So I hope:
- user make some settings choices
- engine creates score, renders wav file
- user can download said file as a typical link

I'm curious if anyone has done this or something similar?

thanks!
iain
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

Date2024-09-20 11:26
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] Use WASM Csound to create an audio file in the browser
This tutorial may be of help

Prof. Victor Lazzarini
Maynooth University
Ireland

On 19 Sep 2024, at 18:41, Iain Duncan <iainduncanlists@gmail.com> 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 folks, what I would like to do is have a pure client side web script create an audio file that can be downloaded by the user *without* a trip to the server (after the original page load, I mean). The file would be made based on my WASM Scheme engine, which is integrated already with the web audio api and also WASM audio worklets. It seems like Csound would be good for handling the scoring side, as it would be dead easy for the scheme engine to produce a csound score. So I hope:
- user make some settings choices
- engine creates score, renders wav file
- user can download said file as a typical link

I'm curious if anyone has done this or something similar?

thanks!
iain
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

Date2024-09-20 15:11
FromIain Duncan
SubjectRe: [Csnd] Use WASM Csound to create an audio file in the browser
oh great, exactly what I wanted. Thanks Victor!

On Fri, Sep 20, 2024 at 3:26 AM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
This tutorial may be of help

Prof. Victor Lazzarini
Maynooth University
Ireland

On 19 Sep 2024, at 18:41, Iain Duncan <iainduncanlists@gmail.com> 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 folks, what I would like to do is have a pure client side web script create an audio file that can be downloaded by the user *without* a trip to the server (after the original page load, I mean). The file would be made based on my WASM Scheme engine, which is integrated already with the web audio api and also WASM audio worklets. It seems like Csound would be good for handling the scoring side, as it would be dead easy for the scheme engine to produce a csound score. So I hope:
- user make some settings choices
- engine creates score, renders wav file
- user can download said file as a typical link

I'm curious if anyone has done this or something similar?

thanks!
iain
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