[PD] message-creation and parsing questions
hans at eds.org
Thu Jun 12 21:11:21 CEST 2003
On Thursday, Jun 12, 2003, at 10:17 America/New_York,
bbogart at ryerson.ca wrote:
> tcl object??
> ----- Original Message -----
> From: Hans-Christoph Steiner <hans at eds.org>
> Date: Wednesday, June 11, 2003 11:37 pm
> Subject: Re: [PD] message-creation and parsing questions
>>> On Tuesday, June 10, 2003, at 11:03 pm, David Merrill wrote:
>>>> Hello pd-ers,
>>>> I'm still getting the hang of pd, and I'm currently using it to
>>>> the mechanism to run a perceptual experiment. For each
>> condition I
>>>> want to read in values from a text file, play a tone, and
>> record the
>>>> result. The parts I'm having trouble with are:
>>>> - how can I build up a message from parts? for instance, the
>>>> [writesf~] object responds to an "open" message with a single
>>>> argument, like:
>>>> "open /tmp/output1.wav"
>>>> but I want to be able to iterate, and supply "output2.wav",
>>>> "output3.wav" etc.. I have looked at the docs for the [pack]
>>>> but I'm not sure that it can receive messages as input and pack
>>>> or output it's result as a message - is that correct? am I
>>>> about this in a wrong way?
>> [makefilename output%s.wav]----[open $1(----[writesf~]
>>>> - how can I parse a line of text such as: "output1.wav 440 500
>>>> that I get from a [textfile] [bang] into its constituent parts
>>>> (preserving the appropriate types)?
>> [unpack] or [route] depending on what you want to do.
>>>> - (related to the above) is parsing a string different from
>> parsing a
>> Yes, you use different objects. For list parsing you can use
>> [unpack], [route], etc. There are some objects for parsing
>> (what strings are called in pd) but I don't know them off hand.
>> there is a python object and a tcl object, so those could be handy
>> PD-list mailing list
>> PD-list at iem.kug.ac.at
More information about the Pd-list