Arduino signal to Midi

This board has midi posts in its search.

You have working code for the interface, with no expansion needs there, I would leave that alone.

Your text to list conversion could benefit from study of AI2 csv and JSON blocks and the use of lookup tables.