Ok. Partially solved. Cable problem.

I replaced the usb / midi cable with separate midi cables going through a Cakewalk UA-25EX and the output from the headphone jack is fine. Not the setup I'm looking for but a step forward !!!!

Thanks to those who tried to help.