----- Mail transféré -----
De: "patko" <colet.patr...@free.fr>
À: "Mathieu Bouchard" <ma...@artengine.ca>
Envoyé: Vendredi 25 Juin 2010 12h55:48 GMT +01:00 Amsterdam / Berlin / Berne / 
Rome / Stockholm / Vienne
Objet: Re: [PD] [#store] grid index


----- "Mathieu Bouchard" <ma...@artengine.ca> a écrit :

> On Thu, 24 Jun 2010, Mathieu Bouchard wrote:
> 
> > The trick is to use a [#slice] to extract the information to sort 
> > about ; however the [#slice] needs to know the height of the grid,
> so 
> > you need a [#dim]. the [#unpack] and msgbox is only one way to do it
> in 
> > two steps : you can also do [# * (1 0)] [# + (0 1)] and there are a
> 
> > bunch of other equivalent ways. Then, when you have a grid of size
> (n 1) 
> > and you need to get it to size (n), you'd do something like [#fold
> +] or 
> > [#fold put],
> 
> Actually, in the case where you only want the last column, you can
> skip 
> [#slice] and [#dim] and just use [#fold put].
> 
> Therefore, if you only want the last column, you can flip the grid
> using 
> [#reverse 1] before using [#fold put].
> 
> And if you know the number of columns in advance, you can select the 
> column using a one among zeroes, as in [#inner (5 # 1 0 0 0 0)], which
> in 
> this case is the same as [# * (1 0 0 0 0)] then [#fold +] (this 
> equivalence only works with simple cases of #inner, those where the 
> right-inlet has only one dim)
> 


 Thank you it's been useful.

 I'd like to use also this thread to expose another problem, it's about to get 
how [#for 1 3 1] works,
it often outputs this message:

dimension mismatch: from:Dim[] to:Dim[1] step:Dim[]

 The object works good when I try manually, but when it's done with triggers,
this message come in a way that is really hard to trace,
 When inlets are triggered by the same flow, something sometimes comes at the 
outlets.

 Attached is an exemple of what I'm trying to expose. 


 I do understand that there is a GRID_FLOW time as it's explained in 
[#finished] help file
but the lack of pratical examples really slows the understanding of a "good 
use" of gridflow class objects.

hartelijk

p


-- 
Patrice Colet 
#N canvas 919 265 768 300 10;
#X obj 136 209 #for 1 3 1;
#X obj 118 63 list length;
#X obj 143 255 display;
#X obj 94 97 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 120 85 t b;
#X obj 214 65 list length;
#X obj 216 87 t b a;
#X msg 118 40 1 23 56 85 96;
#X msg 168 105 4;
#X obj 302 97 list length;
#X msg 303 75 54 75 21 2 38 5 46 10 7 59 3 25 41 0 23 8;
#X msg 215 43 54 75 21 2 38 5 46 10 7;
#X obj 304 119 t a a;
#X obj 306 141 #finished;
#X connect 0 0 2 0;
#X connect 1 0 4 0;
#X connect 1 0 0 1;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 6 0;
#X connect 6 0 0 0;
#X connect 6 1 0 1;
#X connect 7 0 1 0;
#X connect 8 0 0 1;
#X connect 9 0 12 0;
#X connect 10 0 9 0;
#X connect 11 0 5 0;
#X connect 12 0 13 0;
#X connect 12 1 0 1;
#X connect 13 0 0 0;
_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to