[PD] array read -resize according to file ?

Raphaël Ilias phae.ilias at gmail.com
Fri Oct 7 11:10:48 CEST 2016


Hello  Jack,

Yes [text] is great, but I'm currently using tables/arrays that I want to
be stored on filesystem.
I actually can [read array.txt ( containing an array (i.e. a list of
floats) with [text], and the whole array is loaded as a list on first line,
but I'm concerned about performance while loading/parsing data.

Then this would mean using :

  [0 $1 1 (
   |
  [text get dataAsText]

instead of :

  [$1 (
   |
  [tabread dataAsArray]

I will give this solution a try, but I'm using quite large tables (more
than 10,000 float values)... do you think it's as fast as [tabread] ?

(PS : I'm also looking for a way to know if a specified file (giving its
path) exists or not. I did this once with the [shell] external, but I would
prefer a vanilla solution...)

have a nice day,

Raphaël

2016-10-06 18:08 GMT+02:00 Jack <jack at rybn.org>:

> Hello Raphaël,
>
> For textfiles ?
> Maybe you should use [text] ?
> ++
>
> Jack
>
>
>
> Le 06/10/2016 à 18:00, Raphaël Ilias a écrit :
> > Hello list
> >
> > For an array used as data storage (i.e. not audio), is there a way to
> > load data from a file AND have it resized according to file's length ?
> > ...like with soundfiler : [read -resize filename.wav tablename (
> >
> > I want to load textfiles into arrays but their may vary and cannot be
> > predicted...
> >
> > I feel my english isn't very clear today ! So I attached an example
> patch.
> >
> > Any idea ?
> >
> > have a good day !
> >
> > --
> > Raphaël Ilias
> >   ___________________________________
> > *     phae.fr <http://phae.fr>*
> >      10 rue des Deux Haies - 49100 Angers / France
> >      phae.ilias at gmail.com <mailto:phae.ilias at gmail.com> / 06 04 45 79 78
> >   ___________
> >
> >
> > _______________________________________________
> > Pd-list at lists.iem.at mailing list
> > UNSUBSCRIBE and account-management -> https://lists.puredata.info/
> listinfo/pd-list
> >
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/
> listinfo/pd-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20161007/8b52d4ad/attachment-0001.html>


More information about the Pd-list mailing list