Forums > MaxMSP

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

May 3, 2013 | 5:11 am

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



Ch
May 3, 2013 | 6:46 am

[zl reg] !


May 3, 2013 | 7:22 am

"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.



Ch
May 3, 2013 | 2:32 pm

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. –

May 3, 2013 | 3:51 pm

zl nth :)


May 3, 2013 | 4:03 pm

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?


May 3, 2013 | 4:12 pm

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


May 3, 2013 | 6:24 pm

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. –

Viewing 8 posts - 1 through 8 (of 8 total)