blinkm maxm and midi, programming advices needed!

That is because you can't specify other pins for debugging.
You could use software serial and then build a TTL to RS232 converter. Then use a USB to RS232 lead and another serial monitor like putty,, but that is complex.

Transforming 1 to 127 into 0 to 255 can be done with the map function.