Seeing as you're getting it with hardware AND software, it sort of points to wards something external to Sonar.
This could be either your monitor chain or your interface.
But you don't provide any information for anyone to even start making a diagnosis, so please list your full system spec, including interface/monitoring setup etc.
How is your electric piano being routed through all this?