[PD] Read individual words from a text file
Jonathan Wilkes
jancsika at yahoo.com
Sun Nov 11 21:26:53 CET 2012
Pd automatically interprets the spaces as delimiters for
atoms, so you can use [list split 1] in a recursive loop
(or iterative loop using [until] if the lines are really long,
like hundreds of words), to split the line into a bunch
of atoms.
Or send the line of text to:
[list-abs/list-drip]
from the list-abs library
to split out into floats and symbols
automatically.
-Jonathan
----- Original Message -----
> From: Antonio Roberts <antonio at hellocatfood.com>
> To: PD List <pd-list at iem.at>
> Cc:
> Sent: Sunday, November 11, 2012 3:14 PM
> Subject: [PD] Read individual words from a text file
>
> Is there a way to read individual words from a text file? I've tried
> using [msgfile] and [textfile] but they can only read lines. I know
> that you can define a carriage return as a delimiter but is there a
> way to use a space as one?
>
> Thanks
>
> Antonio
>
> --
> ============================
> antonio at hellocatfood.com
> http://www.hellocatfood.com
> ============================
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
More information about the Pd-list
mailing list