<div dir="ltr"><div><div><div><div><div>Many thanks. I am trying to load in a table spectral data to make<br></div>these data available to an arbitrary number of "readers". I will see<br></div>how I can deal with this using the tabread and tabwrite externals.<br></div>Also, it is not clear to me the meaning and the use of the function:<br></div>"garray_usedindsp" and what is the effect of it. Of course I know that<br></div><div>the code is available, but if if somebody can give me a brief idea,<br></div><div>I will save a lot of time.<br></div>Best<div class=""><div id=":u1" class="" tabindex="0"><img class="" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">Oscar Pablo Di Liscia</div></div>
<br><div class="gmail_quote">2015-09-21 4:27 GMT-03:00 IOhannes m zmoelnig <span dir="ltr"><<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2015-09-21 00:22, oscar pablo di liscia wrote:<br>
> Hi list.<br>
> I have a question on allocating data and reading it through an external.<br>
> As I have seen so far, the externals that reads arrays, as tabread, allocate<br>
> the data in their own memory space. As far as I can understand, this result<br>
> in a "double allocation" of the data. One in the array itself and the other<br>
> one in the<br>
> internal memory space of the instance of the tabread external.<br>
> The point is that I would like to use an array to hold in memory a<br>
> considerable<br>
> amount of data and to make it available to an arbitrary "reader" objects<br>
> without the need of allocating the data again in each one of the readers.<br>
> Is it possible to write an external that that reads data from an array "on<br>
> the fly"<br>
> without the need of allocating the data in its own memory space?<br>
> Any help will be most appreciate.<br>
<br>
</span>virtually all¹ objects accessing table data reference the data<br>
"directly" using the "garray_getfloatwords()" function to get a pointer<br>
where the array stores its data.<br>
this does not involve any double allocation at all.<br>
it is also the only sane way to always use up-to-date data: if the user<br>
modifies the data via [tabwrite] or whatever, there is no way to signal<br>
the table consumers that the table data has changed (so that they can<br>
copy the relevant new data into their local copy), so the consumer must<br>
use the changed data directly.<br>
<br>
which objects have you found that proxy the data?<br>
<br>
gfasd,rt<br>
IOhannes<br>
<br>
<br>
<br>
¹ i seem to remember that [partconv~] does copy the data during<br>
DSP-graph recompilation, mainly because it does some heavy processing on<br>
the data (FFTs and what not), which it doesn't want to do for each<br>
signal block. i might be mistaken though.<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at">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></div>