Midi/GUB bugfix

lround is not supported in older C/C++ libraries, so use my_round instead.