<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1427384987018_18147" dir="ltr">Hi Chris,<br></div><div id="yui_3_16_0_1_1427384987018_18148" dir="ltr">I have a forked version of Pd-l2ork on github atm, but it's currently full of stop-gaps and curse words.<br></div><div id="yui_3_16_0_1_1427384987018_18149"><br></div><div id="yui_3_16_0_1_1427384987018_18150" dir="ltr"><span id="yui_3_16_0_1_1427384987018_19464">The main tasks left are (roughly in order):</span></div><div id="yui_3_16_0_1_1427384987018_45010" dir="ltr"><span id="yui_3_16_0_1_1427384987018_19464">0) figuring out how to integrate the new gui into the build scripts.  I don't like build scripts, package builds, build dependencies, or autohallofmirrors.<br></span></div><div id="yui_3_16_0_1_1427384987018_47511" dir="ltr"><span id="yui_3_16_0_1_1427384987018_19464"><br></span></div><div id="yui_3_16_0_1_1427384987018_47584" dir="ltr"><span id="yui_3_16_0_1_1427384987018_19464">If anyone who doesn't hate all of the above wants to help me with any of the above I'd appreciate it.<br></span></div><div id="yui_3_16_0_1_1427384987018_47585" dir="ltr"><br></div><div id="yui_3_16_0_1_1427384987018_52579" dir="ltr">The rest are things I'm currently working on...<br><span id="yui_3_16_0_1_1427384987018_19464"></span></div><span id="yui_3_16_0_1_1427384987018_18151">1) port Ivica's z-ordering algorithm.  I still don't understand how it works, and it might take some time since tk canvas' raise is almost certainly faster than reordering DOM elements (which is the only way to control svg z-ordering).<br></span><div id="yui_3_16_0_1_1427384987018_21990" dir="ltr"><span id="yui_3_16_0_1_1427384987018_18151">2) port Ivica's iemgui size/label anchors. These do an end-run around the widgetbehavior callback API, so that might take some time to get right.<br></span></div><div id="yui_3_16_0_1_1427384987018_21991" dir="ltr"><span id="yui_3_16_0_1_1427384987018_18151">3) change the gui-side parser to handle multi-line text.  Currently I'm splitting the incoming socket data on newlines, which lets me separate the new-style calls from the old tcl ones.  That's been invaluable-- it lets me see the exact tcl call for a piece of missing functionality in a running instance of Pd.  This needs to be done when all the old sys_vgui calls are gone-- otherwise I'll either get errors on the gui side from tcl code, or I'll have to add complexity to catch them.</span></div><div id="yui_3_16_0_1_1427384987018_24719" dir="ltr"><br>> Do you anticipate your HTML5 based UI will be able to work against any<br style="" class="" clear="none">version of Pd (vanilla, pd-extended), or is it Pd-l2ork only?</div><div id="yui_3_16_0_1_1427384987018_22685" dir="ltr"><br><span id="yui_3_16_0_1_1427384987018_18151"></span></div><div id="yui_3_16_0_1_1427384987018_27690" dir="ltr"><span id="yui_3_16_0_1_1427384987018_18151">Unfortunately, no.  That's the simple answer, as evidenced by the lack of hooks in libpd for all the functionality inside g_*.c.</span></div><div id="yui_3_16_0_1_1427384987018_36804" dir="ltr"><br><span id="yui_3_16_0_1_1427384987018_18151"></span></div><div id="yui_3_16_0_1_1427384987018_38161" dir="ltr"><span id="yui_3_16_0_1_1427384987018_18151">The patches themselves are 99% compatible with anything else.  (I say 99% because there's a positioning offset to iemguis in Pd-l2ork that I still don't fully understand, but other than that you're golden.)</span></div><div id="yui_3_16_0_1_1427384987018_38391" dir="ltr"><br><span id="yui_3_16_0_1_1427384987018_18151"></span></div><div id="yui_3_16_0_1_1427384987018_42149" dir="ltr"><span id="yui_3_16_0_1_1427384987018_18151">As far as building arbitrary patch UIs in Javascript, I think the way to go would be to get a websocket connection class in Pd Vanilla.  Then you could use that to send FUDI messages between any modern browser and a running instance of Pd.</span><span id="yui_3_16_0_1_1427384987018_18151">  I'd be careful with that, though.  I don't really understand how websockets are any more secure than the idea of an arbitrary webpage making arbitrary tcp/ip connections.  And I could totally see a patch author forgoing encryption and other sane functionality because they fear it would make things too slow.</span></div><div id="yui_3_16_0_1_1427384987018_43087" dir="ltr"><br></div><div id="yui_3_16_0_1_1427384987018_43322" dir="ltr">Finally-- when I get a chance I'm going to add a data structure drawing instruction to display an svg object.  Svg objects can themselves include scripts.  So one could actually write an entire GUI in an svg file-- including event handlers, animation, etc.  In that case the Pd engine only has to create the class and send a message here or there to trigger events, and the GUI process takes care of the heavier logic.  But even as it is, I can get decent performance by using [line] and friends to do basic animation, or even transforms.  The actual rendering happens in the GUI process so as long as you aren't passing around too many messages it can stay out of the way of the audio.<br></div><div id="yui_3_16_0_1_1427384987018_44025" dir="ltr"><br></div><div id="yui_3_16_0_1_1427384987018_44262" dir="ltr">-Jonathan<br></div><br><div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font face="Arial" size="2"> On Wednesday, March 25, 2015 9:29 PM, Chris McCormick <chris@mccormick.cx> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container">Hi Jonathan,<br clear="none"><div class="yqt3326350617" id="yqtfd83804"><br clear="none">On 20/03/15 04:08, Jonathan Wilkes via Pd-list wrote:<br clear="none">> I'm implementing graph-on-parent drawing in my port of the Pd-l2ork GUI<br clear="none">> to HTML5.</div><br clear="none"><br clear="none">I caught up with Richie Cyngler in Melbourne last weekend and we were<br clear="none">talking about your new work. One thing I am really excited by is the<br clear="none">idea of being able to use Javascript to do more traditional procedural<br clear="none">computation - building complex tables and data structures to use in Pd<br clear="none">based composition using a language that enables this without patching<br clear="none">together tens of boxes. That and the obvious benefits of wielding the<br clear="none">full power of the browser environment to interface with external<br clear="none">servers, display information richly, webgl, etc.<br clear="none"><br clear="none">Is what you are working on available in a repository anywhere?<br clear="none"><br clear="none">Do you anticipate your HTML5 based UI will be able to work against any<br clear="none">version of Pd (vanilla, pd-extended), or is it Pd-l2ork only?<br clear="none"><br clear="none">Cheers,<br clear="none"><br clear="none">Chris.<br clear="none"><br clear="none">-- <br clear="none"><a shape="rect" href="http://mccormick.cx/" target="_blank">http://mccormick.cx/</a><div class="yqt3326350617" id="yqtfd75496"><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>