<div dir="ltr">I&#39;ve started porting my ChucKJS examples to ChucK; they are available in the js/examples/ subdirectory, after building with grunt in js/ (<a href="https://github.com/aknuds1/chuck/tree/emscripten/js">https://github.com/aknuds1/chuck/tree/emscripten/js</a>). Only a few of the examples work so far for different reasons, unfortunately, f.ex. examples/example1.html and examples/example2.html.<div><br></div><div>Best,</div><div>Arve</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 17, 2014 at 9:21 PM, Arve Knudsen <span dir="ltr">&lt;<a href="mailto:arve.knudsen@gmail.com" target="_blank">arve.knudsen@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Well, what do you know, the Emscripten port of ChucK now produces sound! :)<div><br></div><div>To hear for yourself, make emscripten and open emscripten/chuck.html in a Web Audio enabled browser, e.g. Chrome. It should produce a short sine tone.<br><div><div><br></div><div>Best,</div><div>Arve</div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 11, 2014 at 6:28 PM, Arve Knudsen <span dir="ltr">&lt;<a href="mailto:arve.knudsen@gmail.com" target="_blank">arve.knudsen@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I suggest we coordinate work on Emscriptenising ChucK through the GitHub issues of my ChucK fork (<a href="https://github.com/aknuds1/chuck" target="_blank">https://github.com/aknuds1/chuck</a>). I&#39;m currently concentrating on replacing RtAudio with a shim, which I think at least would be the best approach, and I&#39;ve got a pretty good handle on how to do it. There seems to be little documentation on how to write these shims, so I&#39;m going to use Emscripten&#39;s bundled shims as reference, after receiving some useful advice on their mailing list.<span><font color="#888888"><div><br></div><div>Arve</div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 11, 2014 at 11:56 AM, Arve Knudsen <span dir="ltr">&lt;<a href="mailto:arve.knudsen@gmail.com" target="_blank">arve.knudsen@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote">Hi Phill!</div><div class="gmail_quote"><br></div><div class="gmail_quote">First of all, you might want to check out the fruits of my existing efforts, if you haven&#39;t already: ChucKJS (<a href="https://github.com/aknuds1/chuckjs" target="_blank">https://github.com/aknuds1/chuckjs</a>) and ChucK Demos (<a href="http://chuckdemos.com" target="_blank">http://chuckdemos.com</a>, this is based on ChucKJS).</div><div class="gmail_quote"><br></div><div class="gmail_quote">Second, I have a fork of ChucK which I linked to in my original email: <a href="https://github.com/aknuds1/chuck/tree/emscripten" target="_blank">https://github.com/aknuds1/chuck/tree/emscripten</a>. The work goes on in the emscripten branch. To build this, you must have sourced the Emscripten SDK (the whole thing is a bit ramshackle for now, sorry about that) and type &quot;make emscripten&quot;.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Sure you&#39;re welcome to help out! Can you write C++? The project is C++ driven, since the idea is to transform ChucK sources (in C++) to JavaScript automatically. Right now, I mainly need to write Emscripten shims (emulations) of ChucK dependencies such as the audio driver (I&#39;m currently thinking we should emulate ASIO).</div><div class="gmail_quote"><br></div><div class="gmail_quote">Otherwise, we will probably need some JavaScript (&quot;unit&quot;) tests down the line to verify that e.g. the shims do what they&#39;re supposed to.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Best,</div><div class="gmail_quote">Arve</div><div><div><div class="gmail_quote"><br></div><div class="gmail_quote">On Sep 11, 2014 11:43 AM, &quot;Phill&quot; &lt;<a href="mailto:phillip.hermans@gmail.com" target="_blank">phillip.hermans@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div>Howdy,<br><br></div>I am a huge fan of ChucK and am just not getting seriously involved with JS.<br><br></div>Mainly I&#39;d like to say that have chuck available in JS is a great idea, as far as how to implement I defer to your judgment.<br><br>Basically I want to give you kudos and also offer any help I may be able to give as a code monkey in this regard.<br><br></div>Have you started a new GitHub for this version?<br><br>thanks,<br>pmh<br><a href="https://github.com/cheesymoo" target="_blank">https://github.com/cheesymoo</a><br><div><div><div><div><div><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Arve Knudsen</b> <span dir="ltr">&lt;<a href="mailto:arve.knudsen@gmail.com" target="_blank">arve.knudsen@gmail.com</a>&gt;</span><br>Date: Wed, Sep 10, 2014 at 9:10 PM<br>Subject: [chuck-dev] Porting ChucK to JavaScript with Emscripten<br>To: ChucK Developer Mailing List &lt;<a href="mailto:chuck-dev@lists.cs.princeton.edu" target="_blank">chuck-dev@lists.cs.princeton.edu</a>&gt;<br><br><br><div dir="ltr">Hi guys<div><br></div><div>I&#39;ve re-directed my focus from manually porting ChucK to JavaScript (i.e., ChucKJS) to an automatic port with the help of the Emscripten tool (<a href="http://emscripten.org/" target="_blank">http://emscripten.org/</a>): <a href="https://github.com/aknuds1/chuck/tree/emscripten" target="_blank">https://github.com/aknuds1/chuck/tree/emscripten</a>. I don&#39;t know yet how this&#39;ll pan out, but I&#39;m thinking it should be more future proof than having to maintain an independent JavaScript version of ChucK. Also, it ought to be much more performant, since Emscripten generates asm.js rather than vanilla JavaScript.</div><div><br></div><div>The status of the port is that I am currently able to generate a JavaScript library, chuck.js, which can be invoked, but I need to write shims for dependencies such as the audio driver to actually do anything useful.</div><span><font color="#888888"><div><br></div><div>Arve</div></font></span></div>
<br>_______________________________________________<br>
chuck-dev mailing list<br>
<a href="mailto:chuck-dev@lists.cs.princeton.edu" target="_blank">chuck-dev@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev</a><br>
<br></div><br></div></div></div></div></div></div>
</blockquote></div>
</div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>