In the realm of speculation here but your modifications use the same array to send a message to two devices. I would try using two seprate arrays one for each midi instance.
In the realm of speculation here but your modifications use the same array to send a message to two devices. I would try using two seprate arrays one for each midi instance.