store a list, then bang out the list elements one at a time?

May 3, 2013 at 5:11am

store a list, then bang out the list elements one at a time?

Is there an object for this? Or a simple way to do it?

#68060
May 3, 2013 at 6:46am

[zl reg] !

#244513
May 3, 2013 at 7:22am

“one at a time” would mean [zl nth], I guess. It really comes down to how you want to sequence things – I normally prefer to use [multislider] and the special “fetch $1″ message to retrieve the data, due to the way it works with pattrstorage and such.

#244514
May 3, 2013 at 2:32pm

Sorry, I didnt see the “one at a time” part :)
then [zl queue] may be what you’re looking for :

– Pasted Max Patch, click to expand. –
#244515
May 3, 2013 at 3:51pm

zl nth :)

#244516
May 3, 2013 at 4:03pm

the problem with zl nth is that you have to know exactly how many list elements there are, and then which ones you want to target. What I want to do is to store lists of varying lengths, and go “bang, bang, bang” and have it cycling through the list no matter how many elements it has.

for example, if I store a list that says “1 2 3 4″ and hit it with 10 bangs, I want it to output “1, 2, 3, 4, 1, 2, 3, 4, 1, 2″… but it if i store a list that says “7 8 9″ and hit it with ten bangs i want it to output “7, 8, 9, 7, 8, 9, 7, 8, 9, 7″. Does that make sense?

#244517
May 3, 2013 at 4:12pm

Thanks Ch, I think zl queue will do the trick for me!

#244518
May 3, 2013 at 6:24pm

Problem is that zl queue isn’t terribly intelligent, really. The system has no way of knowing where it’s gotten to in a list, etc.

If you do find you need to step up the functionality a bit, have a look at this one using zl mth:

– Pasted Max Patch, click to expand. –
#244519

You must be logged in to reply to this topic.