On a mega, do you have to pins to spare?
If so, you can easily just hook those two up to a port (with the power and gnd going to the respective pins on the board), and write a piece of code translating whatever signal you're working with into midi.
I haven't gotten mine yet, but as far as I know right now, it is also possible to do this simply through the new updated UART on it.
Bookmarks