List "drip" style iterator?

James Harkins's icon

I am looking for an object that is like [iter] -- outputting the list items in sequence, but one item per bang (so that a list could be used as a timed sequence, not an all-at-once sequence).

Certainly this is easy to build as an abstraction, but it occurs to me that this must be a fairly common requirement, hence it's likely that the object exists somewhere and then I wouldn't have to spend time rebuilding what someone else already did.

In Pure Data, for instance, there is a package of abstractions called list-abs and one of those is [list-drip].

I looked through [zl], and some of the other Data and List objects, and it didn't leap out of the docs...

hjh

Roman Thilenius's icon

[zl.nth] aka "the smallest database in the world" - one of my favorite objects.

tyler mazaika's icon

zl.queue = FIFO stack, output with bang.

James Harkins's icon

"zl.queue = FIFO stack, output with bang."

That's the winner, thanks!

I wasn't sure about it because, remarkably, the help mini-patch for zl.queue does not demonstrate the result of inputting a list. It doesn't say that successive lists going into the left inlet will be concatenated -- which is actually something of an important detail. (It would be equally plausible that a list going into the left inlet could replace existing data -- or somewhat less plausible, that only single values could go in, because this is all that the help patch demonstrates.)

When you're scanning through multiple documents trying to find something where you're not sure what the name is, ambiguity in the help patches makes it much easier to overlook, as I did.

"[zl.nth] aka "the smallest database in the world" - one of my favorite objects."

Of course -- but you really need to wrap this in an abstraction with [counter] for this use... which I know how to do, but as stated, why waste time rebuilding what somebody else did?

hjh

Peter Ostry's icon

Another one:
[bucket]
FIFO, FILO, a shift register.