[PD] Textfile with character by character parsing??

Solen Music solenpuredata at googlemail.com
Tue Dec 2 16:58:43 CET 2008


Thanks for all everyone!

I will try those methods!

2008/12/2 Claude Heiland-Allen <claudiusmaximus at goto10.org>:
> Solen Music wrote:
>>
>> Hi i'm looking for an object that I can read in a text file and bang
>> it so that it outputs each consecutive character/letter in the file.
>>
>> i.e. bang the object
>> it ouputs the first letter
>> bang the object
>> outputs the second letter
>> etc.
>>
>> Does such a thing exist??
>
> Yes [1].  But it would probably be far easier/more productive/more efficient
> to use a scripting engine for such tasks, for example pdlua for Lua or
> py/pyext for Python or something else (because then the string manipulation
> can take place without polluting Pd's symbol table).
>
>
> Claude
>
>
> [1] I started then abandoned development of a Pd<->POSIX bridge once upon a
> time.  It can do what you describe, for example this file has a subpatch
> that streams a file as a sequence of bytes (driven by [until] but you could
> use another driver):
>
> https://code.goto10.org/svn/maximus/2007/posix/examples/load8svx.pd
>
> You'd then have to parse the bytes into characters according to whichever
> charset you use (eg, UTF-8 is more complicated than ASCII..).
>
> --
> http://claudiusmaximus.goto10.org
>



-- 
John

http://www.myspace.com/solenband




More information about the Pd-list mailing list