[Cs-dev] What is the status of the Emscripten build?
Date | 2015-06-18 02:43 |
From | Michael Gogins |
Subject | [Cs-dev] What is the status of the Emscripten build? |
Attachments | None None |
I am presenting a talk at the New York City Electroacousic Music Conference on new developments in HTML and JavaScript for computer music. I was hoping to discuss and demonstrate the Emscripten build of Csound, but when I went here (http://eddyc.github.io/CsoundEmscripten/) it didn't work with this error (GET http://eddyc.github.io/CsoundEmscripten/javascripts/libcsound.js h.load @ require.js:34i.load @ require.js:29$.load @ require.js:18(anonymous function) @ require.js:17c @ require.js:8i.execCb @ require.js:29$.check @ require.js:18$.enable @ require.js:23$.init @ require.js:17(anonymous function) @ require.js:26
require.js:8 Uncaught Error: Script error for: libcsound http://requirejs.org/docs/errors.html#scripterror).What is the current state of this project? Is it being maintained? Is anybody using it? I don't have CLang so can't work on this myself at the moment, though that could change. I suppose I can download the Emscripten build and set up a local Web server, or use it with NW.js. I am going to talk about Gibber and about HTML and JavaScript for PNaCl Csound, Csound for Android, CsoundQt, and csound.node for NW.js (used to be called Node-Webkit). But it would be nice to show Emscripten as well. Thanks, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com |
Date | 2015-06-18 07:35 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] What is the status of the Emscripten build? |
Attachments | None None |
It certainly has not been abandoned. Not sure if they are making any changes that have not stabilized yet. If you want, I can send you a local copy I have. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-06-18 13:19 |
From | Edward Costello |
Subject | Re: [Cs-dev] What is the status of the Emscripten build? |
Attachments | None None |
Hi, This http://eddyc.github.io/CsoundEmscripten has not been maintained as the emscripten build of Csound is now part of the main source in the emscripten folder, with a better demo website and midi support. Best to build emscripten Csound from sources, I should really take that repo down. Ed
|
Date | 2015-06-18 14:07 |
From | Michael Gogins |
Subject | Re: [Cs-dev] What is the status of the Emscripten build? |
Attachments | None None |
I figured it was something like that. Could you get the site to run off the zip file on the download page? Otherwise, I think it would be best to replace the site with a note or take it down altogether. Regards, On Jun 18, 2015 8:19 AM, "Edward Costello" <phasereset@gmail.com> wrote:
|
Date | 2015-06-18 14:14 |
From | Edward Costello |
Subject | Re: [Cs-dev] What is the status of the Emscripten build? |
Attachments | None None |
Wait just checked and that seems to have the new website on it, slipped my mind I had updated it. It looks like it wasn't loading libcsound.js because I gzipped the library, I think I was testing to see if a gzipped version of the library would automatically be decompressed by the browser on load, and it turns out it isn’t. It should work now. Ed
|
Date | 2015-06-18 14:59 |
From | Michael Gogins |
Subject | Re: [Cs-dev] What is the status of the Emscripten build? |
Attachments | None None |
OK, thanks! Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jun 18, 2015 at 9:14 AM, Edward Costello <phasereset@gmail.com> wrote:
|
Date | 2015-06-18 14:59 |
From | Michael Gogins |
Subject | Re: [Cs-dev] What is the status of the Emscripten build? |
Attachments | None None |
By the way, I will be trying to get Emscripten Csound working with NW.js, which might be simpler for lots of people than setting up a local Web server. I will let you know how that goes. Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jun 18, 2015 at 9:59 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2015-06-18 16:15 |
From | Edward Costello |
Subject | Re: [Cs-dev] What is the status of the Emscripten build? |
Attachments | None None |
Thats great, I think html widgets really are the way to go for cross platform guis at this point. Theres some really nice stuff out there, Googles polymer is very interesting, and I’ve been playing with D3 trying to get some live charts working with Csound as well. I have a live spectrogram nearly finished. Thats been my idea with making the websocket opcode, it’s very easy to get a web view on any platform, one can just connect the web view to Csound via web sockets and you have a working gui without having to touch Cocoa or whatever.
|
Date | 2015-06-18 16:35 |
From | Michael Gogins |
Subject | Re: [Cs-dev] What is the status of the Emscripten build? |
Attachments | None None |
I agree that the way to go for cross platform GUIs is HTML, and I also think the way to go for cross platform code is JavaScript for now and maybe other virtual machines with just in time compilers in browsers in the future. What makes me say this is not so much the technical capabilities of Web protocols and standards at this point, which while usually good enough are not usually the best in their domain, but the stability and omnipresence of the Web protocols and standards in browsers and Web servers. Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jun 18, 2015 at 11:15 AM, Edward Costello <phasereset@gmail.com> wrote:
|
Date | 2015-06-19 02:33 |
From | Michael Gogins |
Subject | Re: [Cs-dev] What is the status of the Emscripten build? |
Attachments | package.json None None |
In theory, it might be enough to unzip the Emscripten archive somewhere, start up the nw program, and drop index.html from Emscripten onto the nw window. That didn't work. The first problem is that NW.js has its own "require" function that conflicts with the "require" function that you use in Emscripten. Emscripten has a FAQ about that here: https://github.com/nwjs/nw.js/wiki/Faq-name-conflict. So I created a manifest file, i.e. package.json (attached to this email, checked into Csound Git) with the nodejs attribute set to false, and ran Csound like this: nw csound-emscripten-6.05.0 and it worked. Sort of. Audio quality is not so great. I suspect there needs to be a separate thread or worker for Csound, that Csound is interfering with the browser event handling and vice versa. NW.js wiki has some stuff about that. In csound/frontends/nwjs/jcsound.cpp there is code that runs the Csound performance in a nw thread, this works very well. But nothing at all in one of these nw threads can touch the JavaScript VM, so I don't think this would work for Emscripten. Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jun 18, 2015 at 9:59 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2015-06-19 12:28 |
From | Edward Costello |
Subject | Re: [Cs-dev] What is the status of the Emscripten build? |
Attachments | None None |
Yeah the Emscripten build won’t be satisfactory until the new AudioWorker object comes out for Javascript. That way all the libcsound stuff can be off in it’s own thread without much risk of dropouts from UI events. It’s funny though as now that WASM is coming, it seems like the Emscripten and PnaCl builds will be obsoleted, albeit when a standard has been agreed on in the future at some point. Ed
|