Re: [PD] splitting a list into pairs of two
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2012-10-03 11:18, Alexandros Drymonitis wrote: Hi all, I'm trying to get pairs of two out of a list using two [list split] (I tried to reproduce the patch with ASCII, but it's getting a bit complicated, so I've attached it). how about using [list split 2]? fgamsdr IOhannes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlBsCRsACgkQkX2Xpv6ydvS4awCg3giaFDQ+cFUxbtUFTDBHCZb7 xjMAoIVsyuWUDlM7PgUqmZFUPVk4qpY3 =1DTh -END PGP SIGNATURE- smime.p7s Description: S/MIME Cryptographic Signature ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] splitting a list into pairs of two
But if my list has an odd number of elements, then I lose the last one, don't I? On Wed, Oct 3, 2012 at 12:45 PM, IOhannes m zmoelnig zmoel...@iem.atwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2012-10-03 11:18, Alexandros Drymonitis wrote: Hi all, I'm trying to get pairs of two out of a list using two [list split] (I tried to reproduce the patch with ASCII, but it's getting a bit complicated, so I've attached it). how about using [list split 2]? fgamsdr IOhannes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlBsCRsACgkQkX2Xpv6ydvS4awCg3giaFDQ+cFUxbtUFTDBHCZb7 xjMAoIVsyuWUDlM7PgUqmZFUPVk4qpY3 =1DTh -END PGP SIGNATURE- ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] splitting a list into pairs of two
Plus, the pairs I get with [list split 2] are 1 2 3 4 where I want to get 1 2 2 3 3 4 and if my list has got 5 elements 4 5 in the end.. On Wed, Oct 3, 2012 at 12:49 PM, Alexandros Drymonitis adr...@gmail.comwrote: But if my list has an odd number of elements, then I lose the last one, don't I? On Wed, Oct 3, 2012 at 12:45 PM, IOhannes m zmoelnig zmoel...@iem.atwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2012-10-03 11:18, Alexandros Drymonitis wrote: Hi all, I'm trying to get pairs of two out of a list using two [list split] (I tried to reproduce the patch with ASCII, but it's getting a bit complicated, so I've attached it). how about using [list split 2]? fgamsdr IOhannes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlBsCRsACgkQkX2Xpv6ydvS4awCg3giaFDQ+cFUxbtUFTDBHCZb7 xjMAoIVsyuWUDlM7PgUqmZFUPVk4qpY3 =1DTh -END PGP SIGNATURE- ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] splitting a list into pairs of two
not sure if there is a super simple way to do this, but this patch looks like it works: list_pair.pd Description: Binary data ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] splitting a list into pairs of two
It does. Thanks a lot. On Wed, Oct 3, 2012 at 1:00 PM, i go bananas hard@gmail.com wrote: not sure if there is a super simple way to do this, but this patch looks like it works: ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] splitting a list into pairs of two
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, Oct 3, 2012 at 12:49 PM, Alexandros Drymonitis adr...@gmail.comwrote: But if my list has an odd number of elements, then I lose the last one, don't I? no. that's what the last outlet of [list split] is for. On 2012-10-03 11:58, Alexandros Drymonitis wrote: Plus, the pairs I get with [list split 2] are 1 2 3 4 where I want to get 1 2 2 3 3 4 ah i see. i misunderstood the question then. fgamsdr IOhannes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlBsDswACgkQkX2Xpv6ydvSL6ACgvm7aU8M5nJewL4xsaVVPHDrN /OgAoOSC6UvWEhuy4Ql3ZyTkhjvJhmDn =RoUH -END PGP SIGNATURE- smime.p7s Description: S/MIME Cryptographic Signature ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] splitting a list into pairs of two
Hi the attached should do it... The version on the right should be more general allowing to specify the grouping size, and would work with non-necessarily-numeric list. Lorenzo On 03/10/12 11:18, Alexandros Drymonitis wrote: Hi all, I'm trying to get pairs of two out of a list using two [list split] (I tried to reproduce the patch with ASCII, but it's getting a bit complicated, so I've attached it). I'm sending a list [1 2 3 4( and I want to get 1 2 2 3 3 4 separately but I get an additional 4 4 in the end. Meaning, in the Pd window I get the following printed out: 1 2 2 3 3 4 4 4 How can I avoid that last couple of numbers? I guess it shouldn't be difficult, but I just can't see it. Thanks ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list #N canvas 314 277 896 758 10; #X msg 68 73 1 2 3 4; #X obj 48 211 list length; #X floatatom 48 237 5 0 0 0 - - -; #X obj 46 372 until; #X obj 146 543 unpack f f; #X obj 146 571 pack f f; #X obj 80 406 + 1; #X obj 48 259 - 1; #X obj 47 406 f 0; #X obj 46 313 t f b; #X msg 91 372 0; #X obj 47 434 t b f; #X obj 112 516 list split 0; #X obj 112 491 list; #X obj 122 176 t l l b; #X msg 136 73 1 2 3 4 5; #X obj 146 601 print couple; #X floatatom 48 285 5 0 0 0 - - -; #X msg 215 73 10 9 8 7 6 5 4 3 2 1; #X msg 216 104 1 3 5 7 9 10 598; #X obj 371 209 list length; #X floatatom 371 235 5 0 0 0 - - -; #X obj 369 370 until; #X obj 402 420 + 1; #X obj 371 257 - 1; #X obj 369 420 f 0; #X obj 369 311 t f b; #X obj 491 559 list split 0; #X obj 491 534 list; #X obj 527 175 t l l b; #X floatatom 371 283 5 0 0 0 - - -; #X obj 415 395 t f f; #X obj 370 448 t b f f; #X obj 491 588 list split; #X obj 597 528 - 2; #X msg 462 72 1 2 3 4; #X msg 530 72 1 2 3 4 5; #X msg 609 72 10 9 8 7 6 5 4 3 2 1; #X msg 610 103 1 3 5 7 9 10 598; #X obj 415 370 f 2; #X floatatom 430 343 5 0 0 0 - - -; #X obj 519 611 list trim; #X obj 519 637 print tuplet; #X text 419 314 specify grouping; #X msg 602 142 1 foo bar 8 2.4 walk miller's dog; #X connect 0 0 14 0; #X connect 1 0 2 0; #X connect 2 0 7 0; #X connect 3 0 8 0; #X connect 4 0 5 0; #X connect 4 1 5 1; #X connect 5 0 16 0; #X connect 6 0 8 1; #X connect 7 0 17 0; #X connect 8 0 6 0; #X connect 8 0 11 0; #X connect 9 0 3 0; #X connect 9 1 10 0; #X connect 10 0 8 1; #X connect 11 0 13 0; #X connect 11 1 12 1; #X connect 12 1 4 0; #X connect 13 0 12 0; #X connect 14 0 1 0; #X connect 14 1 13 1; #X connect 14 2 13 1; #X connect 15 0 14 0; #X connect 17 0 9 0; #X connect 18 0 14 0; #X connect 19 0 14 0; #X connect 20 0 21 0; #X connect 21 0 24 0; #X connect 22 0 25 0; #X connect 23 0 25 1; #X connect 24 0 30 0; #X connect 25 0 23 0; #X connect 25 0 32 0; #X connect 26 0 22 0; #X connect 26 1 39 0; #X connect 27 0 33 0; #X connect 28 0 27 0; #X connect 29 0 20 0; #X connect 29 1 28 1; #X connect 29 2 28 1; #X connect 30 0 26 0; #X connect 31 0 25 1; #X connect 31 1 34 1; #X connect 32 0 28 0; #X connect 32 1 27 1; #X connect 32 2 34 0; #X connect 33 1 41 0; #X connect 34 0 33 1; #X connect 35 0 29 0; #X connect 36 0 29 0; #X connect 37 0 29 0; #X connect 38 0 29 0; #X connect 39 0 31 0; #X connect 40 0 39 1; #X connect 41 0 42 0; #X connect 44 0 29 0; ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] splitting a list into pairs of two
nice Lorenzo ! ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] splitting a list into pairs of two
On 03/10/12 13:32, i go bananas wrote: nice Lorenzo ! Thanks.. well actually for the float version I think we had the same idea :) ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] splitting a list into pairs of two
woahhang on you did that patch without seeing mine??? it's almost identical...right down to the numbers in the example message box someone call Fox Mulder! this is definitely an X file ! ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list