Tools/midiToArduino.rb - Improvement and bug fixes