[PD] processing text

cgc at humboldtblvd.com cgc at humboldtblvd.com
Wed Nov 12 18:47:39 CET 2003

Quoting Martin Dupras <martin.dupras at uwe.ac.uk>:

> Hi,
> I'm trying to read text from textfiles in pd and display sentences with
> the text object in gem. However, I am having a few problems. 
> I'm reading sentences with textefile, which works well. I read lines in
> the textfile one by one, which I want to send as lists to the text3d
> object. What comes out of the textfile object is something like:
> "list the dog is asleep"
> which I need to convert to:
> "text the dog is asleep"
> How do I do that in pd?

You can try the IEMlib prepend object and do a [prepend text].  There are Linux
source and binaries on the iem site.  Also, there is an OSX binary from Adam
Lindsay (sorry I don't have the link handy), and there may be a Win32 binary
floating out there somewhere...  Now you have to remove the first 'list' part,
which might be possible to do using the select object.

Hope this helps a bit.


> Two corollary questions:
> 1) is there an escape character that can be used in the message object,
> or otherwise a way to store the "space" character in a text object as a
> list element?
> 2) is there a way to count the number of elements in a list?
> Thanks!
> - martin

More information about the Pd-list mailing list