Something that worked for me
I record to a laptop, and for years i had trouble when connecting keyboards, amps, or effects pedals like you say, and couldn't track it down to any one cable or device, i swapped everything around, moved everything, tried every power outlet known to man, then one...