<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 09/03/2015 08:11 AM, jamal crawford
wrote:<br>
</div>
<blockquote
cite="mid:1441282276.3413904.373735769.070BCC82@webmail.messagingengine.com"
type="cite">
<title></title>
<div>oh nice :) im looking forward to this<br>
</div>
</blockquote>
<br>
Here's a rudimentary screencast:<br>
<a class="moz-txt-link-freetext" href="http://pdblog.nfshost.com/fielddemo.webm">http://pdblog.nfshost.com/fielddemo.webm</a><br>
<br>
I start with a little abstraction named "b.pd". It just polls an
[osc~] which is scaled and offset by some amount to compute<br>
a value for the [field radius]. In a toplevel patch, setting the
[field] does nothing.<br>
<br>
However, when I create the struct with the "canvas a b" definition,
it tells Pd to load up the contents of "b.pd" into memory. And when
I create the scalar "foo", I also get a canvas "b.pd" associated
with that scalar.<br>
<br>
Now when I set the [field radius] in that abstraction, it updates
the "radius" field for that scalar. The "radius" field also happens
to be used as a parameter to [draw circle]. That means when the
"radius" changes it animates the circle's radius.<br>
<br>
As I make copies of the scalar you can see why this interface is so
powerful-- each scalar has its own [osc~] controlling the animation
at a frequency independent of the others. You can also get each one
to [throw~] a signal to a bus for sound, but I didn't do audio with
this screencast.<br>
<br>
None of this is particularly efficient. But conceptually it's much
easier to deal with than juggling gpointers. Also, once you start
sending a lot of animation data to the gui, sys_queugui filters out
redundant messages.<br>
<br>
-Jonathan<br>
<br>
<blockquote
cite="mid:1441282276.3413904.373735769.070BCC82@webmail.messagingengine.com"
type="cite">
<div> </div>
<div>cheers</div>
<div> </div>
<div> </div>
<div>On Wed, Sep 2, 2015, at 10:20 PM, Jonathan Wilkes wrote:<br>
</div>
<blockquote type="cite">
<div style="color:rgb(0, 0, 0);background-color:rgb(255, 255,
255);font-family:HelveticaNeue, 'Helvetica Neue', Helvetica,
Arial, 'Lucida Grande', sans-serif;font-size:16px;">
<div dir="ltr">Sorry, I didn't clarify that these are brand
new changes I made in my port of the GUI away from tcl/tk to
nw.js. I developed them as a diversion from the otherwise
mind-numbing task of measuring fonts, fixing scrollbars,
etc.<br>
</div>
<div dir="ltr"> </div>
<div dir="ltr">I'll try to post a screencast later.<br>
</div>
<div dir="ltr"> </div>
<div dir="ltr">-Jonathan<br>
</div>
<div dir="ltr"> </div>
<div> </div>
<div> </div>
<div>
<div> </div>
</div>
<div style="display:block;">
<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"><span class="font"
style="font-family:Arial"><span class="size"
style="font-size:small"> On Wednesday, September
2, 2015 2:29 PM, jamal crawford
<a class="moz-txt-link-rfc2396E" href="mailto:threen52@ml1.net"><threen52@ml1.net></a> wrote:</span></span><br>
</div>
<div> </div>
<div> </div>
<div>
<div>
<div>
<div>hey list, Jonathan.<br>
</div>
<div> </div>
<blockquote>
<div>You start with a struct:[struct foo float x
float y canvas a b]<br>
</div>
<div>Then create a scalar from this struct.<br>
</div>
<div>The scalar will have an "x" value, a "y"
value, and a canvas "a" which gets filled with
the contents of an abstraction "b.pd" that is
somewhere in Pd's search path.<br>
</div>
<div>Now here's the neat thing-- inside the
newly instantiated "b.pd" you can do this:<br>
</div>
<div>[loadbang]|[field x]|[print x]<br>
</div>
<div> </div>
</blockquote>
<div> </div>
<blockquote>
<div>
<pre style="color:rgb(31, 31, 31);font-family:inherit;font-stretch:inherit;white-space:pre-wrap;word-wrap:break-word;">imagine you have a drawing instruction like this:[draw rect 0 0 20 20]
When you create the scalar you get a little black box on a canvas.
With a canvas field like I described, you can right-click the scalar and choose "Open" to show a canvas window.
</pre>
</div>
</blockquote>
<div> </div>
<div>while trying to create [struct foo float x
float y canvas a b], i get: canvas: no such
type, using pd 0.46.6<br>
</div>
<div>what am I missing?<br>
</div>
<div> </div>
<div>~/.jc<br>
</div>
<div> </div>
</div>
</div>
<div> </div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div> </div>
</blockquote>
<br>
</body>
</html>