Splicing a symbol into separate characters

staxas's icon

I'm working on a patch for the generation of serial protection codes. I have a nice algorithm that spits out 16 one character digits (1 3 4 2 5 etc) in a list. With [tosymbol] I change it into a single line of code without the spaces.

The next step would be to turn this line of code back into a list, but how do I extract seperate symbols out of a bigger symbol? To be more exact, how can I get the nth character out of a symbol?

staxas's icon

Never mind, worked it out! Combination of [atoi] and subtracting 48 through [zl iter 1]!

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

The zl object is great for list related stuff.

ergaster's icon

staxas, [zl] is your friend..

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

rob

edit: too late again :)