<div dir="ltr">Oh yes I see, you're right.<div><br></div><div>However, all the low level operations are modular enough that I guess you could compile each into their own asm.js modules and then reconnect them (pretty much replacing the processing loop). </div><div><br></div><div>It's likely due to lack of experience with javascript and the desire to have a single bundle for the user to import that we compile the whole program.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 9 September 2015 at 11:12, s p <span dir="ltr"><<a href="mailto:sebpiq@gmail.com" target="_blank">sebpiq@gmail.com</a>></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><div><div><span class=""><div>> This is the exactly what we do in Heavy. <br><br></div></span>is it? I somehow thought that you compile a patch with emscripten to a monolithic asmjs piece of code?<br><br></div>What I mean is that with asm.js you can have very small modular functions that are asm.js optimized and called by some JS code that is not asm. For example a dsp tick function could do :<br><br></div>objects.forEach(function(obj) {<br></div>    obj.tick()<br><div><div>})<br><br></div><div>and for example osc would be implemented like this :<br><br></div><div>osc.prototype.tick = function() {<br></div><div>    asmOptimizedSine(this.buffer, this.freq)<br></div><div>}<br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 9, 2015 at 12:01 PM, Joe White <span dir="ltr"><<a href="mailto:white.joe4@gmail.com" target="_blank">white.joe4@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span><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">> Also-- what about compiling libpd using emscripten? </blockquote><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"><span style="font-size:13px">I think some people already did that (Martin Roth?)</span></blockquote><div><br></div></span><div>I haven't heard of anyone doing that yet, but it's probably tricky for reasons you pointed out.</div><span><div><br></div><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"><span style="font-size:13px">One other possible flavour of WebPd could be that the dsp is implemented as small functions in C compiled with emscripten.</span></blockquote><div><br></div></span><div>This is the exactly what we do in Heavy. </div><div><br></div><div>I guess there are two approaches; one being to replicate the Pd environment (GUI + patching etc...) the other to use Pd as a way to design audio implementations for different platforms, in this case the web. I like the idea of people being able to create their own interfaces that don't necessarily have to be dataflow-oriented and HTML+JS is really powerful for that. </div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 9 September 2015 at 10:41, s p <span dir="ltr"><<a href="mailto:sebpiq@gmail.com" target="_blank">sebpiq@gmail.com</a>></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>@Robert : yes ... nacl is dead. And plugins are problematic. Probably a plugin wouldnt work on iphone for a start, and you would need to implement the plugin for many platforms ... and people need to install it etc. Plugins are a bit 2000 ;) flash and java and friends .... they are going to disappear sooner or later<br><br></div><span><div>> Also-- what about compiling libpd using emscripten?<br><br></div></span><div>I think some people already did that (Martin Roth?) ! It would probably work fine, the only thing is there will be issues with all the parts where the code needs to cooperate with the browser. Typically : loading resources (sound files), updating some graphics, etc ... Also you probably couldn't script things with JS.<br></div><div>But most of all I think (Chris tell me if I'm wrong), WebPd started as an experiment to see what could be done in the browser only. Myself, I like that idea of doing only JavaScript. Pushing JS forward, developing tools to do dsp, etc ... so giving back to the JavaScript ecosystem through developing WebPd is a nice thought to me. Also you know ... I no nothing about C/C++ :) and I know JS quite well ... and as they say "if all you have is a hammer , everything looks like a nail" !!! On the other hand, that's also why I like the idea I explained in the other post about removing the dsp implementation from teh core. One other possible flavour of WebPd could be that the dsp is implemented as small functions in C compiled with emscripten. Even maybe why not reusing some of libpd? But I probably can't do it myself ...<br></div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Wed, Sep 9, 2015 at 6:22 AM, Chris McCormick <span dir="ltr"><<a href="mailto:chris@mccormick.cx" target="_blank">chris@mccormick.cx</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 09/09/15 11:13, Jonathan Wilkes via Pd-list wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Also-- what about compiling libpd using emscripten?<br>
</blockquote>
<br></span>
Do it!<span><font color="#888888"><br>
<br>
Chris.<br>
<br>
-- <br>
<a href="http://mccormick.cx/" rel="noreferrer" target="_blank">http://mccormick.cx/</a></font></span><div><div><br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><span>-- <br><div><div dir="ltr"><span style="color:rgb(153,153,153)"><b><span style="color:rgb(68,68,68)">S</span><span><span style="color:rgb(68,68,68)">ébastien Piquemal</span><br></span></b></span><div><span style="color:rgb(153,153,153)"><b><br></b></span><span style="color:rgb(102,102,102)"><b> </b><span style="color:rgb(204,204,204)">-----</span><b> <font size="1">@sebpiq</font></b></span><br></div><div><span style="color:rgb(102,102,102)"><span style="color:rgb(204,204,204)"> -----</span><b> </b><font size="1"><a href="http://github.com/sebpiq" target="_blank">http://github.com/sebpiq</a></font><b><br></b></span></div><span style="color:rgb(102,102,102)"> <span style="color:rgb(204,204,204)">-----</span> <font size="1"><a href="http://funktion.fm" target="_blank">http://funktion.fm</a></font></span><br></div></div>
</span></div>
<br>_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div><div dir="ltr"><span style="color:rgb(153,153,153)"><b><span style="color:rgb(68,68,68)">S</span><span><span style="color:rgb(68,68,68)">ébastien Piquemal</span><br></span></b></span><div><span style="color:rgb(153,153,153)"><b><br></b></span><span style="color:rgb(102,102,102)"><b> </b><span style="color:rgb(204,204,204)">-----</span><b> <font size="1">@sebpiq</font></b></span><br></div><div><span style="color:rgb(102,102,102)"><span style="color:rgb(204,204,204)"> -----</span><b> </b><font size="1"><a href="http://github.com/sebpiq" target="_blank">http://github.com/sebpiq</a></font><b><br></b></span></div><span style="color:rgb(102,102,102)"> <span style="color:rgb(204,204,204)">-----</span> <font size="1"><a href="http://funktion.fm" target="_blank">http://funktion.fm</a></font></span><br></div></div>
</div>
</div></div></blockquote></div><br></div>