instead this is used
[read filename, rewind, bang(
[textfile]
[t l l]
/
[list length]
[t b f] |
\ [array size arrayname]
\ /
[list]
[array set arrayname]
Is there a better way to do this?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I guess, your textfile seems to contain only one (or several) line with floats. A better way could be :
[read filename, rewind, bang( | [textfile] | [t l l] | | | [list length] | | | [array size arrayname] | [array set arrayname]
Dont forget [array define arrayname] somewhere in your patch.
a note : if you use [array], you could use [text] instead [textfile]. ++
Jack
Le 10/07/2015 21:31, Billy Stiltner a écrit :
instead this is used
[read filename, rewind, bang( [textfile] [t l l] / \ [list length] [t b f] | \ [array size arrayname] \ / [list] [array set arrayname]
Is there a better way to do this?
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I guess, your textfile seems to contain only one (or several) line
with floats. A better way could be :
yes , the textfiles were saved through array
the data was originally a space delimited list of floats sent from javascript->JAVA->TCP->FUDI->[array set] then saved by the [write filename( message to [define array arrayname]
[read filename, rewind, bang( | [textfile] | [t l l] | | | [list length] | | | [array size arrayname] | [array set arrayname]
Dont forget [array define arrayname] somewhere in your patch.
That is simpler.
a note : if you use [array], you could use [text] instead [textfile]. ++
Jack
Thanks I could use [text] instead I guess. Does it auto resize?
It seems I haven't had any trouble with textfile or text resizing when reading from file.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Le 11/07/2015 23:35, Billy Stiltner a écrit :
I guess, your textfile seems to contain only one (or several) line with floats. A better way could be :
yes , the textfiles were saved through array the data was originally a space delimited list of floats sent from javascript->JAVA->TCP->FUDI->[array set] then saved by the [write filename( message to [define array arrayname]
OK.
[read filename, rewind, bang( | [textfile] | [t l l] | | | [list length] | | | [array size arrayname] | [array set arrayname]
Dont forget [array define arrayname] somewhere in your patch.
That is simpler.
a note : if you use [array], you could use [text] instead [textfile]. ++
Jack
Thanks I could use [text] instead I guess. Does it auto resize?
Yes and no, it just keeps the content of your textfile, no more, no less (it is not a pd array).
It seems I haven't had any trouble with textfile or text resizing when reading from file.
Yes, there is no trouble to use [textfile], it was just to tell you that there is also [text] in Pd vanilla with more options than [textfile]. And with [text], you can save your textfile with your patch (you can do it also with [array]), depending of what you want to achieve. ++
Jack
On 2015-07-11 23:35, Billy Stiltner wrote:
I guess, your textfile seems to contain only one (or several) line
with floats. A better way could be :
yes , the textfiles were saved through array
the data was originally a space delimited list of floats sent from javascript->JAVA->TCP->FUDI->[array set] then saved by the [write filename( message to [define array arrayname]
but if you have the data within Pd before saving, can't you just save it in a format that allows resizing? e.g. using [soundfiler] and write it into a floating-point soundfile. this will:
be faster)
[array]s understand any access method knwon from [table]s...
hmgdf IOhannes