rotate a number …. or combine a list of variable length into one number

Feb 5, 2013 at 11:27am

rotate a number …. or combine a list of variable length into one number

Hello everyone,

is there a way to rotate a number like this 345 -> 453 -> 534
and if not is there a way to combine a list of variable length into one number:

4 5 6 -> 456 and next 5 7 8 9 -> 5789, the problem are the annoying numbers which are stuck in the inlets when i use unjoin and then combine or sprintf %i%i.

Thank you

Robert

#66353
Feb 5, 2013 at 11:36am

Hi,

You can rotate a list with [zl rot], and [combine] will merge data without spaces. What do you mean by ‘stuck’?

Yeter

#238851
Feb 5, 2013 at 11:51am

yes thats what i planned but to use combine the list must be split into pieces, if i now use unjoin or unpack for this and first send in lets say 3 4 5 6
and next 2 3 4, the secound time the 6 is still “stuck” into the unjoin outlet and it will send out 2 3 4 6.

The same with combine.

If i send in the list straight into the combine module it will only output the first number…

edit, i just realized that i can use “combine 0 0 0 0 0 0 0 0″ and then send the list in the first inlet, but still, it will output not just the number but also the zeros or the numbers of a longer list that has been send in before.

#238852
Feb 5, 2013 at 11:57am

Hi,

?

– Pasted Max Patch, click to expand. –
#238853
Feb 5, 2013 at 12:06pm

sweet!!! thanks a lot nicolas, this is what i was looking for!!

#238854

You must be logged in to reply to this topic.