OK, I think I did it. Solved the slow garray drawing.<br><br>I introduced a new widgetbehavior of the same form as t_displacefn. All children of a graph get their new widgetbehavior called from graph_displace. That&#39;s way I called the new widgetbehavior t_graphfn, maybe we could find something better to make clear the following notion: each object should write into it&#39;s graphfn function only procedures to move it&#39;s graphical content with calls to Tk command &quot;move&quot;; t_graphfn function provides in form of it&#39;s arguments dx and dy to use with Tk move just as t_displacefn does (graph_display passes it&#39;s dx and dy arguments on to every t_graphfn call it makes).<br>
<br>I&#39;ve filled in graphfn functions for everything connected with data structures and arrays, it remains to write those functions for iemgui and oldschool &quot;text&quot; objects. Coming soon. And for somebody who wants to write new graphical externals the change will be almost invisible, because we can make an iemgui_graph function to map to t_graphfn, that will call x_gui.x_draw with IEM_GUI_DRAW_MODE_MOVE, so one really doesn&#39;t need to write any more GUI code than before.<br>
<br>Performance is greatly improved, I can load 20secs of audio into an array and it moves around a patch smoothly, though it demands it&#39;s 40-50% cpu. But anyway, it works. I also tweaked some other pieces of code to remove unnecessary multiple calls to garray_vis. I haven&#39;t yet tried if it disturbs heavy audio processing when you load a large sample into an array. That&#39;s my main concern with arrays to be honest.<br>
<br>So, what&#39;s the regime for spreading this code of mine into the wide world? do you want to check it out? Shall I simply attach it to an email? Can I upload the code somewhere?<br><br>J.<br><br><div class="gmail_quote">
On Mon, Apr 14, 2008 at 7:19 PM, Hans-Christoph Steiner &lt;<a href="mailto:hans@eds.org">hans@eds.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c"><br>
On Apr 14, 2008, at 6:28 AM, IOhannes m zmoelnig wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Jakob Leben wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
If someone has thought on these proposals or any ideas, please comment.<br>
<br>
</blockquote>
<br>
not directly, but: does anybody know how one could setup a shared-memory<br>
between pd and pd-gui?<br>
i think it would be a good idea to not send large amounts of data<br>
through a network socket.<br>
(i had a look at [pix_preview] the other day, and noticed that it is not<br>
really usable with larger image-data; shared-memory might be a solution<br>
for this as well...)<br>
<br>
fmgasdr<br>
IOhannes<br>
</blockquote>
<br></div></div>
For pix_preview, I was thinking, it could allocate two framebuffers and one lock variable. &nbsp;In the lock variable would be the address of the framebuffer that is currently ready for Tcl to draw. &nbsp;On the C side, it would be filling the other framebuffer in the meantime. &nbsp;Once that is all done, it would change the lock variable to point to the new one. &nbsp;This could be done with mmap and the lock variable would just be a filename, and the Tcl image object would just read the mmap&#39;ed file for the image data.<br>

<br>
Just throwing it out there.<br>
<br>
.hc<br>
<br>
----------------------------------------------------------------------------<br>
<br>
There is no way to peace, peace is the way. &nbsp; &nbsp; &nbsp; -A.J. Muste<br>
<br>
<br>
</blockquote></div><br>