Join 2 lists and store them in coll
Hi guys,
I want to store 2 lists in coll in a certain way:
list: hello how are you
list: id 1 id 2 id 3 id 4
coll should store the 2 lists like so:
hello, id 1;
how, id 2;
are, id 3;
you, id 4;
I managed to get the first list right with the iter-object but I can't get my head around the second list. I tried it with "zl.iter 2", but that only outputs the last 2 elements.
Then I combine the two lists with zl.join and prepend store.
Is there an object that can do that, or was my approach wrong?
Thanks!
For reference: I want to store cuepoints from Ableton with their individual names.
The live.object only accepts the id-number as e.g. "id 1", so with a space in between...

............................................................................................

you can filter id from second list.
makes no sense to use "id" for storage.
add them when needed.
but if you want to place them into coll ...

I would do it so:

Another method. Anyway I agree that to store "id" make no sense

damn,
i forgot sprintf can also combine "store". Three items less......
Thanks for the quick responses guys that was very helpful!
Does counter really reflect id's issued from whatever observer ?
it does not have to be so, or ?
id's list could be id 11 id 15 id 22 ... whatever.
yes, I assumed the id numbers were consecutive, otherwise it wouldn't work!
Yeah, the id numbers are random and each time different... I dont know why Ableton does that....
If youre still responding to this thread it would be nice if I could get your help with another question related to the previous:
I now want to store 3 lists, which I already have. But the problem is reading them out from coll.
Im sure it has something to do, how I save each line in coll, but I couldnt do it another way.
The three lists are
the time positions from the markers in the Ableton set
the id numbers
the names of the markers
Im also sorting coll with the timepositions so that the names are in the correct order of the markers in Abletn (another thing I dont understand why ableton does that... It seems that it stores the markers at which time you created the marker without looking at the position in the Ableton-project)
Im storing the names in a umenu to display them later in the max4live device.
Now I want to access coll again, but only with the words, so when I choose a name from the umenu, the id number should be displayed by coll.
if coll should contain name, id and time
id is only guaranteed unique item.
markers could have duplicated names, or several markers could
be inserted at same time position.
so id is your safe coll index.
to make umenu for recalling, I would combine name and id into umenu.
that id number after name would not disturb, or ?
P.S.
you can sort coll baserd on any item.
and then dump that into umenu.