Forums > MaxMSP

detecting new memebers in list

December 8, 2006 | 7:56 pm

hi, i couldn’t find an object taht does this. i built an abstraction (i cant
post now it now) which goes around this using Lobjects Lfilt and some coll
magic. but this only work with pre defind lists.
any ready made solution or logic to do this right?


December 8, 2006 | 10:45 pm

by new members you mean when the number of memebers is growing form one state to another ?

in that case you could use [zl len] to measure the difference of size from one state to another and use that as an argument for a [zl slice] and output the list of new members out the right outlet…

Quote: yair r. wrote on Fri, 08 December 2006 11:56
—————————————————-
> hi, i couldn’t find an object taht does this. i built an abstraction (i cant
> post now it now) which goes around this using Lobjects Lfilt and some coll
> magic. but this only work with pre defind lists.
> any ready made solution or logic to do this right?
>
>
>
—————————————————-


December 8, 2006 | 11:54 pm

but this solution do not address a situation were the new member is
introduced
in between members.

33 34 35
33 34 32 35

On 12/9/06, karl-otto von oertzen wrote:
>
>
> by new members you mean when the number of memebers is growing form one
> state to another ?
>
> in that case you could use [zl len] to measure the difference of size from
> one state to another and use that as an argument for a [zl slice] and
> output the list of new members out the right outlet…
>
>
>
>
>
> Quote: yair r. wrote on Fri, 08 December 2006 11:56
> —————————————————-
> > hi, i couldn’t find an object taht does this. i built an abstraction (i
> cant
> > post now it now) which goes around this using Lobjects Lfilt and some
> coll
> > magic. but this only work with pre defind lists.
> > any ready made solution or logic to do this right?
> >
> >
> >
> —————————————————-
>
>
> –
> karrrlo
> http://www.marswalkers.org
> http://www.fleeingbirds.org
>


December 9, 2006 | 1:32 am

you are right, although you did not specify how your lists were generated or how your new members would be added into your lists.
how do new members find their way into the list you wish analyse , if i may ask ?

if you know the value of your new member(s) before hand you can use [Lfind]

Quote: yair r. wrote on Fri, 08 December 2006 15:54
—————————————————-
> but this solution do not address a situation were the new member is
> introduced
> in between members.
>
> 33 34 35
> 33 34 32 35
>
> On 12/9/06, karl-otto von oertzen wrote:
> >
> >
> > by new members you mean when the number of memebers is growing form one
> > state to another ?
> >
> > in that case you could use [zl len] to measure the difference of size from
> > one state to another and use that as an argument for a [zl slice] and
> > output the list of new members out the right outlet…


December 9, 2006 | 11:21 am

On 9-Dec-2006, at 0:54, yair reshef wrote:

> but this solution do not address a situation were the new member is
> introduced
> in between members.
>
> 33 34 35
> 33 34 32 35

Lfilt

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de


December 9, 2006 | 1:25 pm

i am using cv.jit.
using Lfilt i manged
previous: 33 34 32 35
current: 33 34 35
result: 32

but not
previous: 33 34 35
current: 33 34 32 35
result: ?

On 12/9/06, Peter Castine

wrote:
>
> On 9-Dec-2006, at 0:54, yair reshef wrote:
>
> > but this solution do not address a situation were the new member is
> > introduced
> > in between members.
> >
> > 33 34 35
> > 33 34 32 35
>
> Lfilt
>
> ————– http://www.bek.no/~pcastine/Litter/ ————-
> Peter Castine +–> Litter Power & Litter Bundle for Jitter
> Universal Binaries on the way
> iCE: Sequencing, Recording &
> Interface Building for |home | chez nous|
> Max/MSP Extremely cool |bei uns | i nostri|
> http://www.dspaudio.com/ http://www.castine.de
>
>
>


December 9, 2006 | 3:34 pm

On 9-Dec-2006, at 14:25, yair reshef wrote:

> but not
> previous: 33 34 35
> current: 33 34 32 35
> result: ?

Then use a little bit of imagination. For instance:

2 Lfilts, one comparing previous to current and the other comparing
current to previous.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de


December 9, 2006 | 8:52 pm

a day in the life…

On 12/9/06, Peter Castine

wrote:
>
> On 9-Dec-2006, at 14:25, yair reshef wrote:
>
> > but not
> > previous: 33 34 35
> > current: 33 34 32 35
> > result: ?
>
> Then use a little bit of imagination. For instance:
>
> 2 Lfilts, one comparing previous to current and the other comparing
> current to previous.
>
>
> ————– http://www.bek.no/~pcastine/Litter/ ————-
> Peter Castine +–> Litter Power & Litter Bundle for Jitter
> Universal Binaries on the way
> iCE: Sequencing, Recording &
> Interface Building for |home | chez nous|
> Max/MSP Extremely cool |bei uns | i nostri|
> http://www.dspaudio.com/ http://www.castine.de
>
>
>


December 10, 2006 | 8:38 pm

yair reshef wrote:
> i am using cv.jit.

What about a solution with standard objects?

I just came across a similar problem and made this:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 20 74 620 474;
#P window setfont "Sans Serif" 9.;
#P newex 190 200 50 196617 change;
#P newex 247 200 50 196617 change;
#P newex 50 244 47 196617 gate;
#P newex 213 119 44 196617 t i i i;
#P newex 200 145 23 196617 >=;
#P newex 213 72 35 196617 zl len;
#P newex 190 174 50 196617 zl ecils 1;
#P newex 50 264 48 196617 zl slice 1;
#P newex 50 223 47 196617 zl slice;
#P newex 50 200 35 196617 zl reg;
#P newex 132 264 27 196617 + 1;
#P newex 132 200 21 196617 int;
#P newex 103 174 39 196617 b;
#N counter;
#X flags 0 0;
#P newobj 143 174 43 196617 counter;
#P newex 52 150 61 196617 sel 0;
#P newex 52 174 48 196617 deferlow;
#P newex 52 129 56 196617 != 0.;
#P newex 98 107 44 196617 zl queue;
#P newex 52 107 44 196617 zl queue;
#P newex 121 83 42 196617 zl reg;
#P newex 52 50 171 196617 t b l b b zlclear 0 l l;
#P inlet 52 30 15 0;
#P outlet 247 286 15 0;
#P outlet 190 286 15 0;
#P outlet 132 286 15 0;
#P outlet 50 286 15 0;
#P fasten 13 0 16 0 108 196 55 196;
#P connect 16 0 17 0;
#P connect 21 0 23 0;
#P connect 23 0 18 0;
#P connect 18 0 0 0;
#P connect 4 0 5 0;
#P fasten 5 1 7 0 80 87 57 87;
#P fasten 5 4 7 0 149 70 57 70;
#P fasten 10 0 7 0 57 194 47 194 47 102 57 102;
#P connect 5 0 7 0;
#P connect 7 0 9 0;
#P connect 9 0 11 0;
#P connect 11 0 10 0;
#P connect 5 1 16 1;
#P fasten 14 0 17 1 137 220 92 220;
#P connect 17 1 23 1;
#P fasten 11 0 8 0 57 170 146 170 146 103 103 103;
#P fasten 6 0 8 0 126 103 103 103;
#P connect 5 2 8 0;
#P fasten 5 4 8 0 149 73 103 73;
#P connect 8 0 9 1;
#P connect 11 1 13 0;
#P connect 5 3 6 0;
#P connect 13 1 14 0;
#P connect 14 0 15 0;
#P connect 15 0 1 0;
#P fasten 11 0 12 0 57 170 148 170;
#P connect 12 0 14 1;
#P fasten 5 1 6 1 80 78 158 78;
#P connect 5 5 12 3;
#P connect 5 6 19 0;
#P fasten 19 1 25 0 235 195 195 195;
#P connect 25 0 2 0;
#P fasten 22 1 21 0 235 140 205 140;
#P connect 5 7 20 0;
#P connect 20 0 22 0;
#P connect 22 0 21 1;
#P connect 22 2 24 0;
#P connect 24 0 3 0;
#P pop;
#P newobj 110 165 124 196617 p listchange;
#P message 156 118 98 196617 33 34 32 32 35 36;
#P number 162 139 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 224 211 15 0;
#P button 186 211 15 0;
#P button 148 211 15 0;
#P button 110 211 15 0;
#P message 130 96 69 196617 33 34 32 35;
#P message 110 75 50 196617 33 34 35;
#P number 224 189 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 186 189 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 226 235 37 196617 length;
#P comment 188 235 31 196617 last;
#P number 148 189 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 110 189 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 150 235 31 196617 index;
#P comment 111 235 31 196617 value;
#P window linecount 6;
#P comment 267 74 100 196617 listchange will give the first value and
index of a change in a list , and in addition the last value and index
as well…;
#P connect 16 0 17 0;
#P connect 15 0 17 0;
#P connect 10 0 17 0;
#P connect 9 0 17 0;
#P connect 17 3 8 0;
#P connect 17 2 7 0;
#P connect 17 1 4 0;
#P connect 17 0 3 0;
#P connect 8 0 14 0;
#P connect 7 0 13 0;
#P connect 4 0 12 0;
#P connect 3 0 11 0;
#P window clipboard copycount 18;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


December 11, 2006 | 3:48 pm

Stefan, as always a purist..
your abstraction gave me a great unconstructing exercise in flow logic but
doesn’t seem to help as it only detects the first change in the list. is
that so?
i tried going all standard on this one but got a brain cramp and for the
last step used 2 lobjects.
forgive me.

max v2;
#N vpatcher 15 55 615 455;
#P window setfont "Sans Serif" 12.;
#P window linecount 1;
#N vpatcher 15 55 615 455;
#P window setfont "Sans Serif" 9.;
#P newex 50 153 37 9109513 Lbuf;
#P window setfont "Sans Serif" 12.;
#P newex 161 342 57 9109516 Lfilt;
#P window setfont "Sans Serif" 9.;
#P newex 158 272 40 9109513 zl group;
#P newex 208 249 57 9109513 zl group;
#P newex 222 205 19 9109513 t b;
#P newex 222 227 27 9109513 i;
#P newex 158 215 27 9109513 i;
#P window setfont "Sans Serif" 12.;
#P newex 89 50 131 9109516 t l b zlclear l b;
#P window setfont "Sans Serif" 9.;
#P newex 158 179 74 9109513 sel 0;
#P newex 176 97 27 9109513 t b i;
#P newex 176 76 21 9109513 iter;
#P newex 89 153 79 9109513 zl sub;
#B color 5;
#P inlet 89 30 15 0;
#P outlet 208 273 15 0;
#P outlet 158 296 15 0;
#P outlet 161 369 15 0;
#P connect 8 0 15 0;
#P connect 3 0 8 0;
#P connect 8 0 4 0;
#P connect 6 0 4 0;
#P connect 8 2 4 0;
#P connect 6 1 4 1;
#P fasten 4 1 7 0 163 175 163 175;
#P connect 7 0 9 0;
#P fasten 8 1 13 0 124 269 163 269;
#P connect 9 0 13 0;
#P connect 13 0 1 0;
#P connect 15 0 14 0;
#P connect 14 0 0 0;
#P connect 6 1 9 1;
#P connect 8 3 5 0;
#P connect 5 0 6 0;
#P fasten 8 1 12 0 124 241 213 241;
#P connect 10 0 12 0;
#P connect 12 0 2 0;
#P connect 12 0 14 1;
#P fasten 7 1 11 0 227 201 227 201;
#P fasten 11 0 10 0 227 226 227 226;
#P connect 6 1 10 1;
#P pop;
#P newobj 82 115 90 9109516 p listchange;
#P window setfont "Sans Serif" 9.;
#P message 81 81 69 9109513 35 36 37 38;
#P message 60 60 83 9109513 32 33 33 34 35 36;
#P newex 162 142 57 9109513 print same;
#P newex 82 182 49 9109513 print new;
#P newex 122 162 50 9109513 print gone;
#P connect 4 0 5 0;
#P connect 3 0 5 0;
#P connect 5 0 1 0;
#P connect 5 1 0 0;
#P connect 5 2 2 0;
#P pop;

On 12/10/06, Stefan Tiedje wrote:
>
> yair reshef wrote:
> > i am using cv.jit.
>
> What about a solution with standard objects?
>
> I just came across a similar problem and made this:
>
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #N vpatcher 20 74 620 474;
> #P window setfont "Sans Serif" 9.;
> #P newex 190 200 50 196617 change;
> #P newex 247 200 50 196617 change;
> #P newex 50 244 47 196617 gate;
> #P newex 213 119 44 196617 t i i i;
> #P newex 200 145 23 196617 >=;
> #P newex 213 72 35 196617 zl len;
> #P newex 190 174 50 196617 zl ecils 1;
> #P newex 50 264 48 196617 zl slice 1;
> #P newex 50 223 47 196617 zl slice;
> #P newex 50 200 35 196617 zl reg;
> #P newex 132 264 27 196617 + 1;
> #P newex 132 200 21 196617 int;
> #P newex 103 174 39 196617 b;
> #N counter;
> #X flags 0 0;
> #P newobj 143 174 43 196617 counter;
> #P newex 52 150 61 196617 sel 0;
> #P newex 52 174 48 196617 deferlow;
> #P newex 52 129 56 196617 != 0.;
> #P newex 98 107 44 196617 zl queue;
> #P newex 52 107 44 196617 zl queue;
> #P newex 121 83 42 196617 zl reg;
> #P newex 52 50 171 196617 t b l b b zlclear 0 l l;
> #P inlet 52 30 15 0;
> #P outlet 247 286 15 0;
> #P outlet 190 286 15 0;
> #P outlet 132 286 15 0;
> #P outlet 50 286 15 0;
> #P fasten 13 0 16 0 108 196 55 196;
> #P connect 16 0 17 0;
> #P connect 21 0 23 0;
> #P connect 23 0 18 0;
> #P connect 18 0 0 0;
> #P connect 4 0 5 0;
> #P fasten 5 1 7 0 80 87 57 87;
> #P fasten 5 4 7 0 149 70 57 70;
> #P fasten 10 0 7 0 57 194 47 194 47 102 57 102;
> #P connect 5 0 7 0;
> #P connect 7 0 9 0;
> #P connect 9 0 11 0;
> #P connect 11 0 10 0;
> #P connect 5 1 16 1;
> #P fasten 14 0 17 1 137 220 92 220;
> #P connect 17 1 23 1;
> #P fasten 11 0 8 0 57 170 146 170 146 103 103 103;
> #P fasten 6 0 8 0 126 103 103 103;
> #P connect 5 2 8 0;
> #P fasten 5 4 8 0 149 73 103 73;
> #P connect 8 0 9 1;
> #P connect 11 1 13 0;
> #P connect 5 3 6 0;
> #P connect 13 1 14 0;
> #P connect 14 0 15 0;
> #P connect 15 0 1 0;
> #P fasten 11 0 12 0 57 170 148 170;
> #P connect 12 0 14 1;
> #P fasten 5 1 6 1 80 78 158 78;
> #P connect 5 5 12 3;
> #P connect 5 6 19 0;
> #P fasten 19 1 25 0 235 195 195 195;
> #P connect 25 0 2 0;
> #P fasten 22 1 21 0 235 140 205 140;
> #P connect 5 7 20 0;
> #P connect 20 0 22 0;
> #P connect 22 0 21 1;
> #P connect 22 2 24 0;
> #P connect 24 0 3 0;
> #P pop;
> #P newobj 110 165 124 196617 p listchange;
> #P message 156 118 98 196617 33 34 32 32 35 36;
> #P number 162 139 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 224 211 15 0;
> #P button 186 211 15 0;
> #P button 148 211 15 0;
> #P button 110 211 15 0;
> #P message 130 96 69 196617 33 34 32 35;
> #P message 110 75 50 196617 33 34 35;
> #P number 224 189 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 186 189 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P comment 226 235 37 196617 length;
> #P comment 188 235 31 196617 last;
> #P number 148 189 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 110 189 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P comment 150 235 31 196617 index;
> #P comment 111 235 31 196617 value;
> #P window linecount 6;
> #P comment 267 74 100 196617 listchange will give the first value and
> index of a change in a list , and in addition the last value and index
> as well…;
> #P connect 16 0 17 0;
> #P connect 15 0 17 0;
> #P connect 10 0 17 0;
> #P connect 9 0 17 0;
> #P connect 17 3 8 0;
> #P connect 17 2 7 0;
> #P connect 17 1 4 0;
> #P connect 17 0 3 0;
> #P connect 8 0 14 0;
> #P connect 7 0 13 0;
> #P connect 4 0 12 0;
> #P connect 3 0 11 0;
> #P window clipboard copycount 18;
>
>
> –
> Stefan Tiedje————x——-
> –_____———–|————–
> –(_|_ —-|—–|—–()——-
> — _|_)—-|—–()————–
> ———-()——–www.ccmix.com
>
>


December 12, 2006 | 1:46 pm

yair reshef wrote:
> Stefan, as always a purist..
> your abstraction gave me a great unconstructing exercise in flow logic
> but doesn’t seem to help as it only detects the first change in the
> list. is that so?
> i tried going all standard on this one but got a brain cramp and for the
> last step used 2 lobjects.
> forgive me.

Your analysis is correct. I used as starting point a patch to dectect
the change of a function object, and as I have only one mouse pointer to
change one point, that was sufficient to me…

Another attempt is to split the list at the first point of change:

Stefan

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 360 153 604 546;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 126 227 38 196617 t b i;
#P newex 126 206 38 196617 change;
#P newex 126 184 37 196617 int;
#P newex 107 292 22 196617 – 1;
#P newex 66 206 51 196617 t break b;
#P newex 107 268 67 196617 int;
#P newex 71 315 46 196617 zl slice;
#P newex 71 268 35 196617 zl reg;
#P newex 66 185 31 196617 sel 0;
#P newex 66 164 56 196617 == 0.;
#P newex 50 96 125 196617 uzi;
#P newex 165 72 42 196617 zl len;
#P newex 50 51 148 196617 t b l l b zlclear l b;
#P newex 112 143 43 196617 zl queue;
#P newex 66 143 43 196617 zl queue;
#P newex 119 119 36 196617 zl reg;
#P inlet 50 31 15 0;
#P outlet 107 337 15 0;
#P outlet 154 336 15 0;
#P outlet 71 337 15 0;
#P connect 3 0 7 0;
#P connect 7 0 9 0;
#P fasten 15 0 9 0 71 228 45 228 45 92 55 92;
#P fasten 9 0 5 0 55 139 71 139;
#P fasten 7 4 5 0 147 72 71 72;
#P fasten 7 1 5 0 78 79 71 79;
#P connect 5 0 10 0;
#P connect 10 0 11 0;
#P connect 11 0 15 0;
#P connect 15 1 12 0;
#P connect 19 0 12 0;
#P connect 12 0 13 0;
#P connect 13 0 0 0;
#P connect 7 2 12 1;
#P connect 15 1 14 0;
#P connect 14 0 16 0;
#P connect 19 1 13 1;
#P connect 16 0 13 1;
#P connect 13 1 2 0;
#P fasten 9 0 6 0 55 139 117 139;
#P fasten 7 4 6 0 147 72 117 72;
#P fasten 4 0 6 0 124 139 117 139;
#P connect 6 0 10 1;
#P connect 7 3 4 0;
#P connect 9 1 17 0;
#P connect 17 0 18 0;
#P connect 18 0 19 0;
#P fasten 7 1 4 1 78 79 150 79;
#P connect 8 0 17 1;
#P connect 19 1 1 0;
#P fasten 14 0 1 0 112 288 159 288;
#P connect 9 2 14 1;
#P connect 7 5 8 0;
#P connect 8 0 9 1;
#P pop;
#P newobj 58 150 106 196617 p changeslice;
#P newex 58 128 39 196617 t l set;
#P button 117 174 15 0;
#P button 68 173 15 0;
#P number 154 173 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 106 222 195 196617 35;
#P newex 106 202 62 196617 prepend set;
#P message 58 240 195 196617 33 34;
#P window linecount 2;
#P newex 58 202 45 196617 prepend set;
#P window linecount 1;
#P message 104 79 98 196617 33 34 32 32 35 36;
#P number 110 100 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 78 57 69 196617 33 34 32 35;
#P message 58 36 50 196617 33 34 35;
#P button 192 173 15 0;
#P window linecount 3;
#P comment 218 115 85 196617 changeslice will slice a list at the point
of change;
#P connect 14 2 10 0;
#P connect 14 2 1 0;
#P connect 14 1 8 0;
#P connect 14 1 12 0;
#P connect 14 0 6 0;
#P connect 14 0 11 0;
#P connect 13 0 14 0;
#P connect 8 0 9 0;
#P hidden connect 13 1 7 0;
#P hidden connect 13 1 9 0;
#P connect 6 0 7 0;
#P connect 2 0 13 0;
#P connect 3 0 13 0;
#P connect 5 0 13 0;
#P connect 4 0 13 0;
#P window clipboard copycount 15;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


December 13, 2006 | 1:16 pm

thank stefan, i still need the hive’s help on this one as all my trys have
some expections that dont work.
Lfilt doesnt cut it as when a list in the right inlet is longer then the
one on the left it rejects it. for some reason.

On 12/12/06, Stefan Tiedje < Stefan-Tiedje@addcom.de> wrote:
>
> yair reshef wrote:
> > Stefan, as always a purist..
> > your abstraction gave me a great unconstructing exercise in flow logic
> > but doesn’t seem to help as it only detects the first change in the
> > list. is that so?
> > i tried going all standard on this one but got a brain cramp and for the
>
> > last step used 2 lobjects.
> > forgive me.
>
> Your analysis is correct. I used as starting point a patch to dectect
> the change of a function object, and as I have only one mouse pointer to
> change one point, that was sufficient to me…
>
> Another attempt is to split the list at the first point of change:
>
> Stefan
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #N vpatcher 360 153 604 546;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 126 227 38 196617 t b i;
> #P newex 126 206 38 196617 change;
> #P newex 126 184 37 196617 int;
> #P newex 107 292 22 196617 – 1;
> #P newex 66 206 51 196617 t break b;
> #P newex 107 268 67 196617 int;
> #P newex 71 315 46 196617 zl slice;
> #P newex 71 268 35 196617 zl reg;
> #P newex 66 185 31 196617 sel 0;
> #P newex 66 164 56 196617 == 0.;
> #P newex 50 96 125 196617 uzi;
> #P newex 165 72 42 196617 zl len;
> #P newex 50 51 148 196617 t b l l b zlclear l b;
> #P newex 112 143 43 196617 zl queue;
> #P newex 66 143 43 196617 zl queue;
> #P newex 119 119 36 196617 zl reg;
> #P inlet 50 31 15 0;
> #P outlet 107 337 15 0;
> #P outlet 154 336 15 0;
> #P outlet 71 337 15 0;
> #P connect 3 0 7 0;
> #P connect 7 0 9 0;
> #P fasten 15 0 9 0 71 228 45 228 45 92 55 92;
> #P fasten 9 0 5 0 55 139 71 139;
> #P fasten 7 4 5 0 147 72 71 72;
> #P fasten 7 1 5 0 78 79 71 79;
> #P connect 5 0 10 0;
> #P connect 10 0 11 0;
> #P connect 11 0 15 0;
> #P connect 15 1 12 0;
> #P connect 19 0 12 0;
> #P connect 12 0 13 0;
> #P connect 13 0 0 0;
> #P connect 7 2 12 1;
> #P connect 15 1 14 0;
> #P connect 14 0 16 0;
> #P connect 19 1 13 1;
> #P connect 16 0 13 1;
> #P connect 13 1 2 0;
> #P fasten 9 0 6 0 55 139 117 139;
> #P fasten 7 4 6 0 147 72 117 72;
> #P fasten 4 0 6 0 124 139 117 139;
> #P connect 6 0 10 1;
> #P connect 7 3 4 0;
> #P connect 9 1 17 0;
> #P connect 17 0 18 0;
> #P connect 18 0 19 0;
> #P fasten 7 1 4 1 78 79 150 79;
> #P connect 8 0 17 1;
> #P connect 19 1 1 0;
> #P fasten 14 0 1 0 112 288 159 288;
> #P connect 9 2 14 1;
> #P connect 7 5 8 0;
> #P connect 8 0 9 1;
> #P pop;
> #P newobj 58 150 106 196617 p changeslice;
> #P newex 58 128 39 196617 t l set;
> #P button 117 174 15 0;
> #P button 68 173 15 0;
> #P number 154 173 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 106 222 195 196617 35;
> #P newex 106 202 62 196617 prepend set;
> #P message 58 240 195 196617 33 34;
> #P window linecount 2;
> #P newex 58 202 45 196617 prepend set;
> #P window linecount 1;
> #P message 104 79 98 196617 33 34 32 32 35 36;
> #P number 110 100 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 78 57 69 196617 33 34 32 35;
> #P message 58 36 50 196617 33 34 35;
> #P button 192 173 15 0;
> #P window linecount 3;
> #P comment 218 115 85 196617 changeslice will slice a list at the point
> of change;
> #P connect 14 2 10 0;
> #P connect 14 2 1 0;
> #P connect 14 1 8 0;
> #P connect 14 1 12 0;
> #P connect 14 0 6 0;
> #P connect 14 0 11 0;
> #P connect 13 0 14 0;
> #P connect 8 0 9 0;
> #P hidden connect 13 1 7 0;
> #P hidden connect 13 1 9 0;
> #P connect 6 0 7 0;
> #P connect 2 0 13 0;
> #P connect 3 0 13 0;
> #P connect 5 0 13 0;
> #P connect 4 0 13 0;
> #P window clipboard copycount 15;
>
>
>
> –
> Stefan Tiedje————x——-
> –_____———–|————–
> –(_|_ —-|—–|—–()——-
> — _|_)—-|—–()————–
> ———-()——– http://www.ccmix.com
>
>
>


December 13, 2006 | 3:39 pm

just to wrap this, i dug deeper and re-found the unique and sect object,
which throw some rescopy errors on int, but get the job done. still would
like to see an object that does this, or a standard object abstraction. for
now this is beyond my capabilities.
max v2;
#N vpatcher 15 55 757 553;
#P window setfont "Sans Serif" 12.;
#P window linecount 1;
#P newex 165 326 64 9109516 t l b b;
#P newex 206 365 37 9109516 zl reg;
#P newex 165 387 37 9109516 zl reg;
#P message 356 300 66 9109516 zlclear;
#P window linecount 2;
#P newex 242 229 40 9109516 print same;
#P window linecount 1;
#P newex 274 275 32 9109516 t l l;
#P newex 233 328 51 9109516 zl union;
#P newex 165 416 51 9109516 unique;
#P newex 164 441 62 9109516 print gone;
#P message 187 57 22 9109516 34;
#P window linecount 2;
#P message 369 52 66 9109516 35 36 37 38;
#P message 293 52 66 9109516 33 34 35 36;
#P window linecount 1;
#P message 212 57 22 9109516 33;
#P window linecount 2;
#P newex 286 228 31 9109516 print new;
#P window linecount 1;
#P newex 192 101 174 9109516 t l l l b b;
#P newex 315 145 37 9109516 zl reg;
#P newex 274 200 46 9109516 unique;
#P newex 233 200 31 9109516 sect;
#P connect 10 0 9 0;
#P fasten 3 0 17 0 197 224 170 224;
#P connect 17 1 15 0;
#P connect 15 0 10 0;
#P connect 7 0 3 0;
#P connect 5 0 3 0;
#P connect 8 0 3 0;
#P connect 6 0 3 0;
#P connect 17 0 15 1;
#P connect 17 2 16 0;
#P connect 16 0 10 1;
#P connect 3 1 0 0;
#P connect 0 0 11 0;
#P fasten 14 0 11 0 361 324 238 324;
#P connect 11 0 16 1;
#P fasten 12 1 16 1 301 359 238 359;
#P connect 0 0 13 0;
#P connect 2 0 0 1;
#P connect 3 2 1 0;
#P connect 1 0 12 0;
#P connect 12 0 11 1;
#P connect 1 0 4 0;
#P connect 2 0 1 1;
#P connect 3 3 2 0;
#P fasten 3 0 2 1 197 134 347 134;
#P connect 3 4 14 0;
#P pop;

On 12/13/06, yair reshef wrote:
>
> thank stefan, i still need the hive’s help on this one as all my trys have
> some expections that dont work.
> Lfilt doesnt cut it as when a list in the right inlet is longer then the
> one on the left it rejects it. for some reason.
>
>
> On 12/12/06, Stefan Tiedje < Stefan-Tiedje@addcom.de> wrote:
> >
> > yair reshef wrote:
> > > Stefan, as always a purist..
> > > your abstraction gave me a great unconstructing exercise in flow logic
> > > but doesn’t seem to help as it only detects the first change in the
> > > list. is that so?
> > > i tried going all standard on this one but got a brain cramp and for
> > the
> > > last step used 2 lobjects.
> > > forgive me.
> >
> > Your analysis is correct. I used as starting point a patch to dectect
> > the change of a function object, and as I have only one mouse pointer to
> > change one point, that was sufficient to me…
> >
> > Another attempt is to split the list at the first point of change:
> >
> > Stefan
> >
> > #P window setfont "Sans Serif" 9.;
> > #P window linecount 1;
> > #N vpatcher 360 153 604 546;
> > #P window setfont "Sans Serif" 9.;
> > #P window linecount 1;
> > #P newex 126 227 38 196617 t b i;
> > #P newex 126 206 38 196617 change;
> > #P newex 126 184 37 196617 int;
> > #P newex 107 292 22 196617 – 1;
> > #P newex 66 206 51 196617 t break b;
> > #P newex 107 268 67 196617 int;
> > #P newex 71 315 46 196617 zl slice;
> > #P newex 71 268 35 196617 zl reg;
> > #P newex 66 185 31 196617 sel 0;
> > #P newex 66 164 56 196617 == 0.;
> > #P newex 50 96 125 196617 uzi;
> > #P newex 165 72 42 196617 zl len;
> > #P newex 50 51 148 196617 t b l l b zlclear l b;
> > #P newex 112 143 43 196617 zl queue;
> > #P newex 66 143 43 196617 zl queue;
> > #P newex 119 119 36 196617 zl reg;
> > #P inlet 50 31 15 0;
> > #P outlet 107 337 15 0;
> > #P outlet 154 336 15 0;
> > #P outlet 71 337 15 0;
> > #P connect 3 0 7 0;
> > #P connect 7 0 9 0;
> > #P fasten 15 0 9 0 71 228 45 228 45 92 55 92;
> > #P fasten 9 0 5 0 55 139 71 139;
> > #P fasten 7 4 5 0 147 72 71 72;
> > #P fasten 7 1 5 0 78 79 71 79;
> > #P connect 5 0 10 0;
> > #P connect 10 0 11 0;
> > #P connect 11 0 15 0;
> > #P connect 15 1 12 0;
> > #P connect 19 0 12 0;
> > #P connect 12 0 13 0;
> > #P connect 13 0 0 0;
> > #P connect 7 2 12 1;
> > #P connect 15 1 14 0;
> > #P connect 14 0 16 0;
> > #P connect 19 1 13 1;
> > #P connect 16 0 13 1;
> > #P connect 13 1 2 0;
> > #P fasten 9 0 6 0 55 139 117 139;
> > #P fasten 7 4 6 0 147 72 117 72;
> > #P fasten 4 0 6 0 124 139 117 139;
> > #P connect 6 0 10 1;
> > #P connect 7 3 4 0;
> > #P connect 9 1 17 0;
> > #P connect 17 0 18 0;
> > #P connect 18 0 19 0;
> > #P fasten 7 1 4 1 78 79 150 79;
> > #P connect 8 0 17 1;
> > #P connect 19 1 1 0;
> > #P fasten 14 0 1 0 112 288 159 288;
> > #P connect 9 2 14 1;
> > #P connect 7 5 8 0;
> > #P connect 8 0 9 1;
> > #P pop;
> > #P newobj 58 150 106 196617 p changeslice;
> > #P newex 58 128 39 196617 t l set;
> > #P button 117 174 15 0;
> > #P button 68 173 15 0;
> > #P number 154 173 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> > #P message 106 222 195 196617 35;
> > #P newex 106 202 62 196617 prepend set;
> > #P message 58 240 195 196617 33 34;
> > #P window linecount 2;
> > #P newex 58 202 45 196617 prepend set;
> > #P window linecount 1;
> > #P message 104 79 98 196617 33 34 32 32 35 36;
> > #P number 110 100 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> > #P message 78 57 69 196617 33 34 32 35;
> > #P message 58 36 50 196617 33 34 35;
> > #P button 192 173 15 0;
> > #P window linecount 3;
> > #P comment 218 115 85 196617 changeslice will slice a list at the point
> > of change;
> > #P connect 14 2 10 0;
> > #P connect 14 2 1 0;
> > #P connect 14 1 8 0;
> > #P connect 14 1 12 0;
> > #P connect 14 0 6 0;
> > #P connect 14 0 11 0;
> > #P connect 13 0 14 0;
> > #P connect 8 0 9 0;
> > #P hidden connect 13 1 7 0;
> > #P hidden connect 13 1 9 0;
> > #P connect 6 0 7 0;
> > #P connect 2 0 13 0;
> > #P connect 3 0 13 0;
> > #P connect 5 0 13 0;
> > #P connect 4 0 13 0;
> > #P window clipboard copycount 15;
> >
> >
> >
> > –
> > Stefan Tiedje————x——-
> > –_____———–|————–
> > –(_|_ —-|—–|—–()——-
> > — _|_)—-|—–()————–
> > ———-()——– http://www.ccmix.com
> >
> >
> >
>
>


December 14, 2006 | 9:52 am

yair reshef wrote:
> thank stefan, i still need the hive’s help on this one as all my trys
> have some expections that dont work.

Nobody knows your expectations, this problem might be more complex than
you think. Its one of the things humans can do easily and machines not
that easily. If one member changes, its easy. If several members change,
maybe at two independent points, you need to map matches to a different
point. And still nobody but you knows what you would expect. If you
offer some examples which cover different inputs and the expected
outputs, I am sure its possible to help, but I bet its not trivial…
I bet as well it’s not a question of externals, but a question of
understanding the problem even for yourself.
The time on analyzing the problem is better spent than on searching for
externals…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


December 14, 2006 | 11:44 pm

thanks stefan for the patience , i have been returning to this problem from
time to time for a couple of month. it wasn’t easy but the last patch i
posted works nicely. my biggest problem where movng from lists to inits and
back.
i replaced the [unique] and [sect] (crash prun) with the hidden jams of the
mxj list objects [mxj list.Unique] and [mxj list.Intersection]. i would
recommend all newbies to look at them.
thier part of the standard mac install, do not have the 256 limit, and a
side bonus is that their java source is included.

On 12/14/06, Stefan Tiedje wrote:
>
> yair reshef wrote:
> > thank stefan, i still need the hive’s help on this one as all my trys
> > have some expections that dont work.
>
> Nobody knows your expectations, this problem might be more complex than
> you think. Its one of the things humans can do easily and machines not
> that easily. If one member changes, its easy. If several members change,
> maybe at two independent points, you need to map matches to a different
> point. And still nobody but you knows what you would expect. If you
> offer some examples which cover different inputs and the expected
> outputs, I am sure its possible to help, but I bet its not trivial…
> I bet as well it’s not a question of externals, but a question of
> understanding the problem even for yourself.
> The time on analyzing the problem is better spent than on searching for
> externals…
>
> Stefan
>
> –
> Stefan Tiedje————x——-
> –_____———–|————–
> –(_|_ —-|—–|—–()——-
> — _|_)—-|—–()————–
> ———-()——–www.ccmix.com
>
>



PQE
January 23, 2007 | 8:40 pm

> > but not
> > previous: 33 34 35
> > current: 33 34 32 35
> > result: ?

To get the desired result with lobjects Use a [t l l] object.
Connect the left oupet of the trigger to the right inlet of
lfilt and vice versa. This tests a list, then stores it to be the basis of the next test.

Another interesting problem is to detect items removed from a list. To do that, use a [t l b l] and llist.
connect the trigger outlets;
L to right inlet of llist
middle to left inlett of llist
R to right inlet of lfilt
connect the outlet of llist to the left inlet of lfilt.


Viewing 16 posts - 1 through 16 (of 16 total)