slice up a list with time-interval.

Qualm's icon

Lets say you have a message with 10 elements. and after that you out a "iter".

Is there a way to control the output with time, so every element outputs in e.g 5 mseconds?

Thanks

/F

Chris Muir's icon

A combo of metro, counter, zl reg and zl nth should do the trick.

Christopher Dobrian's icon
Max Patch
Copy patch and select New From Clipboard in Max.

There's probably a variety of ways to accomplish it.
Here's one way that works for a list of integers (and could easily be adapted for floats).

Christopher Dobrian's icon
Max Patch
Copy patch and select New From Clipboard in Max.

or...

Stephane Morisse's icon
Max Patch
Copy patch and select New From Clipboard in Max.

To Chris Muir : with your suggestion, I came up with this. I wonder if the 't b b' connected to the button makes sense as it works without it... But I imagine there may be timing concerns...

Stephane Morisse's icon
Max Patch
Copy patch and select New From Clipboard in Max.

After a little streamlining. I played around this because I've got a delay after clicking the button before the first element is output. I thought this was because the counter starts at 0 so I added a '+ 1' between the counter and 'zl nth', but it doesn't seem to change anything.

broc's icon
Max Patch
Copy patch and select New From Clipboard in Max.

For indexing from 0 just use [zl mth] instead of [zl nth].
The delay is avoided by choosing the correct input order, ie. from right to left.

Christopher Dobrian's icon
Max Patch
Copy patch and select New From Clipboard in Max.

You'll want to beware of the "screw case" of a second list (or third, fourth, etc.) coming in before the first list is completed. My examples above simply overlap multiple lists. Here's an example that queues them.