[PD] A couple new list-abs

Patrice Colet pat at mamalala.org
Mon Mar 3 03:30:22 CET 2008


  Hello,
thank you for this usefull [list-range], unfortunately [list-zip] isn't 
pd-vanilla compatible, I tried to replace [initbang] with [loadbang], 
but you might know that it wouldn't work in a parent patcher.

PC.

Luke Iannini (pd) a écrit :
> Hallo,
> Here're two new list-abs, list-range and list-zip.
> 
> list-range spits out sequences from n1 to (n2 - 1), optionally
> separated by a positive or negative "step" interval m.  It's based on
> Python's range() function[1].  You can either use it as a shortcut by
> specifying creation arguments and [bang(ing it, or send in one, two or
> three arguments to get a new sequence (n1 (for 0...n1-1), n1 n2, or n1
> n2 m).
> 
> list-zip interleaves lists of equal length to produce a new list.  It
> defaults to two lists, but uses dynamic patching to modify its inlets
> to accept an arbitrary number of lists.  So, for example, [1 2 3 4(
> and [A B C D( would become [1 A 2 B 3 C 4 D(.  list-zip is based on
> Python's zip() function[also 1].
> 
> Regrettably[2] list-zip requires [initbang] for its dynamic inlet
> creation, but list-range is a purely vanilla affair, requiring only
> the existing list-abs from Frank's library.
> 
> Inside the help for list-zip, you'll find a recreation of
> list-enumerate using 4 objects.
> 
> Cheers
> Luke
> 
> [1] http://docs.python.org/lib/built-in-funcs.html (sorry, they don't
> have links to the individual functions)
> [2] only regrettable that this isn't included in vanilla yet!
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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