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??
You could try [mrpeach/binfile] or just load it into a table and use [tabread]
Martin
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??
I think, you can dig around [list-dripslow], [msgfile] (or similar). Here an exemple. ++
Jack
Le 2 déc. 08 à 15:10, Solen Music a écrit :
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??
--
Johnhttp://www.myspace.com/solenband
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
Thanks Jack,
Your method works perfectly!
2008/12/2 Jack jack@rybn.org:
I think, you can dig around [list-dripslow], [msgfile] (or similar). Here an exemple. ++
Jack
Le 2 déc. 08 à 15:10, Solen Music a écrit :
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??
-- John
http://www.myspace.com/solenband
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
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..).
Thanks for all everyone!
I will try those methods!
2008/12/2 Claude Heiland-Allen claudiusmaximus@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..).