Why 12?
As for ‘tostring’, are you sure that it is faster to get key, sign and octave from string and then transform them to number?
My mistake. I didn’t notice that you don’t iterate all columns.
Yes, As soon as you’re iterating more than one column, there is a way to do it faster with string.sub et c.
EDIT: an example can be seen in this tool: https://forum.renoise.com/t/new-tool-2-7-3-1-set-track-width-to-active-columns/31078
PS. Btw, I just remembered… if you’re creating an indexed table, it’s even faster to do something like “table[#table+1] = new_value” instead of using table.insert.