Getting every nth number from a list

Michael's icon

Hoping someone can help with this. I'm sure its something very simple that I am unaware of.

I have a list that constantly varies in length and numbers and I'd like to extract or filter out every 5th number in that list (eg below)
List: 12 2 4 5 86 43 2 4 50 82 1 3 5 79 4... etc
Returned numbers: 86 82 4 (every 5th number)

Any ideas?

DK's icon

Max Patch
Copy patch and select New From Clipboard in Max.

Michael's icon

Thanks! I was thinking more along the lines of creating a number series using vexpr, but this works also.

Wetterberg's icon

I wouldn't make something like this iterate on every input

try this one instead, if the timing of the input matters a lot

Max Patch
Copy patch and select New From Clipboard in Max.

Roman Thilenius's icon

counter * 5 zl.nth