Csound Csound-dev Csound-tekno Search About

[Csnd] wasm: getting csound csound messages

Date2022-11-11 15:51
FromVictor Lazzarini
Subject[Csnd] wasm: getting csound csound messages
Is there a way in Csound WASM to intercept messages (that go by default to the JS console) and print them in the page?

========================
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

Date2022-11-11 20:52
FromSteven Yi
SubjectRe: [Csnd] wasm: getting csound csound messages
Should be able to use:

await cs.on("message", csoundMsgCallback);

after you create your CsoundObj object. An example callback:

const csoundMsgCallback = msg => {
  consoleOutput.innerHTML += msg + "\n";
};

There's a little bit of documentation around possible events and "message" here:

https://www.npmjs.com/package/@csound/browser#PublicEvents

On Fri, Nov 11, 2022 at 9:51 AM Victor Lazzarini  wrote:
>
> Is there a way in Csound WASM to intercept messages (that go by default to the JS console) and print them in the page?
>
> ========================
> 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

Date2022-11-11 21:24
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] wasm: getting csound csound messages
thanks.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 11 Nov 2022, at 20:52, Steven Yi  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.
> 
> Should be able to use:
> 
> await cs.on("message", csoundMsgCallback);
> 
> after you create your CsoundObj object. An example callback:
> 
> const csoundMsgCallback = msg => {
>  consoleOutput.innerHTML += msg + "\n";
> };
> 
> There's a little bit of documentation around possible events and "message" here:
> 
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2F%40csound%2Fbrowser%23PublicEvents&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C26bec2e82d50473a7b0708dac426e20b%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638037968527154198%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=c8QFyHe38KplVJ40U1jZgWw5oCmVsWj7xmmoMBslWUM%3D&reserved=0
> 
> On Fri, Nov 11, 2022 at 9:51 AM Victor Lazzarini  wrote:
>> 
>> Is there a way in Csound WASM to intercept messages (that go by default to the JS console) and print them in the page?
>> 
>> ========================
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>> 
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C26bec2e82d50473a7b0708dac426e20b%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638037968527154198%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Ly7wHEE5PCtMI5UNjwwou7GHAKek5ryVbkZ95zebSfs%3D&reserved=0
>> Send bugs reports to
>>        https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C26bec2e82d50473a7b0708dac426e20b%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638037968527154198%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=T7PrbEbrqadWxxSuzOeA%2Bn9xi3BVrms%2FSEMqFvfMqj0%3D&reserved=0
>> Discussions of bugs and features can be posted here
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C26bec2e82d50473a7b0708dac426e20b%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638037968527154198%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Ly7wHEE5PCtMI5UNjwwou7GHAKek5ryVbkZ95zebSfs%3D&reserved=0
> Send bugs reports to
>        https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C26bec2e82d50473a7b0708dac426e20b%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638037968527310422%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=QRRRj7OlqvhCMPqiqz2WtQUvAmo8svaZ4C7UXsdTkbE%3D&reserved=0
> 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