Forums > MaxMSP

list question

February 16, 2007 | 3:58 am

Hi

I’m looking for an object (or patch) to perform the following operation on a list:

input: 1 2 3 4 5 6 7 8

output:
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8

Any suggestions?

Thanks
David


February 16, 2007 | 5:49 am

There has to be an easier way to do this. This code feels very baroque
to me. But, anyway, here is one solution.

b

max v2;
#N vpatcher 27 352 627 752;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 223 128 27 196617 – 1;
#P newex 203 97 50 196617 t b i i;
#P newex 314 175 50 196617 t 0 b b;
#P newex 412 214 50 196617 i;
#P newex 381 242 41 196617 zl nth 0;
#P newex 223 215 76 196617 expr 0 – $i1;
#P newex 267 195 35 196617 zl reg;
#P newex 223 293 50 196617 print;
#P newex 223 245 50 196617 zl rot 0;
#P newex 223 175 54 196617 t i b;
#P newex 223 265 50 196617 zl slice 2;
#P newex 223 149 50 196617 uzi;
#P newex 203 55 188 196617 t l l l;
#P newex 203 75 36 196617 zl len;
#P message 203 36 163 196617 11 12 13 14 15 16 17 18 19;
#P connect 0 0 2 0;
#P connect 2 0 1 0;
#P connect 1 0 13 0;
#P connect 13 1 14 0;
#P connect 14 0 3 0;
#P fasten 3 2 5 0 268 170 228 170;
#P connect 5 0 9 0;
#P connect 8 0 6 0;
#P connect 6 0 4 0;
#P fasten 10 0 7 0 386 287 228 287;
#P connect 4 0 7 0;
#P connect 12 0 6 1;
#P connect 9 0 6 1;
#P connect 5 1 8 0;
#P connect 2 1 8 1;
#P fasten 13 0 12 0 208 121 319 121;
#P fasten 12 1 10 0 339 227 386 227;
#P connect 2 2 10 0;
#P connect 12 2 11 0;
#P fasten 12 0 10 1 319 236 417 236;
#P connect 11 0 10 1;
#P fasten 13 2 11 1 248 117 457 117;
#P pop;

David Morneau wrote:
> Hi
>
> I’m looking for an object (or patch) to perform the following operation on a list:
>
> input: 1 2 3 4 5 6 7 8
>
> output:
> 1 2
> 2 3
> 3 4
> 4 5
> 5 6
> 6 7
> 7 8
> 8
>
> Any suggestions?
>
> Thanks
> David
> –
> ——
> http://5of4.com
>


barry threw
composition : sound : programming
http://www.barrythrew.com
bthrew(at)gmail(dot)com
857-544-3967

Today, Noise is triumphant and reigns sovereign over the sensibility of men.
- Luigi Russolo, The Art of Noises


February 16, 2007 | 6:05 am

This one’s pretty compact. It has a few useful idioms like the
trigger/gate combo and the delay line using zl reg.

wes

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 200 257 36 196617 zl reg;
#P newex 243 199 31 196617 t 1 b;
#P newex 150 114 40 196617 t b l 0;
#P newex 243 227 29 196617 gate;
#P newex 200 332 32 196617 print;
#P newex 226 167 27 196617 t i b;
#P newex 243 301 58 196617 pack 0 0;
#P newex 243 256 42 196617 zl reg;
#P newex 268 140 55 196617 zl group 1;
#P message 150 93 163 196617 11 12 13 14 15 16 17 18 19;
#P connect 4 0 9 1;
#P lcolor 15;
#P fasten 4 0 2 1 231 193 280 193;
#P lcolor 15;
#P fasten 1 0 4 0 273 162 231 162;
#P fasten 1 0 3 1 273 162 296 162;
#P fasten 7 0 9 0 155 249 205 249;
#P lcolor 14;
#P connect 9 0 5 0;
#P connect 6 0 2 0;
#P fasten 7 2 6 0 185 223 248 223;
#P lcolor 14;
#P connect 8 0 6 0;
#P fasten 8 1 6 1 269 221 267 221;
#P connect 4 1 8 0;
#P fasten 7 1 1 0 170 135 273 135;
#P lcolor 14;
#P connect 0 0 7 0;
#P connect 2 0 3 0;
#P fasten 3 0 5 0 248 325 205 325;
#P window clipboard copycount 10;


February 16, 2007 | 6:23 am

Nice.

b

Wesley Smith wrote:
> This one’s pretty compact. It has a few useful idioms like the
> trigger/gate combo and the delay line using zl reg.
>
> wes
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 200 257 36 196617 zl reg;
> #P newex 243 199 31 196617 t 1 b;
> #P newex 150 114 40 196617 t b l 0;
> #P newex 243 227 29 196617 gate;
> #P newex 200 332 32 196617 print;
> #P newex 226 167 27 196617 t i b;
> #P newex 243 301 58 196617 pack 0 0;
> #P newex 243 256 42 196617 zl reg;
> #P newex 268 140 55 196617 zl group 1;
> #P message 150 93 163 196617 11 12 13 14 15 16 17 18 19;
> #P connect 4 0 9 1;
> #P lcolor 15;
> #P fasten 4 0 2 1 231 193 280 193;
> #P lcolor 15;
> #P fasten 1 0 4 0 273 162 231 162;
> #P fasten 1 0 3 1 273 162 296 162;
> #P fasten 7 0 9 0 155 249 205 249;
> #P lcolor 14;
> #P connect 9 0 5 0;
> #P connect 6 0 2 0;
> #P fasten 7 2 6 0 185 223 248 223;
> #P lcolor 14;
> #P connect 8 0 6 0;
> #P fasten 8 1 6 1 269 221 267 221;
> #P connect 4 1 8 0;
> #P fasten 7 1 1 0 170 135 273 135;
> #P lcolor 14;
> #P connect 0 0 7 0;
> #P connect 2 0 3 0;
> #P fasten 3 0 5 0 248 325 205 325;
> #P window clipboard copycount 10;
>


barry threw
composition : sound : programming
http://www.barrythrew.com
bthrew(at)gmail(dot)com
857-544-3967

Today, Noise is triumphant and reigns sovereign over the sensibility of men.
- Luigi Russolo, The Art of Noises


February 16, 2007 | 9:32 am

Hello.

Here’s another compact solution which is very similar to Barry’s. Uses [int]
rather than [zl reg] to store the values.

Jonathan

max v2;
#N vpatcher 290 587 890 987;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 200 188 27 196617 int;
#P newex 120 254 29 196617 t 1 l;
#P newex 120 290 29 196617 gate;
#P newex 105 62 40 196617 t b l 0;
#P newex 120 219 42 196617 pack i i;
#P newex 120 145 43 196617 t i b i;
#P newex 120 188 27 196617 int;
#P newex 120 350 32 196617 print;
#P newex 120 113 25 196617 iter;
#P message 105 37 163 196617 11 12 13 14 15 16 17 18 19;
#P connect 0 0 6 0;
#P connect 6 1 1 0;
#P connect 1 0 4 0;
#P connect 4 1 3 0;
#P connect 3 0 5 0;
#P connect 5 0 8 0;
#P fasten 6 2 7 0 140 98 105 98 105 281 125 281;
#P lcolor 12;
#P connect 8 0 7 0;
#P fasten 9 0 2 0 205 321 125 321;
#P connect 7 0 2 0;
#P connect 4 0 3 1;
#P connect 8 1 7 1;
#P connect 4 2 5 1;
#P fasten 6 0 9 0 110 87 205 87;
#P lcolor 1;
#P fasten 1 0 9 1 125 136 222 136;
#P pop;

On 16/02/07, Barry Threw wrote:
>
> Nice.
>
> b
>
>
> Wesley Smith wrote:
> > This one’s pretty compact. It has a few useful idioms like the
> > trigger/gate combo and the delay line using zl reg.
> >
> > wes
> >
> > #P window setfont "Sans Serif" 9.;
> > #P window linecount 1;
> > #P newex 200 257 36 196617 zl reg;
> > #P newex 243 199 31 196617 t 1 b;
> > #P newex 150 114 40 196617 t b l 0;
> > #P newex 243 227 29 196617 gate;
> > #P newex 200 332 32 196617 print;
> > #P newex 226 167 27 196617 t i b;
> > #P newex 243 301 58 196617 pack 0 0;
> > #P newex 243 256 42 196617 zl reg;
> > #P newex 268 140 55 196617 zl group 1;
> > #P message 150 93 163 196617 11 12 13 14 15 16 17 18 19;
> > #P connect 4 0 9 1;
> > #P lcolor 15;
> > #P fasten 4 0 2 1 231 193 280 193;
> > #P lcolor 15;
> > #P fasten 1 0 4 0 273 162 231 162;
> > #P fasten 1 0 3 1 273 162 296 162;
> > #P fasten 7 0 9 0 155 249 205 249;
> > #P lcolor 14;
> > #P connect 9 0 5 0;
> > #P connect 6 0 2 0;
> > #P fasten 7 2 6 0 185 223 248 223;
> > #P lcolor 14;
> > #P connect 8 0 6 0;
> > #P fasten 8 1 6 1 269 221 267 221;
> > #P connect 4 1 8 0;
> > #P fasten 7 1 1 0 170 135 273 135;
> > #P lcolor 14;
> > #P connect 0 0 7 0;
> > #P connect 2 0 3 0;
> > #P fasten 3 0 5 0 248 325 205 325;
> > #P window clipboard copycount 10;
> >
>
> –
> barry threw
> composition : sound : programming
> http://www.barrythrew.com
> bthrew(at)gmail(dot)com
> 857-544-3967
>
> Today, Noise is triumphant and reigns sovereign over the sensibility of
> men.
> – Luigi Russolo, The Art of Noises
>


February 16, 2007 | 9:56 am

On 16 Feb 2007, at 10:32, Jonathan Green wrote:

> Hello.
>
> Here’s another compact solution which is very similar to Barry’s.
> Uses [int] rather than [zl reg] to store the values.

one more:
call it "the ancient-sliding-window-technique" or what ever…
vb

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 95 157 27 196617 – 1;
#P newex 121 268 32 196617 print;
#P newex 53 233 78 196617 zl slice 0;
#P newex 85 64 27 196617 t l l;
#P newex 53 110 34 196617 zl len;
#P newex 53 133 52 196617 uzi 5;
#P newex 95 185 27 196617 + 2;
#P newex 53 212 52 196617 zl slice 2;
#P newex 53 185 36 196617 zl reg;
#P message 85 43 163 196617 11 12 13 14 15 16 17 18 19;
#P connect 9 0 3 0;
#P fasten 9 0 7 1 100 178 126 178;
#P connect 4 2 9 0;
#P connect 3 0 2 1;
#P connect 7 1 8 0;
#P connect 2 0 7 0;
#P connect 5 0 4 0;
#P connect 6 1 1 1;
#P connect 6 0 5 0;
#P connect 0 0 6 0;
#P connect 4 0 1 0;
#P connect 1 0 2 0;
#P window clipboard copycount 10;


February 16, 2007 | 11:37 am

Jonathan Green wrote:
> Here’s another compact solution which is very similar to Barry’s. Uses
> [int] rather than [zl reg] to store the values.

I think that’s an ideal solution for this exercise. But the existence
of an exemplary solution is no reason to miss out on zl-madness! As a
bonus, one of these is very flexible… and I made a cute patch bug…

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 698 41 280 9109513 this pure list solution has the advantage
of working with any data;
#P newex 555 178 27 9109513 * 2;
#P newex 486 285 44 9109513 zl slice 1;
#P newex 486 179 53 9109513 t b b i i;
#P newex 520 341 35 9109513 print A;
#P newex 520 313 38 9109513 zl iter 2;
#P newex 486 109 27 9109513 t l l;
#P newex 555 143 29 9109513 zl len;
#P newex 486 259 40 9109513 zl group;
#P newex 486 220 42 9109513 zl queue;
#P newex 486 143 38 9109513 zl iter 1;
#P message 486 79 135 9109513 11 12 13 14 15 16 17 18 19 20;
#P newex 704 392 35 9109513 print B;
#P newex 704 338 48 9109513 zl group 2;
#P newex 663 255 27 9109513 grab;
#P newex 697 177 27 9109513 – 1;
#P newex 730 95 27 9109513 t l l;
#P newex 742 299 30 9109513 zl nth;
#P newex 704 299 33 9109513 zl mth;
#P newex 697 208 40 9109513 uzi;
#P newex 697 148 29 9109513 zl len;
#P newex 697 255 30 9109513 zl reg;
#P message 730 65 69 9109513 1 2 3 4 5 6 7 8;
#P comment 808 111 100 9109513 (note the bug…);
#P connect 12 0 17 0;
#P connect 17 0 13 0;
#P connect 13 0 20 0;
#P connect 20 3 14 0;
#P connect 20 2 14 0;
#P connect 20 1 14 0;
#P connect 20 0 14 0;
#P connect 14 0 15 0;
#P connect 15 0 21 0;
#P fasten 22 0 15 1 560 249 521 249;
#P connect 21 1 18 0;
#P connect 18 0 19 0;
#P fasten 17 1 16 0 508 134 560 134;
#P connect 16 0 22 0;
#P connect 4 1 9 0;
#P connect 7 0 3 0;
#P connect 3 0 8 0;
#P connect 8 0 4 0;
#P connect 4 0 2 0;
#P connect 2 0 5 0;
#P connect 9 1 5 0;
#P connect 6 0 10 0;
#P connect 5 0 10 0;
#P connect 10 0 11 0;
#P connect 9 0 11 0;
#P fasten 7 1 2 1 752 243 722 243;
#P connect 4 2 5 1;
#P fasten 23 0 7 0 703 89 735 89;
#P connect 1 0 7 0;
#P connect 2 0 6 0;
#P connect 4 2 6 1;
#P window clipboard copycount 24;


February 16, 2007 | 11:54 am

On 16/02/07, dlurk wrote:
>
> Jonathan Green wrote:
> > Here’s another compact solution which is very similar to Barry’s. Uses
> > [int] rather than [zl reg] to store the values.
>
> I think that’s an ideal solution for this exercise. But the existence
> of an exemplary solution is no reason to miss out on zl-madness! As a
> bonus, one of these is very flexible… and I made a cute patch bug…

This is a very good point. You are right that my [int] solution is bespoke
to the problem. Maybe javascript could offer another solution that works
with any data types since it type-casts automatically?

Jonathan


February 16, 2007 | 12:20 pm

Hi,

Here is a 2-objects solution

get the lobjects first

Falk

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 504 152 47 196617 zl iter 2;
#P newex 504 121 171 196617 lswap 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7;
#P message 504 92 127 196617 20 21 22 23 24 25 26 27;
#P newex 504 176 32 196617 print;
#P connect 3 0 0 0;
#P connect 2 0 3 0;
#P connect 1 0 2 0;
#P window clipboard copycount 4;

Am 16.02.2007 um 04:58 schrieb David Morneau:

>
> Hi
>
> I’m looking for an object (or patch) to perform the following
> operation on a list:
>
> input: 1 2 3 4 5 6 7 8
>
> output:
> 1 2
> 2 3
> 3 4
> 4 5
> 5 6
> 6 7
> 7 8
> 8
>
> Any suggestions?
>
> Thanks
> David
> –
> ——
> http://5of4.com


February 16, 2007 | 4:12 pm

Yes, Lobjects!!! But why just two elements?

#P window setfont "Sans Serif" 9.;
#P number 188 137 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 134 139 27 196617 t b i;
#P newex 134 166 65 196617 pack get 0 2;
#P newex 313 85 40 196617 t clear;
#P newex 134 110 27 196617 – 1;
#P newex 104 85 40 196617 uzi;
#P newex 104 62 34 196617 zl len;
#P newex 211 244 32 196617 print;
#P newex 211 208 40 196617 Lbuild;
#P message 243 26 164 196617 11 12 13 14 15 16 17 18 19 20;
#P window linecount 3;
#P comment 178 95 59 196617 try other numbers here;
#P fasten 1 0 4 0 248 51 109 51;
#P connect 1 0 2 1;
#P fasten 1 0 7 0 248 63 318 63;
#P connect 10 0 8 2;
#P connect 9 0 8 0;
#P connect 9 1 8 1;
#P fasten 8 0 2 0 139 195 216 195;
#P connect 6 0 9 0;
#P fasten 7 0 2 0 318 155 216 155;
#P connect 5 2 6 0;
#P connect 4 0 5 0;
#P connect 2 0 3 0;
#P window clipboard copycount 11;

On 2/16/07 7:20 AM, "Falk Grieffenhagen" wrote:

> Hi,
>
> Here is a 2-objects solution
>
> get the lobjects first
>
>
> Falk
>
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 504 152 47 196617 zl iter 2;
> #P newex 504 121 171 196617 lswap 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7;
> #P message 504 92 127 196617 20 21 22 23 24 25 26 27;
> #P newex 504 176 32 196617 print;
> #P connect 3 0 0 0;
> #P connect 2 0 3 0;
> #P connect 1 0 2 0;
> #P window clipboard copycount 4;
>
>
>
>
> Am 16.02.2007 um 04:58 schrieb David Morneau:
>
>>
>> Hi
>>
>> I’m looking for an object (or patch) to perform the following
>> operation on a list:
>>
>> input: 1 2 3 4 5 6 7 8
>>
>> output:
>> 1 2
>> 2 3
>> 3 4
>> 4 5
>> 5 6
>> 6 7
>> 7 8
>> 8
>>
>> Any suggestions?
>>
>> Thanks
>> David
>> –
>> ——
>> http://5of4.com
>

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson


February 16, 2007 | 5:41 pm


February 16, 2007 | 5:48 pm

Falk Grieffenhagen wrote:
> Hi,
>
> Here is a 2-objects solution
>
> get the lobjects first

3rd party is noncompetitive…
my attempts including one with 3 standard objects…

(It seems I can never chime in too late into these competitions… ;-)

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 523 167 50 196617 zl slice 1;
#P newex 484 190 89 196617 mxj list.Multiplex;
#P newex 484 213 47 196617 zl iter 2;
#P message 484 135 127 196617 20 21 22 23 24 25 26 27;
#P newex 484 237 32 196617 print;
#P comment 339 48 96 196617 a different attempt;
#P comment 182 48 96 196617 a corrected version;
#P message 455 68 309 196617 this pure list solution has the advantage
of working with any data;
#P newex 346 236 50 196617 print;
#P newex 323 94 56 196617 t b b l;
#P newex 346 139 73 196617 zl reg;
#P newex 369 117 50 196617 zl slice 1;
#P newex 346 182 25 196617 t l l;
#P newex 346 160 25 196617 iter;
#P message 323 68 127 196617 20 21 22 23 24 25 26 27;
#P newex 346 208 56 196617 zl group 2;
#P newex 179 211 22 196617 int;
#P newex 203 165 37 196617 t 1 i;
#P newex 179 122 59 196617 t b l 0;
#P newex 203 211 37 196617 gate;
#P message 202 92 83 196617 1 2 3 4 5 6 7 8;
#P newex 203 253 45 196617 print;
#P newex 203 231 73 196617 pack;
#P newex 230 190 37 196617 bucket;
#P newex 203 144 28 196617 iter;
#P message 179 68 140 196617 11 12 13 14 15 16 17 18 19;
#P message 48 92 83 196617 1 2 3 4 5 6 7 8;
#P newex 32 213 45 196617 print;
#P newex 32 191 45 196617 pack;
#P newex 32 169 37 196617 bucket;
#P newex 32 143 28 196617 iter;
#P message 32 68 140 196617 11 12 13 14 15 16 17 18 19;
#P comment 29 48 122 196617 this doesn’t do it exactly;
#P connect 29 0 31 0;
#P connect 29 0 32 0;
#P connect 30 0 28 0;
#P connect 31 0 30 0;
#P connect 32 1 31 1;
#P connect 1 0 2 0;
#P connect 4 0 5 0;
#P connect 3 0 4 0;
#P connect 6 0 2 0;
#P fasten 2 0 4 1 37 164 72 164;
#P connect 2 0 3 0;
#P connect 10 0 11 0;
#P connect 14 1 8 0;
#P connect 14 2 13 0;
#P connect 14 0 16 0;
#P connect 16 0 11 0;
#P connect 12 0 14 0;
#P connect 7 0 14 0;
#P connect 15 0 13 0;
#P connect 8 0 15 0;
#P connect 13 0 10 0;
#P connect 9 0 13 1;
#P fasten 15 1 10 1 235 185 271 185;
#P connect 15 1 9 0;
#P fasten 15 1 16 1 235 185 196 185;
#P connect 19 0 20 0;
#P connect 20 0 17 0;
#P connect 20 1 17 0;
#P connect 25 0 23 0;
#P connect 17 0 24 0;
#P fasten 23 0 17 0 328 203 351 203;
#P connect 23 2 21 0;
#P connect 18 0 23 0;
#P connect 22 0 19 0;
#P connect 23 1 22 0;
#P connect 21 1 22 1;
#P fasten 21 0 17 0 374 203 351 203;
#P window clipboard copycount 33;


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


February 16, 2007 | 6:02 pm


February 16, 2007 | 6:47 pm


February 16, 2007 | 6:54 pm

On 16-Feb-2007, at 18:48, Stefan Tiedje wrote:

> 3rd party is noncompetitive…

If you rule out 3rd party externals, you can’t use abhaxions either.
No Java, no Javascript. Only objects released with Max 2.2 in 1990,
and only Uzi’s left outlet.

Let’s make this a game for real men (and women).

————– 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


February 16, 2007 | 7:11 pm

Falk Grieffenhagen wrote:
> not sure what you mean with element.

try "other" in the patch…

or another 3 object version, this time recursive with changable number
of elements….

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 110 129 55 196617 zl slice 2;
#P number 155 107 35 9 1 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 97 171 33 196617 defer;
#P newex 110 150 32 196617 print;
#P newex 52 129 55 196617 zl slice 1;
#P message 88 85 127 196617 20 21 22 23 24 25 26 27;
#P message 52 63 309 196617 this pure list solution has the advantage of
working with any data;
#P comment 197 108 145 196617 < - change number of elements;
#P fasten 5 0 3 0 102 193 45 193 45 126 57 126;
#P fasten 5 0 7 0 102 196 41 196 41 122 115 122;
#P connect 2 0 7 0;
#P connect 3 1 5 0;
#P connect 2 0 3 0;
#P connect 1 0 3 0;
#P connect 1 0 7 0;
#P connect 6 0 7 1;
#P connect 7 0 4 0;
#P window clipboard copycount 8;


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


February 16, 2007 | 7:18 pm

I say we have to solve it using only &&, ||, and !

b

Peter Castine wrote:
> On 16-Feb-2007, at 18:48, Stefan Tiedje wrote:
>
>> 3rd party is noncompetitive…
>
> If you rule out 3rd party externals, you can’t use abhaxions either. No
> Java, no Javascript. Only objects released with Max 2.2 in 1990, and
> only Uzi’s left outlet.
>
> Let’s make this a game for real men (and women).
>
> ————– 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
>
>
>


barry threw
composition : sound : programming
http://www.barrythrew.com
bthrew(at)gmail(dot)com
857-544-3967

Today, Noise is triumphant and reigns sovereign over the sensibility of men.
- Luigi Russolo, The Art of Noises


February 16, 2007 | 7:39 pm

At 8:11 PM +0100 2/16/07, Stefan Tiedje wrote:
>or another 3 object version, this time recursive with changable number of elements….

Elegant, but seems to have problems with the text list input, although the numbers work fine:

print: this pure
print: pure list
print: solution has
print: has the
print: the advantage
print: advantage of
print: of working
print: working with
print: with any
print: any data
print: data
print: 20 21
print: 21 22
print: 22 23
print: 23 24
print: 24 25
print: 25 26
print: 26 27
print: 27

The text results seem to make the Perl / Max addage "There’s always more than one solution" a lie.
(There is only one solution in the output)

-C


Chris Muir | "There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue." – Brian Eno


February 16, 2007 | 7:56 pm

Real men can’t even pronounce abhaxions (or chiche).

On 2/16/07 1:54 PM, "Peter Castine"

wrote:

> If you rule out 3rd party externals, you can’t use abhaxions either.
> No Java, no Javascript. Only objects released with Max 2.2 in 1990,
> and only Uzi’s left outlet.
>
> Let’s make this a game for real men (and women).

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson


February 16, 2007 | 7:59 pm

That’s a beauty Stefan

On 2/16/07 2:11 PM, "Stefan Tiedje" wrote:

> try "other" in the patch…
>
> or another 3 object version, this time recursive with changable number
> of elements….

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson


February 16, 2007 | 9:02 pm

On 16-Feb-2007, at 20:56, Gary Lee Nelson wrote:
> Real men can’t even pronounce abhaxions (or chiche).

Then try this one:

Strč prst skrz krk.

At least it’s a real sentence in a real language.

————– 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


February 16, 2007 | 9:15 pm

ok, Stefan got the cheese….

http://www.grieffenhagen.de/stuff/price.png

falk

Am 16.02.2007 um 20:11 schrieb Stefan Tiedje:

> Falk Grieffenhagen wrote:
>> not sure what you mean with element.
>
> try "other" in the patch…
>
> or another 3 object version, this time recursive with changable
> number of elements….
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 110 129 55 196617 zl slice 2;
> #P number 155 107 35 9 1 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 97 171 33 196617 defer;
> #P newex 110 150 32 196617 print;
> #P newex 52 129 55 196617 zl slice 1;
> #P message 88 85 127 196617 20 21 22 23 24 25 26 27;
> #P message 52 63 309 196617 this pure list solution has the
> advantage of working with any data;
> #P comment 197 108 145 196617 < - change number of elements;
> #P fasten 5 0 3 0 102 193 45 193 45 126 57 126;
> #P fasten 5 0 7 0 102 196 41 196 41 122 115 122;
> #P connect 2 0 7 0;
> #P connect 3 1 5 0;
> #P connect 2 0 3 0;
> #P connect 1 0 3 0;
> #P connect 1 0 7 0;
> #P connect 6 0 7 1;
> #P connect 7 0 4 0;
> #P window clipboard copycount 8;
>
>
> —
> Stefan Tiedje————x——-
> –_____———–|————–
> –(_|_ —-|—–|—–()——-
> — _|_)—-|—–()————–
> ———-()——–www.ccmix.com
>


February 17, 2007 | 2:18 am

Stefan Tiedje wrote:
> my attempts including one with 3 standard objects…

Ah, but the same bug persists in your version…

It is subtle but obvious upon close examination of the output.

Jonathan – I tried for a while before failing to come up with your
solution. It was the one that seemed ‘right’ to me, but I couldn’t
quite nail it down for some reason. After yours arrived, I needed to do
something different. :)

Jon


February 17, 2007 | 2:22 am

That one fixes the bug!

Stefan Tiedje wrote:
> or another 3 object version, this time recursive with changable number
> of elements….


February 17, 2007 | 3:10 am

Chris Muir wrote:
> Elegant, but seems to have problems with the text list input,
although > the numbers work fine:

Eating my words… The same patch bug is still there, though in a
different way. I would love to see a general standard-object solution
that doesn’t have problems with the word "list".

> print: this pure
> print: pure list
> print: solution has
> print: has the
> print: the advantage
> print: advantage of
> print: of working
> print: working with
> print: with any
> print: any data
> print: data


February 17, 2007 | 3:13 pm

Hello all.

Well here’s another 3-object solution. Very similar to Stefan’s but uses a
[trigger] instead of [defer]. Can control how many values to group and the
‘slide’ amount. Seems to work with all kinds of lists.

Well then, after many attempts, I think we have finally reduced this puzzler
down to the ideal solution?

Jonathan

max v2;
#N vpatcher 100 100 460 374;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 72 71 182 196617 a few words to test this list operation;
#P newex 72 129 64 196617 t l l;
#P newex 126 175 32 196617 print;
#P message 85 93 142 196617 11 12 13 14 15 16 17 18 19;
#P newex 126 151 51 196617 zl slice 2;
#P newex 72 151 51 196617 zl slice 1;
#P fasten 0 1 4 0 118 176 64 176 64 123 77 123;
#P fasten 2 0 4 0 90 117 77 117;
#P connect 5 0 4 0;
#P connect 4 0 0 0;
#P connect 4 1 1 0;
#P connect 1 0 3 0;
#P pop;

On 17/02/07, dlurk wrote:
>
> Chris Muir wrote:
> > Elegant, but seems to have problems with the text list input,
> although > the numbers work fine:
>
> Eating my words… The same patch bug is still there, though in a
> different way. I would love to see a general standard-object solution
> that doesn’t have problems with the word "list".
>
> > print: this pure
> > print: pure list
> > print: solution has
> > print: has the
> > print: the advantage
> > print: advantage of
> > print: of working
> > print: working with
> > print: with any
> > print: any data
> > print: data
>
>
>
>


Jonathan Green
0777 1680 497
jonathan@jg1983.co.uk


February 17, 2007 | 9:44 pm

This one still doesn’t work with the word "list". The position of the
word in your list makes it seems like it works..

Try putting "list" in other places.

However, this does nothing to kill my amazement that my behemoth
solution was whittled down to something so simple.

Thanks everybody.

b

Jonathan Green wrote:
> Hello all.
>
> Well here’s another 3-object solution. Very similar to Stefan’s but uses
> a [trigger] instead of [defer]. Can control how many values to group and
> the ‘slide’ amount. Seems to work with all kinds of lists.
>
> Well then, after many attempts, I think we have finally reduced this
> puzzler down to the ideal solution?
>
> Jonathan
>
> max v2;
> #N vpatcher 100 100 460 374;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P message 72 71 182 196617 a few words to test this list operation;
> #P newex 72 129 64 196617 t l l;
> #P newex 126 175 32 196617 print;
> #P message 85 93 142 196617 11 12 13 14 15 16 17 18 19;
> #P newex 126 151 51 196617 zl slice 2;
> #P newex 72 151 51 196617 zl slice 1;
> #P fasten 0 1 4 0 118 176 64 176 64 123 77 123;
> #P fasten 2 0 4 0 90 117 77 117;
> #P connect 5 0 4 0;
> #P connect 4 0 0 0;
> #P connect 4 1 1 0;
> #P connect 1 0 3 0;
> #P pop;
>
>
>
>
>
>
> On 17/02/07, *dlurk* >
> wrote:
>
> Chris Muir wrote:
> > Elegant, but seems to have problems with the text list input,
> although > the numbers work fine:
>
> Eating my words… The same patch bug is still there, though in a
> different way. I would love to see a general standard-object solution
> that doesn’t have problems with the word "list".
>
> > print: this pure
> > print: pure list
> > print: solution has
> > print: has the
> > print: the advantage
> > print: advantage of
> > print: of working
> > print: working with
> > print: with any
> > print: any data
> > print: data
>
>
>
> maxmsp@cycling74.com
>
>
>
>
> —
> Jonathan Green
> 0777 1680 497
> jonathan@jg1983.co.uk
>
>
> ————————————————————————
>


barry threw
composition : sound : programming
http://www.barrythrew.com
bthrew(at)gmail(dot)com
857-544-3967

Today, Noise is triumphant and reigns sovereign over the sensibility of men.
- Luigi Russolo, The Art of Noises


February 17, 2007 | 11:39 pm

Other keywords can cause problems too – set, clear, dump.

On 2/17/07 4:44 PM, "Barry Threw" wrote:

> This one still doesn’t work with the word "list". The position of the
> word in your list makes it seems like it works..
>
> Try putting "list" in other places.
>
> However, this does nothing to kill my amazement that my behemoth
> solution was whittled down to something so simple.
>
> Thanks everybody.
>
> b
>
> Jonathan Green wrote:
>> Hello all.
>>
>> Well here’s another 3-object solution. Very similar to Stefan’s but uses
>> a [trigger] instead of [defer]. Can control how many values to group and
>> the ‘slide’ amount. Seems to work with all kinds of lists.
>>
>> Well then, after many attempts, I think we have finally reduced this
>> puzzler down to the ideal solution?
>>
>> Jonathan
>>
>> max v2;
>> #N vpatcher 100 100 460 374;
>> #P window setfont "Sans Serif" 9.;
>> #P window linecount 1;
>> #P message 72 71 182 196617 a few words to test this list operation;
>> #P newex 72 129 64 196617 t l l;
>> #P newex 126 175 32 196617 print;
>> #P message 85 93 142 196617 11 12 13 14 15 16 17 18 19;
>> #P newex 126 151 51 196617 zl slice 2;
>> #P newex 72 151 51 196617 zl slice 1;
>> #P fasten 0 1 4 0 118 176 64 176 64 123 77 123;
>> #P fasten 2 0 4 0 90 117 77 117;
>> #P connect 5 0 4 0;
>> #P connect 4 0 0 0;
>> #P connect 4 1 1 0;
>> #P connect 1 0 3 0;
>> #P pop;
>>
>>
>>
>>
>>
>>
>> On 17/02/07, *dlurk* >
>> wrote:
>>
>> Chris Muir wrote:
>>> Elegant, but seems to have problems with the text list input,
>> although > the numbers work fine:
>>
>> Eating my words… The same patch bug is still there, though in a
>> different way. I would love to see a general standard-object solution
>> that doesn’t have problems with the word "list".
>>
>>> print: this pure
>>> print: pure list
>>> print: solution has
>>> print: has the
>>> print: the advantage
>>> print: advantage of
>>> print: of working
>>> print: working with
>>> print: with any
>>> print: any data
>>> print: data
>>
>>
>>
>> maxmsp@cycling74.com
>>
>>
>>
>>
>> —
>> Jonathan Green
>> 0777 1680 497
>> jonathan@jg1983.co.uk
>>
>>
>> ————————————————————————
>>

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson


February 19, 2007 | 10:41 am

Peter Castine wrote:
> If you rule out 3rd party externals, you can’t use abhaxions either.

Yes I can, I just have to de-encapsulate, because I made them myself… ;-)

> No Java, no Javascript. Only objects released with Max 2.2 in 1990,
> and only Uzi’s left outlet.

Hey, would be fun as well, I was thinking about that already, though is
difficult to keep track when what came up. In that regard an OS 9 (max
4.1 ?) restriction would make more sense…

> Let’s make this a game for real men (and women).

Yeah, whats your solution? (my second one could run in 2.2 as I believe
iter and bucket were available back then…)

Barry Threw wrote:
> I say we have to solve it using only &&, ||, and !

but ! is jasch and certainly not… (but could be abhaXed with [== 0] ;-)
Show your patch with those…

Stefan


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


February 19, 2007 | 10:44 am

dlurk wrote:
> Eating my words… The same patch bug is still there, though in a
> different way. I would love to see a general standard-object solution
> that doesn’t have problems with the word "list".

Standard objects try to be smart, but if you hack list.slice.mxj to not
listen to special reserved key words, you should be able to do it…
(The other problem, but just in this case, the outputs of zl or mxj
list. objects never precede the word list, never…)

Stefan


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


March 6, 2007 | 12:37 pm

"listfunnel" object


March 6, 2007 | 5:13 pm

sort of, but not quite. still, listfunnel should do what you need, quite simply.

#P window setfont "Sans Serif" 12.;
#P window linecount 1;
#P newex 276 350 116 9109516 print;
#P newex 170 317 116 9109516 route 0;
#P newex 170 286 116 9109516 listfunnel;
#P message 170 250 147 9109516 1 2 3 4 5 6 7 8;
#P connect 1 0 2 0;
#P connect 0 0 1 0;
#P connect 2 1 3 0;
#P window clipboard copycount 4;


March 9, 2007 | 12:33 pm

Seejay James schrieb:
> sort of, but not quite. still, listfunnel should do what you need,
> quite simply.

Is this referring to the thread from February? (Hard to tell if there
are no quotes…)

But I doubt that its meant like that, this would only work exactly on a
list which start with 1 and count on with 1. In this case you don’t need
a patch at all, you could directly type [1 2, 2 3, 3 4,...] into a
message box and bang it, and you would also be able to fit the last
element to be singular (as requested)…

Stefan


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


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