[PD] (breaking symbols) was Re: find a list of numbers in a text file

Jonathan Wilkes jancsika at yahoo.com
Wed Aug 31 09:15:09 CEST 2011


----- Original Message -----

> From: Chris McCormick <chris at mccormick.cx>
> To: Miller Puckette <msp at ucsd.edu>
> Cc: pd-list at iem.at
> Sent: Wednesday, August 31, 2011 2:33 AM
> Subject: Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file
> 
> On Tue, Aug 30, 2011 at 11:19:46PM -0700, Miller Puckette wrote:
>>  > I am in favour of having that functionality as part of [list] and 
> those names look good to me. For the functionality you describe maybe something 
> like [list ascii2symbol] and [list symbol2ascii]? Those would also be pretty 
> useful!
>>  > 
>>  > I am currently making a [split] abstraction based on Jamie's work. 
> I will send it through when I am done - or you can just look at 
> symbol2list's source which IOhannes has re-licensed in a message to this 
> list for use in Pd:
>>  > 
>> 
>>  hmm... another possibility, as in lisp: "list explode" and 
> "list implode" ?
> 
> Also good!
> 
>>  My idea is that, once this is in Pd vanilla, the  "2/3" -> 
> "2" "3" type
>>  of split is easy enough to program in an abstraction, but it's 
> presently
>>  not possible at all; meanwhile, the funtionality I'm describing is 
> pretty
>>  canonical and hard to split up into finer components in any way I can see.
> 
> Ah, ok, so you could do:
> 
> bat/cat/rat -> 98 97 116 47 99 97 116 47 114 97 116

So you'd iterate through the list and accumulate a sublist until you hit a 47, at 
which point you bang your sublist through a [list implode] to yet another 
accumulator (and clear the sublist), and repeat until you hit the end of the original list, 
at which point you bang the final imploded list to the outlet.

Instead of:

[symbol bat/cat/rat(
|
[zexy/s2l /]

> 
> and then you would run through the number list finding 47 ("/") and 
> re-building the separate symbols using the reverse operation.

Keep in mind that [list implode] must be smart enough to output the float 
atom "12" given the input "49 50".  If it gives you "symbol 12" then your 
back to the [makefilename] madness from my original vanilla solution.

> 
> I guess this would be cool because it would also allow you to store proper 
> strings with all kinds of characters in regular Pd arrays, which might be fun. 
> Hmmm, also many other things!
> 
>>  easy enough to program in an abstraction, but it's presently
>>  not possible at all;
> 
> After looking at Jonathan's ratio splitting abstraction I think this might 
> actually be possible with [makefilename] madness, but it's much uglier than 
> what you propose:
> <http://lists.puredata.info/pipermail/pd-list/2011-08/090196.html>
> 
> Cheers,
> 
> Chris.
> 
> -------------------
> http://mccormick.cx
> 
> _______________________________________________
> 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