Are all your connections going through your audio interface?( 2 audio and midi )
I use a 5 in/out midi interface, and a Scarlet 18i20 audio interface. I can record midi and audio from my synths. The midi goes to a separate track and audio to its track. I also have no problems recording virtual instruments.
I would check your interface settings. Then check your midi cable. It could have a short or bad connection. If you have a second midi cable available try it. When playing a virtual instrument, do you get distortion in your audio? ( with or without the audio connected )
I hope this may help.
Mixcraft8RS(418)64Bit, Win. 10 64Bit, Intel i5 @ 3.20GHz, ssd 250GB(os),1TB hhd(library audio),1TB hhd (recorded audio),Nvidia GeForce1050i video,16GB RAM,Focusrite 18I20 2nd gen usb,Motu 5 ch.midi interface, D5,U220,Keystation88,B4000+,Leslie,Rhodes73mk1