[Csnd] WebAudio Csound on mobile devices
Date | 2019-09-11 15:01 |
From | Tarmo Johannes |
Subject | [Csnd] WebAudio Csound on mobile devices |
Hi, I tried out a web application with WebAudio Csound: On desktop it works fine but my experience with handheld devices is: on Android/Chrome there is huge latency (but this might be something to do with the KineticJS used for canvas) on Android/Samsung internet browser and iOs/Safari the audio is crackling (I think they both are based on Webkit?). Also crackle with these browsers. What is your experience? Can someone comment? Thanks! tarmo |
Date | 2019-09-11 15:58 |
From | Steven Yi |
Subject | Re: [Csnd] WebAudio Csound on mobile devices |
I tried and also got crackles on the flute page. Sliders worked alright here, canvas did not make sound. This is with Android Chrome on Pixel 3. Running https://instruments.kunstmusik.com/ (these were made a couple of years ago, code at https://github.com/kunstmusik/instruments) on my browser was very smooth with little latency. I have not tested on iOS in a while, but last I checked Safari had a not very good WebAudio experience. I think it does not support AudioWorklets and shares issues that happen with ScriptProcessorNode running on the main thread. On desktop and mobile though, I've found Firefox's SPN implementation to be quite good compared to Chrome-based browsers. The instruments site ran here on Android and did not hiccup even when using multitouch input. I checked and the instruments site is using Csound 6.11. I don't know if that is a factor, or if Victor's csound.js wrapper is a factor, or canvas, or what. I suppose it might be good to check the instruments site on your devices to see how that responds and maybe we can figure out more information from there. On Wed, Sep 11, 2019 at 10:01 AM Tarmo Johannes |
Date | 2019-09-13 22:11 |
From | Tarmo Johannes |
Subject | Re: [Csnd] WebAudio Csound on mobile devices |
Attachments | None None |
Date | 2019-09-14 01:26 |
From | Steven Yi |
Subject | Re: [Csnd] WebAudio Csound on mobile devices |
Hi Tarmo, HTTPS is definitely a requirement to use Audioworklets: "Creating an AudioWorkletNode requires at least two things: an AudioContext object and the processor name as a string. A processor definition can be loaded and registered by the new Audio Worklet object's addModule() call. Worklet APIs including Audio Worklet are only available in a secure context, thus a page using them must be served over HTTPS, although http://localhost is considered a secure for local testing." (from https://developers.google.com/web/updates/2017/12/audio-worklet) That may be the issue for your. I saw that http://tarmo.uuu.ee/wasm/flute/flute.html loaded SPN but https://tarmo.uuu.ee/wasm/flute/flute.html loaded AudioWorklet on Chrome Desktop here. Perhaps that's the issue? Steven On Fri, Sep 13, 2019 at 5:11 PM Tarmo Johannes |