<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 03/05/2014 04:36 AM, i go bananas
wrote:<br>
</div>
<blockquote
cite="mid:CAO=D1cjVYJ-SQD-y02odex4Q3CX9ccTYGT1FAb5ZzeNxXZe-Ww@mail.gmail.com"
type="cite">
<div dir="ltr">>><span
style="font-family:arial,sans-serif;font-size:13px">Remember
that when you redraw an element of an array you actually
redraw the _entire_ array in Pd Vanilla. And depending on the
array style you may have a separate tk canvas item for each
element.<<</span>
<div>
<span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div>
<div><font face="arial, sans-serif">why do the iem tab objects
work so much better then?</font></div>
</div>
</blockquote>
<br>
I haven't looked at the code, but I'd imagine those externals do
some array-wide operation then trigger a single redraw of the entire
array. For a 100-element array that'd be 100x faster.<br>
<br>
But if you want the GUI to look modern you want the chunk of samples
you're displacing to redraw ASAP. For that Pd (Vanilla) still needs
to continually delete and redraw the array as you click-drag the
selection. So it's better than the worst of all possible worlds--
using [tabwrite]-- but still extremely inefficient (not to mention
it doesn't scale).<br>
<br>
To be fair, it's unclear how to "do this right" even with a "clean"
separation of GUI/core. It's unclear what "clean" means, and it's
unclear what "this" is.<br>
<br>
To be specific: it's really hard to predict what purpose the user
will find for the realtime audio engine when the GUI is also a
programming language. For example, you can get all kinds of
speedups in a DAW by waiting for the user to release the mouse
button when displacing a selection. But if you did that by default
for "Put" menu arrays you'd ruin several of Miller's tutorials,
where an immediate connection between visual array change and audio
change is vital if inefficient.<br>
<br>
-Jonathan<br>
<br>
<blockquote
cite="mid:CAO=D1cjVYJ-SQD-y02odex4Q3CX9ccTYGT1FAb5ZzeNxXZe-Ww@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><font face="arial, sans-serif"> maelstorm said that it was
incredibly slow using an [until] based counter, but worked
smoothly with the iem objects. This was for EXACTLY the
same gui, so i'm not really sure if it's a gui redraw issue.
</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
<div><font face="arial, sans-serif">Then again, he also said
that the iem tabs objects seem to process tables in
chunks...so maybe the gui is also only redrawn in those
chunk sizes? that would make sense i guess.</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, Mar 5, 2014 at 10:35 AM, Billy
Stiltner <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:billy.stiltner@gmail.com" target="_blank">billy.stiltner@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 class="">
<div>"So when you use the [until] loop you are sending
drawing instructions to the GUI ($arraysize *
$no_mouse_events) times. A single array redraw
instruction in tcl is about 4k, so to scroll a
single pixel for a 100-element array:<br>
100 elements * 1 = 100 redraws * 4k = 400k"<br>
</div>
<div><br>
</div>
</div>
thats why i say fix tcl/tk<br>
</div>
my old graphics library could be used for a new gui. it is
c++ but has the logic to even only update lines as in blit
an arbitrary line.<br>
</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, Mar 4, 2014 at 1:33
PM, Jonathan Wilkes <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:jancsika@yahoo.com" target="_blank">jancsika@yahoo.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>
<div>
<div>On 03/04/2014 01:20 PM, Jonathan Wilkes
wrote:<br>
</div>
<blockquote type="cite">
<div>On 03/04/2014 10:11 AM, i go bananas
wrote:<br>
</div>
<br>
[...]<br>
<br>
<blockquote type="cite">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2014-03-04
12:12 GMT+01:00 i go bananas <span
dir="ltr"><<a
moz-do-not-send="true"
href="mailto:hard.off@gmail.com"
target="_blank">hard.off@gmail.com</a>></span>:
<div>
<div> <br>
<blockquote
class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px
#ccc
solid;padding-left:1ex">
<div dir="ltr">just for
interest perhaps,
here's the sound
editor i made years
ago:
<div><br>
</div>
<div><a
moz-do-not-send="true"
href="http://puredata.hurleur.com/sujet-1295-sound-editor"
target="_blank">http://puredata.hurleur.com/sujet-1295-sound-editor</a><br>
</div>
<div><br>
</div>
<div>and probably even
more interesting,
here is maelstorm's
wave display
abstraction:<br>
</div>
<div><br>
</div>
<div><a
moz-do-not-send="true"
href="http://puredata.hurleur.com/sujet-5890-waveform-display"
target="_blank">http://puredata.hurleur.com/sujet-5890-waveform-display</a><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>basically, what
maelstorm discovered
was that using
[until] with a
counter was not
nearly fast enough
to do the
calculations needed
for a decent
zoom/scroll
function, and we
looked into it, and
there just didn't
seem to be a vanilla
workaround. So he
uses iem_tab objects
to do the table
calculations.</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
Remember that when you redraw an element
of an array you actually redraw the
_entire_ array in Pd Vanilla. And
depending on the array style you may have
a separate tk canvas item for each
element.<br>
<br>
So when you use the [until] loop you are
sending drawing instructions to the GUI
($arraysize * $no_mouse_events) times. A
single array redraw instruction in tcl is
about 4k, so to scroll a single pixel for
a 100-element array:<br>
100 elements * 1 = 100 redraws * 4k = 400k<br>
<br>
That's flowing from the core to the GUI
for a _single_ mouse event. If you
trigger ten scrolls you're already at 4
megs of data sent.<br>
<br>
I'm pretty sure commercial editors avoid
that type of design. In editors like the
upcoming Openshot Video that have several
discrete parts that sending messages, the
GUI part almost certainly sends nothing at
all to the video core for
zooming/scrolling. For moving a chunk of
audio/video, it almost certainly sends a
single message about a single object's
delta.<br>
</blockquote>
<br>
</div>
</div>
I may have showed this already, but I think it's
instructive here:<br>
<a moz-do-not-send="true"
href="https://jwilkes.nfshost.com/pd-tiger.webm"
target="_blank">https://jwilkes.nfshost.com/pd-tiger.webm</a><br>
<br>
I don't have sound on that clip, but I believe I
tried it with the "test audio" patch going and I
wasn't getting dropouts. This is because a) I'm
sending a single transform message for every
scroll of the number box and b) the GUI
toolkit-- not Pd core-- is doing the math to
transform and redisplay the drawing.<br>
<br>
Socket traffic is bad because it require both
the core (sending) and GUI (receiving) to do
work. If you generate megs and megs of traffic
you can end up with dropouts and choking display
even if there's very little being redrawn.<br>
<br>
-Jonathan<br>
<br>
<blockquote type="cite"> <br>
-Jonathan
<div><br>
<br>
<br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
<a moz-do-not-send="true" href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a moz-do-not-send="true" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a>
</pre>
</div>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
<a moz-do-not-send="true"
href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a>
mailing list<br>
UNSUBSCRIBE and account-management -> <a
moz-do-not-send="true"
href="http://lists.puredata.info/listinfo/pd-list"
target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
<a moz-do-not-send="true" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a>
mailing list<br>
UNSUBSCRIBE and account-management -> <a
moz-do-not-send="true"
href="http://lists.puredata.info/listinfo/pd-list"
target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>