offsetting all number 1s in a list

Kaspar's icon

Hi,

How do I offset all number 1s by x amount in a list?

Question also formulated in max patch:

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

Kaspar

Timo Rozendal's icon

[zl rot]
it shifts everything though... but that doesn't matter in your example

Kaspar's icon

Ok, yes, but what if I want to shift the first number 1 two positions and the second 1 four positions ?

Kaspar's icon

I can see that I can offset all the numbers in the list, but then make exceptions to some of the numbers ...

- something like: only rotate positions x and x in the list

Timo Rozendal's icon

then I think you'll have to make your own system which first analyzes your list (with zl nth or with iter) and then makes a new list based on your rules

Kaspar's icon

ok, so far so good:

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

- however, I still need to pick out x member of the list and add/subtract numbers to it ...

Kaspar

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

didn't check your patch, but here is my take: