[Csnd] WASM setOutputChannelCallback
Date | 2022-11-13 15:21 |
From | Richard Knight |
Subject | [Csnd] WASM setOutputChannelCallback |
Is/will the equivalent of csoundSetOutputChannelCallback be available in Csound WASM? I have had a look through the documentation and a bit of a search through what is readable in the source/interface, but can't find reference to this function. 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 |
Date | 2022-11-17 19:01 |
From | Richard Knight |
Subject | [Csnd-dev] Fwd: [Csnd] WASM setOutputChannelCallback |
Hi Does anyone here know/can help with this? Hoping to use csoundSetOutputChannelCallback in Csound WASM but doesn't appear to be implemented, wondering if I may have missed something, or it may be planned for the future (or not possible for some reason)? thanks Richard -------- Original Message -------- Subject: [Csnd] WASM setOutputChannelCallback Date: 2022-11-13 15:21 From: Richard Knight |
Date | 2022-11-17 21:03 |
From | Hlöðver Sigurðsson |
Subject | Re: [Csnd-dev] Fwd: [Csnd] WASM setOutputChannelCallback |
it's not there, the callback is called in c-land and the user would need to pass a js function. That is possible, but given that csound runs inside a worker, I don't think you can pass a function to worker threads. What use case are you missing from the outputChannelCallback? On Thu, 17 Nov 2022 at 20:01, Richard Knight <richard@1bpm.net> wrote: Hi |
Date | 2022-11-17 23:30 |
From | Richard Knight |
Subject | Re: [Csnd-dev] Fwd: [Csnd] WASM setOutputChannelCallback |
Ah OK, thanks. I typically use it for a sort of callback approach often with ctcsound, usually passing a JSON formatted string from an instrument back to the host. I suppose as a workaround for these, I could set a string channel and have the host periodically check if that's changed, or combine that with another k-rate channel as a trigger to inform the host that the string channel has changed / should be read (possibly may be less intensive than periodically checking if a string channel has changed). On 2022-11-17 21:03, Hlöðver Sigurðsson wrote:
|
Date | 2022-11-18 14:20 |
From | Hlöðver Sigurðsson |
Subject | Re: [Csnd-dev] Fwd: [Csnd] WASM setOutputChannelCallback |
I could look into sending a signal from the worker to the main thread when this is called and allow the user to send a function pointer that will be called in javascript from the main thread. I just wonder if this will fit with the callback arguments passed, if any. I will take a look. On Fri, 18 Nov 2022 at 00:30, Richard Knight <richard@1bpm.net> wrote:
|
Date | 2022-11-19 15:08 |
From | Richard Knight |
Subject | Re: [Csnd-dev] Fwd: [Csnd] WASM setOutputChannelCallback |
Sounds like an good idea, I'll be interested to hear if it seems feasible. I'll see how possible the workarounds I mentioned and other approaches may be while porting my stuff from ctcsound to WASM. On 2022-11-18 14:20, Hlöðver Sigurðsson wrote:
|
Date | 2022-11-19 23:16 |
From | Hlöðver Sigurðsson |
Subject | Re: [Csnd-dev] Fwd: [Csnd] WASM setOutputChannelCallback |
are you thinking to port stuff to the browser or run ctcsound with a python wasm interpreter? On Sat, 19 Nov 2022 at 16:13, Richard Knight <richard@1bpm.net> wrote:
|
Date | 2022-11-20 13:57 |
From | Richard Knight |
Subject | Re: [Csnd-dev] Fwd: [Csnd] WASM setOutputChannelCallback |
Ah I just mean move my Csound files to the browser and try alternatives to the reliance on outvalue/setOutputChannelCallback. On 2022-11-19 23:16, Hlöðver Sigurðsson wrote:
|