Problems sending midi messages - values not the same at arrival

Try taking

  String hexMessage = String(message, HEX); // convert int value into hex value for midi

out, now that you don't need it.