[PD] change list order according to their first element

patko colet.patrice at free.fr
Wed Jul 28 16:28:57 CEST 2010


 Hello,

using [list length] is a good idea,
 I also use [list prepend] to prepare a gridflow message for rows number like this:



[trigger l l]
 |         |
 |        [list length] 
 |         |
 |        [$1 4 #]
 |         |
[list prepend]
 |
[list trim]

 The non-integer number I've used only needed 3 figures after the coma,
 so I've just used [* 1000]-[i] before going into the grid and [/ 1000] at the output,
 


Yoi patchi


-- 
Patrice Colet


----- "Libero Mureddu" <libero.mureddu at gmail.com> a écrit :

> Thank you very much Patrice and Mathieu!
> 
> There are a couple of things though that are not clear to me:
> 
> 1) I'm using the second example that was posted here:
> http://lists.puredata.info/pipermail/pd-list/2010-06/080331.html
> 
> However, in my case I know only the number of columns (4), but the
> number for the other dimension cannot be fixed in advance (it could
> be, but I'd like it to calculate it with list-length/4 and then
> generate automatically the right grid).  I tried to do [import ($1
> 4)]
> but it didn't work. Is there a way to do it?
> 
> 2) Actually, I'm using non-integer numbers, but I cannot understand
> how to use them in a grid.
> 
> 3) Although the gridflow lib is really interesting (I never used it
> before), I'm curious to know if there's another way of getting the
> same result using other objects: coll would be perfect, but it
> doesn't
> accept floating point numbers...
> 
> Thanks a lot,
> 
> Libero
> 
> On Tue, Jul 27, 2010 at 7:13 PM, Mathieu Bouchard <matju at artengine.ca>
> wrote:
> > On Tue, 27 Jul 2010, patko wrote:
> >
> >> I've been in need of such trick lately you might be interested
> about it.
> >> The following mail exposes a method using gridflow
> >> http://lists.puredata.info/pipermail/pd-list/2010-06/080330.html
> >
> > BTW, that's a number-only solution, for fixed-width lists. Also,
> for
> > non-integer numbers, a small change must be made in order to prevent
> casting
> > to int.
> >
> >  _ _ __ ___ _____ ________ _____________ _____________________ ...
> > | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
> 
> 
> 
> -- 
> Libero Mureddu
> http://www.myspace.com/liberomureddu
> http://www.resonatorhelsinki.com/
 



More information about the Pd-list mailing list