MIDI notes recorded earlier than they sound

I forgot to mention that when I try this in Reason, the notes are recorded at the correct time with no shifting required, ie they are recorded exactly as they sound.

This suggests to me that the problem is not related to the USB keyboard, drivers, sound card or the operating system… which only leaves Cubase itself.