Collecting arbitrary number of items into a list.
Hi all,
I'm trying to collect an arbitrary number of items into a list.
e,g,
1. start collecting (user input or external event)
2. move my mouse around, and collect all of the coordinates into a list
3. stop collecting (user input or external event)
The key is, I don't know beforehand how many items I'm going to collect, so I can't use zl.stream.
I've tried:
- Using zl.stream, and increasing the list size as new data comes in, but that doesn't work, it seems to reset the list every time I change the list size
- collecting everything in a coll, and then outputting that to a zl.stream, but that seems really sledgehammer to nail. (My insanely over engineered solution attached, is there not a simpler way?
Just collect with [zl.group] and send bang at stop.
Dang, i missed that somehow, thanks! is there any limit to how long the list can be? I tried sending 1024 items into a zl.group which i set to have length 2048, but when I output it the list is only 256 elements long (my test patch below).
Sending the list to a message box shows that it has in fact 1024 elements.
But [zl.len] only understands length up to the default maximum size 256.
So for testing the size you need using [zl 2048 len] instead.