how to loop a list


    Oct 09 2007 | 7:50 am
    ive got a list of sixteen 1's and 0's from a lemur. im trying to figure out the simplest way to select say the first 2/4/8items in the list, and clone it enough times to fill the list of 16. its to create loops for a sequencer.
    ive been trying to do it with zl slice, and zl group, but its just a bit ugly and i was wondering if theres a slick and simple way of doing it.

    • Oct 09 2007 | 9:11 am
      Ah, these topics are nice. I can't think of a slicker way of doing it, but the way you suggest is not that ugly, or is it?
      but let's see some improvements^^.
    • Oct 09 2007 | 10:50 am
      blairell skrev: > ive got a list of sixteen 1's and 0's from a lemur. im trying to figure out the simplest way to select say the first 2/4/8items in the list, and clone it enough times to fill the list of 16. its to create loops for a sequencer. > > ive been trying to do it with zl slice, and zl group, but its just a bit ugly and i was wondering if theres a slick and simple way of doing it. Hi Queglay,
      I think the best way is to dump the data into a user interface object like multislider and use your sequencing mechanism to do the fun stuff.
      yours in Lemur-dom, Andreas.
    • Oct 09 2007 | 12:27 pm
      another list dare. how to implement a "senior member" routine. list members will be arranged according to their seniority in the list. from older (longest standing) to newest and vise versa.
    • Oct 09 2007 | 12:36 pm
      Isn't that a fifo?
      On 10/9/07 8:27 AM, "yair reshef" wrote:
      > > another list dare. > how to implement a "senior member" routine. > list members will be arranged according to their seniority in the list. from > older (longest standing) to newest and vise versa. > >
      Cheers Gary Lee Nelson Oberlin College www.timara.oberlin.edu/GaryLeeNelson
    • Oct 09 2007 | 12:39 pm
      Lobjects.
      On 10/9/07 6:50 AM, "Andreas Wetterberg" wrote:
      > blairell skrev: >> ive got a list of sixteen 1's and 0's from a lemur. im trying to figure out >> the simplest way to select say the first 2/4/8items in the list, and clone it >> enough times to fill the list of 16. its to create loops for a sequencer. >> >> ive been trying to do it with zl slice, and zl group, but its just a bit ugly >> and i was wondering if theres a slick and simple way of doing it. > Hi Queglay, > > I think the best way is to dump the data into a user interface object > like multislider and use your sequencing mechanism to do the fun stuff. > > yours in Lemur-dom, > Andreas. > > #P window setfont "Sans Serif" 9.; > #P window linecount 1; > #P message 702 123 43 9109513 fetch $1; > #P number 721 63 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; > #P newex 702 94 29 9109513 % 16; > #P newex 991 56 95 9109513 route /yourseqhere/x; > #P newex 991 32 77 9109513 udpreceive 8000; > #P newex 746 444 103 9109513 udpsend 10.0.0.2 8000; > #P newex 746 400 107 9109513 prepend /yourseqhere/x; > #P message 905 44 18 9109513 16; > #P message 890 44 14 9109513 8; > #P message 873 44 14 9109513 4; > #P user multiSlider 867 259 298 98 0. 1. 16 2921 15 0 0 2 0 0 0; > #M frgb 25 189 92; > #M brgb 255 255 255; > #M rgb2 127 127 127; > #M rgb3 0 0 0; > #M rgb4 37 52 91; > #M rgb5 74 105 182; > #M rgb6 112 158 18; > #M rgb7 149 211 110; > #M rgb8 187 9 201; > #M rgb9 224 62 37; > #M rgb10 7 114 128; > #P newex 805 47 50 9109513 metro 350; > #P toggle 805 27 15 0; > #P message 805 93 43 9109513 fetch $1; > #N counter 0 0 16; > #X flags 0 0; > #P newobj 805 67 68 9109513 counter 0 0 16; > #P user multiSlider 868 144 298 98 0. 1. 16 2921 15 0 0 2 0 0 0; > #M frgb 0 0 0; > #M brgb 255 255 255; > #M rgb2 127 127 127; > #M rgb3 0 0 0; > #M rgb4 37 52 91; > #M rgb5 74 105 182; > #M rgb6 112 158 18; > #M rgb7 149 211 110; > #M rgb8 187 9 201; > #M rgb9 224 62 37; > #M rgb10 7 114 128; > #P message 868 92 151 9109513 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1; > #P message 894 115 151 9109513 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1; > #P window linecount 4; > #P comment 594 96 100 9109513 alternative method for shortening the list > with a slightly different musical appeal to it.; > #P connect 16 0 18 0; > #P connect 4 0 16 0; > #P connect 4 0 5 0; > #P connect 17 0 16 1; > #P connect 14 0 15 0; > #P connect 12 0 13 0; > #P connect 3 0 12 0; > #P connect 7 0 4 0; > #P fasten 11 0 4 4 910 64 866 64; > #P fasten 10 0 4 4 895 64 866 64; > #P fasten 9 0 4 4 878 64 866 64; > #P fasten 3 1 8 0 1161 250 872 250; > #P connect 6 0 7 0; > #P fasten 5 0 3 0 810 124 873 124; > #P fasten 1 0 3 0 899 138 873 138; > #P connect 2 0 3 0; > #P window clipboard copycount 19; >
      Cheers Gary Lee Nelson Oberlin College www.timara.oberlin.edu/GaryLeeNelson
    • Oct 09 2007 | 12:42 pm
      Again, Elsea's Lobjects has externals that makes this very easy.
      On 10/9/07 3:50 AM, "blairell" wrote:
      > > ive got a list of sixteen 1's and 0's from a lemur. im trying to figure out > the simplest way to select say the first 2/4/8items in the list, and clone it > enough times to fill the list of 16. its to create loops for a sequencer. > > ive been trying to do it with zl slice, and zl group, but its just a bit ugly > and i was wondering if theres a slick and simple way of doing it.
      Cheers Gary Lee Nelson Oberlin College www.timara.oberlin.edu/GaryLeeNelson
    • Oct 09 2007 | 12:48 pm
      yair reshef skrev: > another list dare. > how to implement a "senior member" routine. > list members will be arranged according to their seniority in the list. from older (longest standing) to newest and vise versa. > >
    • Oct 09 2007 | 1:49 pm
      You're of course right - zl stack (LIFO) and zl queue (FIFO)
      Gary Lee Nelson skrev: > Isn't that a fifo? > > > On 10/9/07 8:27 AM, "yair reshef" wrote: > > >> another list dare. >> how to implement a "senior member" routine. >> list members will be arranged according to their seniority in the list. from >> older (longest standing) to newest and vise versa. >> >> >> > > > Cheers > Gary Lee Nelson > Oberlin College > www.timara.oberlin.edu/GaryLeeNelson > > > > . > >
    • Oct 09 2007 | 1:53 pm
      Patch please? In my experience 9 out of 10 Lobjects are unnecessary, since the ZL group performs the same tasks.
      Best, Andreas.
      Gary Lee Nelson skrev: > Again, Elsea's Lobjects has externals that makes this very easy. > > > On 10/9/07 3:50 AM, "blairell" wrote: > > >> ive got a list of sixteen 1's and 0's from a lemur. im trying to figure out >> the simplest way to select say the first 2/4/8items in the list, and clone it >> enough times to fill the list of 16. its to create loops for a sequencer. >> >> ive been trying to do it with zl slice, and zl group, but its just a bit ugly >> and i was wondering if theres a slick and simple way of doing it. >> > > > Cheers > Gary Lee Nelson > Oberlin College > www.timara.oberlin.edu/GaryLeeNelson > > > > . > >
    • Oct 09 2007 | 1:54 pm
      bas your example worked perfectly! thanks!
    • Oct 09 2007 | 1:59 pm
      i didnt think they'll do as the list changes the order of memebrs. but a sort will do the trick. tnx lobjects!
      On 10/9/07, Andreas Wetterberg wrote: > > You're of course right - zl stack (LIFO) and zl queue (FIFO) > > > Gary Lee Nelson skrev: > > Isn't that a fifo? > > > > > > On 10/9/07 8:27 AM, "yair reshef" wrote: > > > > > >> another list dare. > >> how to implement a "senior member" routine. > >> list members will be arranged according to their seniority in the list. > from > >> older (longest standing) to newest and vise versa. > >> > >> > >> > > > > > > Cheers > > Gary Lee Nelson > > Oberlin College > > www.timara.oberlin.edu/GaryLeeNelson > > > > > > > > . > > > > > >
    • Oct 09 2007 | 2:24 pm
      Can't remember my history with Lobjects. They've been around for a long time. I used McCartney's list objects early on but there was a time that they were not upgraded for a new max version and the zl set had not arrived. Actually, I think the zl set IS McCartney's set.
      I was play with your patch as a way of building lists ala Lbuild. Using zl queue and stack to build is great but there doesn't seem to be a message to dump the current contents but using a zl reg works nicely as in this modification of your example...
      On 10/9/07 9:53 AM, "Andreas Wetterberg" wrote:
      > Patch please? In my experience 9 out of 10 Lobjects are unnecessary, > since the ZL group performs the same tasks. > > Best, > Andreas. > > Gary Lee Nelson skrev: >> Again, Elsea's Lobjects has externals that makes this very easy. >> >> >> On 10/9/07 3:50 AM, "blairell" wrote: >> >> >>> ive got a list of sixteen 1's and 0's from a lemur. im trying to figure >>> out >>> the simplest way to select say the first 2/4/8items in the list, and clone >>> it >>> enough times to fill the list of 16. its to create loops for a sequencer. >>> >>> ive been trying to do it with zl slice, and zl group, but its just a bit >>> ugly >>> and i was wondering if theres a slick and simple way of doing it. >>> >> >> >> Cheers >> Gary Lee Nelson >> Oberlin College >> www.timara.oberlin.edu/GaryLeeNelson >> >> >> >> . >> >> >
      Cheers Gary Lee Nelson Oberlin College www.timara.oberlin.edu/GaryLeeNelson
    • Oct 09 2007 | 3:22 pm
      here is a way with Lrepeat ;)
    • Oct 13 2007 | 11:10 pm
      >Patch please? In my experience 9 out of 10 Lobjects are unnecessary, >since the ZL group performs the same tasks.
      > Can't remember my history with Lobjects. They've been around for a long > time. I used McCartney's list objects early on but there was a time that > they were not upgraded for a new max version and the zl set had not arrived. > Actually, I think the zl set IS McCartney's set. >
      The Lobjects were begun in 1993. They have always been written to address my and my students concerns, and I have never deliberately duplicated an existing function. McCartney's listops were aready available when I started but he did not rewrite them for the change to PPC-- they were reborn as the zl set several years later. During the interregnum, I added length, lsort and some others out of necessity. itoa has an even more convoluted history, and Lstring resulted from one of its periods of unavailablity. In some other cases functions that were born as lobjects became standard, as lbang was duplicated by loadmess. I consider such objects depreciated-- use the standards whenever you have a choice.
      I'd remove redundancies if I could, but lobjects that duplicate others are still in the set because some folks use patches a very long time. For instance, I tried to withdraw Lbondo after pak came along, but I got 10 complaints within a week.
      Some apparent duplicates aren't really redundant because they have expanded features. For instance, Lcatch was written because of a mistake in the documentation of thresh-- it was described as collecting data during a defined period, and I thought it would be useful to collect data until a break in the stream of a defined period. It was quite a bit later when I discovered thresh actually worked that way. However, I had also added the feature of breaking on a magic value, which is nice when gathering data from serial inputs. You can also force it to behave the way thresh was supposed to by connecting a metro.
      Some duplicates came from requests. Two or three revs ago, gate was always closed when a patcher opened. There was some discussion of this on the list,and I responded with leftgate and lswitch, where something is always open and a second argument sets the initial state. Gate now has this feature (so does switch, but it's not documented).
      In any case, I wouldn't say 9 out of 10 are duplicates, it's more like 10 out 115. All I can say is each one seemed like a good idea at the time.
      (Please reply directly to me, as I seldom have time to visit this forum.) pqe
    • Oct 14 2007 | 2:09 am
      I rely on Lobjects. They are rock solid and have been conscientiously updated throughout the history of Max. I must say that Peter Elsea is a hero of mine. There are many things I could not have done without his work. I regard Lobjects as an essential extension to Max.
      Cheers Gary Lee Nelson Oberlin College www.timara.oberlin.edu/GaryLeeNelson
      On 10/13/07 7:10 PM, "Peter Elsea" wrote:
      > > >> Patch please? In my experience 9 out of 10 Lobjects are unnecessary, >> since the ZL group performs the same tasks. > >> Can't remember my history with Lobjects. They've been around for a long >> time. I used McCartney's list objects early on but there was a time that >> they were not upgraded for a new max version and the zl set had not arrived. >> Actually, I think the zl set IS McCartney's set. >> > > > The Lobjects were begun in 1993. They have always been written to address my > and my students concerns, and I have never deliberately duplicated an existing > function. McCartney's listops were aready available when I started but he did > not rewrite them for the change to PPC-- they were reborn as the zl set > several years later. During the interregnum, I added length, lsort and some > others out of necessity. itoa has an even more convoluted history, and Lstring > resulted from one of its periods of unavailablity. In some other cases > functions that were born as lobjects became standard, as lbang was duplicated > by loadmess. I consider such objects depreciated-- use the standards whenever > you have a choice. > > I'd remove redundancies if I could, but lobjects that duplicate others are > still in the set because some folks use patches a very long time. For > instance, I tried to withdraw Lbondo after pak came along, but I got 10 > complaints within a week. > > Some apparent duplicates aren't really redundant because they have expanded > features. For instance, Lcatch was written because of a mistake in the > documentation of thresh-- it was described as collecting data during a > defined period, and I thought it would be useful to collect data until a break > in the stream of a defined period. It was quite a bit later when I discovered > thresh actually worked that way. However, I had also added the feature of > breaking on a magic value, which is nice when gathering data from serial > inputs. You can also force it to behave the way thresh was supposed to by > connecting a metro. > > Some duplicates came from requests. Two or three revs ago, gate was always > closed when a patcher opened. There was some discussion of this on the > list,and I responded with leftgate and lswitch, where something is always open > and a second argument sets the initial state. Gate now has this feature (so > does switch, but it's not documented). > > In any case, I wouldn't say 9 out of 10 are duplicates, it's more like 10 out > 115. All I can say is each one seemed like a good idea at the time. > > (Please reply directly to me, as I seldom have time to visit this forum.) > pqe > -- > Peter Elsea > Director, Electronic Music Studios > University of California, Santa Cruz > http://arts.ucsc.edu/EMS/Music/index.html > elsea@ucsc.edu > get the Lobjects and Maxtutors at ftp://arts.ucsc.edu/pub/ems/
    • Oct 14 2007 | 10:12 am
      On 14 oct. 07, at 04:09, Gary Lee Nelson wrote:
      > I rely on Lobjects. They are rock solid and have been conscientiously > updated throughout the history of Max. I must say that Peter Elsea > is a > hero of mine. There are many things I could not have done without > his work. > I regard Lobjects as an essential extension to Max.
      I think exactly the same.
    • Oct 14 2007 | 11:20 am
      >>I rely on Lobjects. They are rock solid and have been conscientiously >>updated throughout the history of Max. I must say that Peter Elsea is a >>hero of mine. There are many things I could not have done without his work. >>I regard Lobjects as an essential extension to Max. > >I think exactly the same.
      Me too!
      Dan -- Dan Nigrin Defective Records 202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major Malfunction http://www.defectiverecords.com http://www.jackosx.com
    • Oct 15 2007 | 9:39 am
      blairell wrote: > bas your example worked perfectly! thanks! > here?s one with more flexible selection. i?d be curious to see if one has shorter ways to do the same... while i didnt use any Lobjects peter elsea is still a hero of mine, too...
      p
    • Oct 16 2007 | 10:40 am