This isnāt correct for now. Latest Renoise comes with LuaJIT, so it does ship with bit (note, the bit module was available in previous versions as well but it was added by Renoise before whereas now it is provided by LuaJIT).
Bitwise infix operators donāt exist but you can do bit.lshift and so on, see the bit module docs for more (you donāt have to require the module, bit is in global scope for tools)
Yeah, LuaJIT somewhat confusingly reports being lua 5.1, I guess it is largely compatible with that so can be treated as such. You can try running print(jit.version) in Renoise 3.5 to get the actual LuaJIT version being used.
Anyway Iāve now took a different approach. I think my main confusion was about noteColumn vs effectColumn. Notecolumn also contains effect columns, but those are empty⦠Or whatever. Now itās kinda fixed:
You donāt have to use tonumber, just use the _value fields instead of the _string ones. The values already have the integer you are after, adding strings and parsing as hexadecimal is unnecessary.
Note, you might want to verify that the midi message is actually a valid one before exporting it, that is, the Mx should be in the right-most note column and both the param index and the cc value is in the range of 0-127.
For example out of range values for the fx column here might give you nil as a result of the tonumber or give you a nonexistent midi parameter.